Each time I push to Github, it appears to trigger two Travis CI builds - one for the PR and one for the Push itself. They also appear to be separate builds, judging by the links.
What's the exact difference between the two, and how can I enable it so that only one runs?
Like Jenkins, Travis CI is also one of the early players in the CI/CD tools market. The tool is written in Ruby and is developed & maintained by the Travis CI community. Travis CI was earlier available only for GitHub hosted projects but now it also supports Bitbucket hosted projects.
A Pull Request Build is a build of a non-production branch of your site. Pull Request Builds are intended to show the impact of potential code changes before merging those changes into your production branch.
You can uncheck either building pushes or PRs in the TravisCI settings for the repository:
The difference between them is:
/pr
builds automerged state (as if you merged the PR and ran the tests on that, note: it won't run if the PR can't be automerged)./push
builds for the current state of the branch you pushed to (as if you ran the tests on your local copy you just pushed),What's happening in your scenario looks like this:
continuous-integration/travis-ci/push
- only run test on branch
continuous-integration/travis-ci/pr
- merge and run tests
And this is completely okay - but if you want to get rid of one of the builds you need to disable Build pushes
or Build pull requests
in your project settings on Travis.
Sources:
https://github.com/travis-ci/travis-ci/issues/1504
https://github.com/twisted/twistedchecker/pull/93
https://blog.travis-ci.com/2014-03-05-repository-settings/
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With