Browse Source

push tags and version (prevent deleting all tags)

master
Nicolas Mertens 7 months ago
parent
commit
b01b3cc409
  1. 12
      Makefile

12
Makefile

@ -5,15 +5,10 @@ TAG := aaalpha
VERSION := 0.0.1-aaa
clean:
docker image ls
$(DOCKER_CLI) image rm $(TARGET)
docker image ls
dockerbuild: Dockerfile clean
dockerbuild: Dockerfile
$(DOCKER_CLI) build . -t $(TARGET):$(VERSION)
bambooagentbuild: Dockerfile clean
bambooagentbuild: Dockerfile
$(DOCKER_CLI) build . -t $(TARGET):$(VERSION) --build-arg HTTP_PROXY="http://ceala05956.emea.zurich.corp:8080/" \
--build-arg HTTPS_PROXY="http://ceala05956.emea.zurich.corp:8080/" \
--build-arg http_proxy="http://ceala05956.emea.zurich.corp:8080/" \
@ -32,7 +27,8 @@ publish-with-tag: bambooagentbuild
$(DOCKER_CLI) login -u "$$NEXUS_USER" -p "$$NEXUS_PASSWORD" $(DOCKER_REGISTRY) ||exit 1; \
$(DOCKER_CLI) tag $(TARGET):$(VERSION) $(TARGET):$(TAG) ||exit 1; \
docker image ls
$(DOCKER_CLI) push --all-tags $(TARGET) ||exit 1; \
$(DOCKER_CLI) push $(TARGET):$(VERSION) ||exit 1; \
$(DOCKER_CLI) push $(TARGET):$(TAG) ||exit 1; \
$(DOCKER_CLI) logout $(DOCKER_REGISTRY) ||exit 1 \
echo "=> Build Successfull !To download image please run: 'docker pull $(TARGET):$(TAG)'"

Loading…
Cancel
Save