Stop all builds on the same PR when a new job starts
MIT License
DEPRECATED Travis will ship this as a feature in Q12017, currently in beta if you ask them.
Stop all builds on the same PR when a new job starts.
Pro: simple / fast Con: your travis token is sent via the web to a hosted service
Generate new token
, use name Travis Dedup
with scopes repo (all)
and user (all)
curl -X POST "https://api.travis-ci.com/auth/github" -d "github_token=YOUR_GITHUB_TOKEN"
https://travis-dedup.herokuapp.com/github?repo=your_org/your_repo&token=YOUR_ACCESS_TOKEN
&pro=true
if you are using travis.com / private travis&branches=true
if you also want to dedup builds on branches (like master
or others)Pro: travis token is never sent over the web Con: more complicated
TRAVIS_ACCESS_TOKEN
is set, token parameter is no longer requiredA
, but use your own heroku subdomainPro: no webservice required / token stays on travis Con: slow to install gem / complicated with multiple envs
travis encrypt TRAVIS_ACCESS_TOKEN=YOUR_ACCESS_TOKEN
.travis.yml
before_install: gem install travis_dedup && travis-dedup your_org/your_repo $TRAVIS_ACCESS_TOKEN --pro
global: + matrix:
matrix: GROUP=misc
+ before_install: "([ $GROUP = 'misc' ] && gem i travis_dedup && travis-dedup ... ) || [ $GROUP != 'misc' ]"
optionally generate the token at runtime via curl, but keeping the access token around is far less dangerous
Michael Grosser [email protected] License: MIT