TRAVIS_BUILD_STAGE_NAME not populated

Hi everyone,

We’ve created a workaround that looks like this:

after_success: 
  - "[[ $TRAVIS_TEST_RESULT = 0 ]] && echo passed"
after_failure: 
  - "[[ $TRAVIS_TEST_RESULT = 1 ]] && echo failed"

So a working .travis.yml that we’ve tested is as follows:

os: linux
language: shell
install: skip

before_deploy:
  - if [[ $TRAVIS_TEST_RESULT == 1 ]]; then echo "exiting due to failed build"; sleep 2; exit 1; fi
deploy:
  provider: s3
  script: ./deploy.sh
  on:
    branch: minimal-build-check
  edge: true

jobs:
  include:
    - name: PASSING
      script:
        - sleep 2
    - name: FAILING
      script:
        - false

Make sure edge: true is present as this may curb any stashing issues you run into. Let me know if this works.

Cheers,
Montana

1 Like