How to start a single deployment upon successful completion of the Travis build?

I am launching Travis CI using the Python version matrix, but I want to complete the release actions only after all of them are completed, obviously.

How can i do this? Expand actions seem to be performed for each substring.

+5
source share
2 answers

This seems to be impossible at the moment, and there is a bug tracking it: https://github.com/travis-ci/travis-ci/issues/929

Update

Travis disables commenting on this issue, which is really bad. I assume that now you can only change them to open it again. Use social pressure, works against closed business models !;)

Also, if you are aware of some competitors that allow this, mention it! ... in the same tweet.

+4
source

This is possible using the bash and Travis built-in variables. For a JavaScript / Node repository that will 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 @ airbnb / feren , where did I get this idea.

+1
source

Source: https://habr.com/ru/post/1210671/


All Articles