Skip to content

Commit

Permalink
series: Add a new action to re-trigger a testing cycle
Browse files Browse the repository at this point in the history
People are asking our CI team to re-trigger tests when something goes
wrong (for instance when a test slave was online during the previous
test run) or to double check that the results are stable.

This action allows maintainers to re-trigger test runs by inserting
series-new-revision events into the event stream.

Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
  • Loading branch information
Damien Lespiau committed Apr 29, 2016
1 parent dd9bb73 commit c2f486e
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 0 deletions.
6 changes: 6 additions & 0 deletions htdocs/js/patchwork.js
Original file line number Diff line number Diff line change
Expand Up @@ -571,6 +571,12 @@ var pw = (function() {
o.clear_action();
});

/* and action without a menu */
$('#do-' + o.name + '-action').on('click', function(e) {
e.preventDefault();
o._do_action();
o.clear_action();
});

return o;
};
Expand Down
13 changes: 13 additions & 0 deletions htdocs/js/series-list.js
Original file line number Diff line number Diff line change
Expand Up @@ -394,6 +394,19 @@ $(function () {

});

/* test action */
pw.create_action({
table: series_table,
name: 'test',
init: function() {},
do_action: function(id, revision) {
this.post_data('/series/' + id + '/revisions/' + revision +
'/newrevision/');
},
clear_action: function() {},
can_submit: function() { return true; },
});

/* initial load */
series_table.refresh();
});
1 change: 1 addition & 0 deletions patchwork/templates/patchwork/series-list.html
Original file line number Diff line number Diff line change
Expand Up @@ -266,6 +266,7 @@ <h1>Series</h1>
</li>
</ul>
</div>
<button class="btn btn-default" id="do-test-action">Test again</button>
</div>
</div>
</div>
Expand Down

0 comments on commit c2f486e

Please sign in to comment.