I'd like to disable, or turn off, Travis CI builds for stretches of time. In my case it's because I'm using a private repo and don't want to use up free builds. Also, there are times down the road I'll want to disable Travis builds while experimenting with new features.
There are 2 methods to do this but neither is ideal:
[ci skip]
or [skip ci]
to a commit message - this would become tediousWhat I'm looking for is a way to disable builds for a few days at a time, in my project, without completely deleting the .travis.yml
file?
Is it possible to disable Travis CI builds via a config setting in .travis.yml
?
Something like this:
enabled: false // Travis CI builds turned off
language: node_js
node_js:
- "6.11.2"
deploy:
provider: heroku
api_key:
secure: [KEY]
app: [APP-NAME]
If you do not create any job (or creates too many) in .travis.yml
, the build request will be rejected.
For example:
language: ruby
rvm: '2.4'
matrix:
exclude:
rvm: '2.4'
This may be impractical depending on how complex your intended configuration is.
You'd probably want to use a CLI client https://github.com/travis-ci/travis.rb . See https://github.com/travis-ci/travis.rb#enable and https://github.com/travis-ci/travis.rb#disable .
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.