Add manual trigger to JenkinsCI integration.

Review Request #11225 — Created Oct. 15, 2020 and updated

MarcusBoay
rbintegrations
master
rbintegrations

Add manual trigger to JenkinsCI.

This change adds the ability for Integrations to run JenkinsCI manually.
A checkbox is added to the JenkinsCI form that indicates if JenkinsCI should
only run manually.

The password form label has also been updated to emphasize using an API token
instead of the user's password since newer versions of Jenkins only works with
API tokens.

This change also fixes the Jenkins API failing for Review Board 3 because
request.open() was not valid.

Based on work by David Trowbridge: /r/11130

Manually tested on Review Board 3. Jenkins was set up with Docker and
connected to a GitHub repository and Review Board 3. A Jenkins build was
not run when the manually run checkbox is unchecked and is run when the
field is checked. Clicking on the 'Run' button runs the Jenkins build.

Unit tests to verify that a build is not run when the manually run
configuration is checked and to verify that a build is run when the signal is
emitted.

Summary
Add manual trigger to JenkinsCI.
Refactor Jenkins tests with wrapper spy on function.
Add JenkinsCI tests for manual run.
MarcusBoay
MarcusBoay
MarcusBoay
Review request changed

Change Summary:

Minor documentation fixup

Commits:

Summary
-
Add manual trigger to JenkinsCI.
-
Refactor Jenkins tests with wrapper spy on function.
-
Add JenkinsCI tests for manual run.
+
Add manual trigger to JenkinsCI.
+
Refactor Jenkins tests with wrapper spy on function.
+
Add JenkinsCI tests for manual run.

Diff:

Revision 3 (+594 -172)

Show changes

Checks run (2 succeeded)

flake8 passed.
JSHint passed.
Loading...