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_VERSIONTRAVIS_GO_VERSIONTRAVIS_HAXE_VERSIONTRAVIS_JDK_VERSIONTRAVIS_JULIA_VERSION TRAVIS_NODE_VERSIONTRAVIS_OTP_RELEASETRAVIS_PERL_VERSIONTRAVIS_PHP_VERSIONTRAVIS_PYTHON_VERSIONTRAVIS_R_VERSIONTRAVIS_RUBY_VERSIONTRAVIS_RUST_VERSIONTRAVIS_SCALA_VERSIONSee 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