Skip to content

Commit

Permalink
Merge pull request #10 from zkhan12/master
Browse files Browse the repository at this point in the history
automate travis push to docker
  • Loading branch information
jdkent authored Apr 15, 2020
2 parents f1f8818 + 74edd08 commit 845b120
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
6 changes: 6 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,9 @@ before_install:
script:
- docker run --entrypoint /bin/bash hbclab/accel-bids -c ". activate accel; pytest /home/coder/projects"

deploy:
provider: script
script: bash docker_push.sh
on:
branch: master
tags: true
9 changes: 9 additions & 0 deletions docker_push.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
echo "$DOCKER_PASS" | docker login --username "$DOCKER_USERNAME" --password-stdin
# if tag is defined
if [[ ! -z "$TRAVIS_TAG"]]; then
docker push hbclab/accel-bids:$TRAVIS_TAG
# if the build is on the master branch
elif [[ "$TRAVIS_BRANCH" == "master" ]]; then
docker push hbclab/accel-bids:unstable
else
echo "This build is not on the master branch or a tagged release"

0 comments on commit 845b120

Please sign in to comment.