You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Travis: docker push at deploy instead of after_success? #12
I found a tip for docker push. This tip can be used for not only multiarch/fedora, but also other multiarch/*.
Right now our .travis.yml's docker push logic is like this.
after_success:
- |
if [[ $TRAVIS_BRANCH == 'master' && $TRAVIS_PULL_REQUEST == 'false' ]]; then
docker login -u="$DOCKER_USERNAME" -p="$DOCKER_PASSWORD" "$DOCKER_SERVER" && \
docker push $DOCKER_REPO
fi
This logic 's challenge is
We cat not catch an script failure in the process of after_success. If the error happens in it, the Travis CI still succeeds.
I assume when using deploy: for docker login and docker push, we can catch an error in the deploy, also can write conditional statement like "if branch == master" simply.
Activity