Skip to content

Commit

Permalink
Merge pull request #24 from Krzysztof-Szyper-Epam/rmi-failed
Browse files Browse the repository at this point in the history
Don't fail docker rmi when image don't exist.
  • Loading branch information
ChristophShyper authored Dec 4, 2019
2 parents d2a4d56 + 83bd882 commit 738b8f8
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -58,16 +58,16 @@ ifeq ($(CURRENT_BRANCH),$(RELEASE_BRANCH))
@docker tag $(DOCKER_NAME):$(VERSION) $(DOCKER_NAME):latest
@docker tag $(DOCKER_NAME):$(VERSION) $(DOCKER_NAME):build-$(BUILD_NUMBER)
@docker push $(DOCKER_NAME)
@docker rmi $(DOCKER_NAME):$(VERSION) $(DOCKER_NAME):latest
@docker rmi $(DOCKER_NAME):$(VERSION) $(DOCKER_NAME):build-$(BUILD_NUMBER)
@docker rmi $(DOCKER_NAME):$(VERSION) $(DOCKER_NAME):$(VERSION)
@docker rmi $(DOCKER_NAME):$(VERSION) $(DOCKER_NAME):latest || true
@docker rmi $(DOCKER_NAME):$(VERSION) $(DOCKER_NAME):build-$(BUILD_NUMBER) || true
@docker rmi $(DOCKER_NAME):$(VERSION) $(DOCKER_NAME):$(VERSION) || true
else
@docker tag $(DOCKER_NAME):$(VERSION) $(DOCKER_NAME):$(CURRENT_BRANCH)-$(VERSION)
@docker tag $(DOCKER_NAME):$(VERSION) $(DOCKER_NAME):$(CURRENT_BRANCH)-latest
@docker push $(DOCKER_NAME)
@docker rmi $(DOCKER_NAME):$(VERSION) $(DOCKER_NAME):$(CURRENT_BRANCH)-$(VERSION)
@docker rmi $(DOCKER_NAME):$(VERSION) $(DOCKER_NAME):$(CURRENT_BRANCH)-latest
@docker rmi $(DOCKER_NAME):$(VERSION) $(DOCKER_NAME):$(VERSION)
@docker rmi $(DOCKER_NAME):$(VERSION) $(DOCKER_NAME):$(CURRENT_BRANCH)-$(VERSION) || true
@docker rmi $(DOCKER_NAME):$(VERSION) $(DOCKER_NAME):$(CURRENT_BRANCH)-latest || true
@docker rmi $(DOCKER_NAME):$(VERSION) $(DOCKER_NAME):$(VERSION) || true
endif

build-and-push: docker-build docker-push clean

0 comments on commit 738b8f8

Please sign in to comment.