Merge pull request #4 from sartography/chore/github_branches_to_docker_tags
Chore/GitHub branches to docker tags
This commit is contained in:
commit
084c690dbf
|
@ -3,10 +3,6 @@ language: bash
|
|||
services:
|
||||
- docker
|
||||
|
||||
env:
|
||||
global:
|
||||
- COMMIT=${TRAVIS_COMMIT::8}
|
||||
|
||||
install:
|
||||
- sudo pip install --upgrade pip
|
||||
- pip install --user awscli
|
||||
|
|
|
@ -5,6 +5,8 @@ echo "$DOCKER_TOKEN" | docker login -u "$DOCKER_USERNAME" --password-stdin
|
|||
APP="db"
|
||||
REPO="sartography/cr-connect-$APP"
|
||||
TAG=$(if [ "$TRAVIS_BRANCH" == "master" ]; then echo "latest"; else echo "$TRAVIS_BRANCH" ; fi)
|
||||
COMMIT=${TRAVIS_COMMIT::8}
|
||||
|
||||
docker build -f Dockerfile -t "$REPO:$COMMIT" .
|
||||
docker tag "$REPO:$COMMIT" "$REPO:$TAG"
|
||||
docker tag "$REPO:$COMMIT" "$REPO:travis-$TRAVIS_BUILD_NUMBER"
|
||||
|
|
Loading…
Reference in New Issue