Add manual trigger run and retry for TravisCI integration.

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

Information

rbintegrations
master

Reviewers

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 ID
Add manual trigger to TravisCI.
Add unit tests for TravisCI manual trigger.
7727980671a8ce70a5a714944178a8c9acd1a277
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

I think that there should be a period at the end of this comment.

jblazusijblazusi

Similarly, I think that there should be a period at the end of this comment.

jblazusijblazusi

I believe this """ should be on the next line.

jblazusijblazusi

I believe this """ should be on the next line.

jblazusijblazusi

I believe this """ should be on the next line.

jblazusijblazusi

I believe this """ should be on the next line.

jblazusijblazusi

Please remove the period at the end of this docstring, since the test runner will append an ellipsis.

daviddavid

Same here.

daviddavid

Same here.

daviddavid

Same here.

daviddavid

Same here.

daviddavid

The grammar is funky here, but more importantly, I'm not sure we need this comment. This text seems to be …

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
jblazusi
  1. Looks good, just found some nit picks regarding the styling on the comments. I am not 100% certain about all of them. So perhaps the mentors could verify.

  2. rbintegrations/travisci/forms.py (Diff revision 3)
     
     

    I think that there should be a period at the end of this comment.

  3. rbintegrations/travisci/integration.py (Diff revision 3)
     
     

    Similarly, I think that there should be a period at the end of this comment.

  4. rbintegrations/travisci/tests.py (Diff revision 3)
     
     

    I believe this """ should be on the next line.

  5. rbintegrations/travisci/tests.py (Diff revision 3)
     
     

    I believe this """ should be on the next line.

  6. rbintegrations/travisci/tests.py (Diff revision 3)
     
     

    I believe this """ should be on the next line.

  7. rbintegrations/travisci/tests.py (Diff revision 3)
     
     

    I believe this """ should be on the next line.

  8. 
      
MarcusBoay
david
  1. 
      
  2. rbintegrations/travisci/tests.py (Diff revision 4)
     
     

    Please remove the period at the end of this docstring, since the test runner will append an ellipsis.

  3. rbintegrations/travisci/tests.py (Diff revision 4)
     
     

    Same here.

  4. rbintegrations/travisci/tests.py (Diff revision 4)
     
     

    Same here.

  5. rbintegrations/travisci/tests.py (Diff revision 4)
     
     

    Same here.

  6. rbintegrations/travisci/tests.py (Diff revision 4)
     
     

    Same here.

  7. 
      
MarcusBoay
david
  1. 
      
  2. rbintegrations/travisci/integration.py (Diff revision 5)
     
     

    The grammar is funky here, but more importantly, I'm not sure we need this comment. This text seems to be modeled on the previously-existing comment about review requests lacking diffs, but I'm not sure it adds useful information. The matching configs are literally what will get built--this isn't a filtering step in the way that the check for diffs is.

  3. 
      
bnie
  1. 
      
  2. Other than the issue David mentioned above, everything looks good to me.

  3. 
      
MarcusBoay
david
  1. Ship It!
  2. 
      
MarcusBoay
Review request changed

Status: Closed (submitted)

Change Summary:

Pushed to release-2.0.x (5d6e94f)
Loading...