I am running Travis CI using matrix of Python versions but I do want to execute the release actions only after all of these are passed, obviously.
How can I do this? It seems that the "deploy" actions are executed for each sub-build.
It seems that this is not currently possible and there is a bug tracking it at: https://github.com/travis-ci/travis-ci/issues/929
Update
Travis disables commenting on that issue which is really a bad thing. I guess you only option now is to tweet them to reopen it. Use social pressure, works against closed business models! ;)
Also if you happen to know some competitors that do allow this, mention them! ... in the same tweet.
It is possible by using bash and Travis built-in variables. For a JavaScript / Node repo that would be:
dist: trusty
language: node_js
node_js:
- '8'
- '7'
install: ...
script: ...
after_success:
- 'if [ "${TRAVIS_NODE_VERSION}" = "8" ]; then cat ./coverage/lcov.info | coveralls ; fi'
- 'if [ "${TRAVIS_NODE_VERSION}" = "8" ]; then firebase deploy --token $FIREBASE_TOKEN --non-interactive ; fi'
Other built-in variables:
TRAVIS_DART_VERSION
TRAVIS_GO_VERSION
TRAVIS_HAXE_VERSION
TRAVIS_JDK_VERSION
TRAVIS_JULIA_VERSION
TRAVIS_NODE_VERSION
TRAVIS_OTP_RELEASE
TRAVIS_PERL_VERSION
TRAVIS_PHP_VERSION
TRAVIS_PYTHON_VERSION
TRAVIS_R_VERSION
TRAVIS_RUBY_VERSION
TRAVIS_RUST_VERSION
TRAVIS_SCALA_VERSION
See https://docs.travis-ci.com/user/environment-variables/
Credits to @airbnb/enzyme which is where I took the idea from.
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