Add manual trigger run and retry for TravisCI integration.

Review Request #11266 — Created Nov. 5, 2020 and updated

MarcusBoay
rbintegrations
master
rbintegrations

Add manual trigger to TravisCI.

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

This change also fixes the Jenkins build failing for git repositories with less
than 50 commits since git fetch --unshallow origin fails.

There was a bug where no TravisCI builds can be made on personal private GitHub
repositories because the GitHub username was being extracted from the wrong place.

Based on work by David Trowbridge: /r/11130

Manually tested on Review Board 3. TravisCI (travis-ci.com) was set up and
connected to a private GitHub repository and Review Board 3. A TravisCI 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 TravisCI build.

Verified the disabled/enabled run manually field by testing on Review Board
3.0.18, 3.0.19 and 4.0.x.

Verified retry functionality when state is in ERROR and TIMEOUT states.

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

Unit tests were also created to verify that the username is being pulled
from the correct place for the 4 different GitHub repository plans.
These were ran on Review Board 3.0 and Review Board 4.0 and their
supported versions of Python.

Summary
Add manual trigger to TravisCI.
Description From Last Updated

W293 blank line contains whitespace

reviewbotreviewbot

We typically put things like this at the end of the relevant block of imports, rather than trying to keep ...

daviddavid
Checks run (1 failed, 1 succeeded)
flake8 failed.
JSHint passed.

flake8

MarcusBoay
MarcusBoay
MarcusBoay
MarcusBoay
david
  1. 
      
  2. rbintegrations/travisci/forms.py (Diff revision 2)
     
     
     
     
     

    We typically put things like this at the end of the relevant block of imports, rather than trying to keep it alphabetical (that's because it's kind of special, and the multiple-lines makes it so we can't automatically sort them anymore)

  3. 
      
MarcusBoay
Review request changed

Change Summary:

Move try except import to end of block

Commits:

Summary
-
Add manual trigger to TravisCI.
+
Add manual trigger to TravisCI.

Diff:

Revision 3 (+846 -268)

Show changes

Checks run (2 succeeded)

flake8 passed.
JSHint passed.
Loading...