Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docker push developer images to go-spacemesh-dev #773

Merged
merged 2 commits into from Apr 2, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
20 changes: 13 additions & 7 deletions Makefile
Expand Up @@ -22,7 +22,11 @@ PKGS = $(shell go list ./...)
PLATFORMS := windows linux darwin
os = $(word 1, $@)

DOCKER_IMAGE_NAME=go-spacemesh
ifeq ($(BRANCH),develop)
DOCKER_IMAGE_REPO := go-spacemesh
else
DOCKER_IMAGE_REPO := go-spacemesh-dev
endif

all: install build
.PHONY: all
Expand Down Expand Up @@ -115,16 +119,17 @@ cover:
.PHONY: cover

dockerbuild-go:
docker build -t $(DOCKER_IMAGE_NAME):$(BRANCH) .
docker build -t $(DOCKER_IMAGE_REPO):$(BRANCH) .
.PHONY: dockerbuild-go

dockerpush: dockerbuild-go
echo "$(DOCKER_PASSWORD)" | docker login -u "$(DOCKER_USERNAME)" --password-stdin
docker tag $(DOCKER_IMAGE_NAME):$(BRANCH) spacemeshos/$(DOCKER_IMAGE_NAME):$(BRANCH)
docker tag $(DOCKER_IMAGE_NAME):$(BRANCH) spacemeshos/$(DOCKER_IMAGE_NAME):$(SHA)

docker push spacemeshos/$(DOCKER_IMAGE_NAME):$(BRANCH)
docker push spacemeshos/$(DOCKER_IMAGE_NAME):$(SHA)
docker tag $(DOCKER_IMAGE_REPO):$(BRANCH) spacemeshos/$(DOCKER_IMAGE_REPO):$(BRANCH)
docker push spacemeshos/$(DOCKER_IMAGE_REPO):$(BRANCH)
ifeq ($(BRANCH),develop)
docker tag $(DOCKER_IMAGE_REPO):$(BRANCH) spacemeshos/$(DOCKER_IMAGE_REPO):$(SHA)
docker push spacemeshos/$(DOCKER_IMAGE_REPO):$(SHA)
endif
.PHONY: dockerpush

dockerbuild-test:
Expand All @@ -141,3 +146,4 @@ ifndef ES_PASSWD
endif
docker run -e ES_PASSWD="$(ES_PASSWD)" -e GOOGLE_APPLICATION_CREDENTIALS=./spacemesh.json -it go-spacemesh-python pytest -s test_bs.py --tc-file=config.yaml --tc-format=yaml
.PHONY: dockerrun-test