#4 Improve backup PVC Makefile
This commit is contained in:
parent
a408112875
commit
83f413dfe0
|
|
@ -67,7 +67,7 @@ endif
|
|||
|
||||
define e2e
|
||||
echo "\nRunning $(1) e2e test";
|
||||
@e2e/$(1)/test.sh $(DOCKER_REGISTRY)/$(NAME):$(GITCOMMIT);
|
||||
@e2e/$(1)/test.sh $(DOCKER_REGISTRY)-$(NAME):$(GITCOMMIT);
|
||||
endef
|
||||
|
||||
.PHONY: docker-e2e
|
||||
|
|
@ -83,7 +83,7 @@ docker-login: ## Log in into the Docker repository
|
|||
.PHONY: docker-build
|
||||
docker-build: check-env ## Build the container
|
||||
@echo "+ $@"
|
||||
docker build . -t $(DOCKER_REGISTRY)/$(NAME):$(GITCOMMIT) --file Dockerfile
|
||||
docker build . -t $(DOCKER_REGISTRY)-$(NAME):$(GITCOMMIT) --file Dockerfile
|
||||
|
||||
.PHONY: docker-images
|
||||
docker-images: ## List all local containers
|
||||
|
|
@ -91,22 +91,22 @@ docker-images: ## List all local containers
|
|||
docker images
|
||||
|
||||
.PHONY: docker-push
|
||||
docker-push: ## Push the container
|
||||
docker-push: docker-build ## Push the container
|
||||
@echo "+ $@"
|
||||
docker tag $(DOCKER_REGISTRY)/$(NAME):$(GITCOMMIT) $(DOCKER_ORGANIZATION)/$(DOCKER_REGISTRY)/$(NAME):$(BUILD_TAG)
|
||||
docker push $(DOCKER_ORGANIZATION)/$(DOCKER_REGISTRY)/$(NAME):$(BUILD_TAG)
|
||||
docker tag $(DOCKER_REGISTRY)-$(NAME):$(GITCOMMIT) $(DOCKER_ORGANIZATION)/$(DOCKER_REGISTRY)-$(NAME):$(BUILD_TAG)
|
||||
docker push $(DOCKER_ORGANIZATION)/$(DOCKER_REGISTRY)-$(NAME):$(BUILD_TAG)
|
||||
|
||||
.PHONY: docker-release-version
|
||||
docker-release-version: ## Release image with version tag (in addition to build tag)
|
||||
docker-release-version: docker-build ## Release image with version tag (in addition to build tag)
|
||||
@echo "+ $@"
|
||||
docker tag $(DOCKER_REGISTRY)/$(NAME):$(GITCOMMIT) $(DOCKER_ORGANIZATION)/$(DOCKER_REGISTRY)/$(NAME):$(VERSION_TAG)
|
||||
docker push $(DOCKER_ORGANIZATION)/$(DOCKER_REGISTRY)/$(NAME):$(VERSION_TAG)
|
||||
docker tag $(DOCKER_REGISTRY)-$(NAME):$(GITCOMMIT) $(DOCKER_ORGANIZATION)/$(DOCKER_REGISTRY)-$(NAME):$(VERSION_TAG)
|
||||
docker push $(DOCKER_ORGANIZATION)/$(DOCKER_REGISTRY)-$(NAME):$(VERSION_TAG)
|
||||
|
||||
.PHONY: docker-release-latest
|
||||
docker-release-latest: ## Release image with latest tags (in addition to build tag)
|
||||
docker-release-latest: docker-build ## Release image with latest tags (in addition to build tag)
|
||||
@echo "+ $@"
|
||||
docker tag $(DOCKER_REGISTRY)/$(NAME):$(GITCOMMIT) $(DOCKER_ORGANIZATION)/$(DOCKER_REGISTRY)/$(NAME):$(LATEST_TAG)
|
||||
docker push $(DOCKER_ORGANIZATION)/$(DOCKER_REGISTRY)/$(NAME):$(LATEST_TAG)
|
||||
docker tag $(DOCKER_REGISTRY)-$(NAME):$(GITCOMMIT) $(DOCKER_ORGANIZATION)/$(DOCKER_REGISTRY)-$(NAME):$(LATEST_TAG)
|
||||
docker push $(DOCKER_ORGANIZATION)/$(DOCKER_REGISTRY)-$(NAME):$(LATEST_TAG)
|
||||
|
||||
.PHONY: docker-release
|
||||
docker-release: docker-release-version docker-release-latest ## Release image with version and latest tags (in addition to build tag)
|
||||
|
|
@ -124,7 +124,7 @@ endif
|
|||
docker-run: docker-build ## Run the container in docker, you can use EXTRA_ARGS
|
||||
@echo "+ $@"
|
||||
docker run --rm -i $(DOCKER_FLAGS) \
|
||||
$(DOCKER_REGISTRY)/$(NAME):$(GITCOMMIT) $(ARGS)
|
||||
$(DOCKER_REGISTRY)-$(NAME):$(GITCOMMIT) $(ARGS)
|
||||
|
||||
.PHONY: bump-version
|
||||
BUMP := patch
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
# Setup variables for the Makefile
|
||||
NAME=pvc
|
||||
DOCKER_ORGANIZATION=virtuslab
|
||||
DOCKER_REGISTRY=jenkins-operator/backup
|
||||
DOCKER_REGISTRY=jenkins-operator-backup
|
||||
Loading…
Reference in New Issue