Skip to content

Commit

Permalink
Login to Docker Hub on CI
Browse files Browse the repository at this point in the history
  • Loading branch information
maxekman committed Dec 21, 2020
1 parent e9410af commit bbab027
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 2 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,13 @@ jobs:
include:
- stage: test
if: type == pull_request
script: make run_services test
script: make docker_login run_services test
env:
- GO111MODULE=on

- stage: test_and_cover
name: "Test (with coverage)"
if: type != pull_request
script: make run_services cover publish_cover
script: make docker_login run_services cover publish_cover
env:
- GO111MODULE=on
4 changes: 4 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,10 @@ publish_cover: cover
gover
@goveralls -coverprofile=gover.coverprofile -service=travis-ci -repotoken=$(COVERALLS_TOKEN)

.PHONY: docker_login
docker_login:
echo "$(DOCKER_TOKEN)" | docker login --username $(DOCKER_USER) --password-stdin

.PHONY: run_services
run_services:
docker-compose up -d mongo gpubsub
Expand Down

0 comments on commit bbab027

Please sign in to comment.