Skip to content

Commit

Permalink
chore: 🤖 build and push in one stage
Browse files Browse the repository at this point in the history
  • Loading branch information
jaskaransarkaria committed Jun 21, 2020
1 parent 4e642cd commit dbe5674
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,13 @@ jobs:
name: "Unit Tests"
script: go test -v ./...
- stage: "Build Docker Image"
name: "Build docker image"
script: docker build -t jaskaransarkaria/timer-server:"${TRAVIS_TAG}" .
- stage:
name: "Push Docker Image"
name: "Build and Push docker image"
script: |
docker build -t jaskaransarkaria/timer-server:"$TRAVIS_TAG" .
echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin
docker push jaskaransarkaria/timer-server:"${TRAVIS_TAG}"
docker push jaskaransarkaria/timer-server:"$TRAVIS_TAG"
stages:
- Tests and Linting
- name: "Build Docker Image"
- name: "Build and Push Docker Image"
if: tag IS present
- "Push Docker Image"

0 comments on commit dbe5674

Please sign in to comment.