Skip to content

Commit

Permalink
Merge pull request #5 from ONSdigital/eq-2922-push-images-to-containe…
Browse files Browse the repository at this point in the history
…r-registry-from-travis

Push images to GCR from Travis
  • Loading branch information
bitdivision authored May 22, 2019
2 parents 1c25cdd + ca3a25f commit c29d27c
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
language: go

go:
- 1.9
- 1.12.x

services:
- docker
Expand All @@ -12,13 +12,13 @@ install:
script:
- go get -u github.com/golang/dep/cmd/dep
- dep ensure
- docker login -u $DOCKER_USERNAME -p $DOCKER_PASSWORD
- go get -t ./...
- CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo
- export TAG=`if [ "$TRAVIS_PULL_REQUEST_BRANCH" == "" ]; then echo "latest"; else echo $TRAVIS_PULL_REQUEST_BRANCH; fi`
- docker build -t onsdigital/eq-questionnaire-launcher:$TAG .
- export TAG="${TRAVIS_PULL_REQUEST_BRANCH:-latest}"
- docker build -t eu.gcr.io/census-eq-ci/eq-questionnaire-launcher:"$TAG" .
- echo "$DOCKER_GCR_PASSWORD" | base64 --decode | docker login -u "$DOCKER_GCR_USERNAME" --password-stdin https://eu.gcr.io
- echo "Pushing with tag [$TAG]"
- docker push onsdigital/eq-questionnaire-launcher:$TAG
- docker push eu.gcr.io/census-eq-ci/eq-questionnaire-launcher:"$TAG"

branches:
only:
Expand Down

0 comments on commit c29d27c

Please sign in to comment.