Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add pipeline for tagged release #122

Merged
merged 1 commit into from
Jul 26, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 12 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,20 @@ jobs:
- docker build -t tomochain/tomomaster .
deploy:
provider: script
script: bash docker_push.sh
script:
- bash docker_push.sh latest
- bash docker_push.sh $TRAVIS_BUILD_ID
on:
branch: master
tags: false
deploy:
provider: script
script:
- bash docker_push.sh latest
- bash docker_push.sh $TRAVIS_TAG
on:
branch: master
tags: true
- stage: Trigger rebuild of infrastructure images
sudo: false
install: skip
Expand Down
6 changes: 2 additions & 4 deletions docker_push.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
#!/bin/bash

echo "$DOCKER_PASSWORD" | docker login --username "$DOCKER_USERNAME" --password-stdin
docker tag tomochain/tomomaster tomochain/tomomaster:latest
docker tag tomochain/tomomaster tomochain/tomomaster:$TRAVIS_BUILD_ID
docker push tomochain/tomomaster:latest
docker push tomochain/tomomaster:$TRAVIS_BUILD_ID
docker tag tomochain/tomomaster tomochain/tomomaster:$1
docker push tomochain/tomomaster:$1