Skip to content

Commit

Permalink
Merge pull request #1262 from edenia/fix/cicd
Browse files Browse the repository at this point in the history
fix(makefile): update container variable reference
  • Loading branch information
xavier506 authored Aug 23, 2023
2 parents 1abd70d + 4ef7fbb commit 7af4267
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions hapi-evm/makefile
Original file line number Diff line number Diff line change
Expand Up @@ -17,26 +17,26 @@ run: node_modules

build-docker: ##@devops Build the docker image
build-docker: ./Dockerfile
@docker pull $(DOCKER_REGISTRY)/$(IMAGE_NAME_HAPI):$(VERSION) || true
@docker pull $(DOCKER_REGISTRY)/$(IMAGE_NAME_HAPI_EVM):$(VERSION) || true
@docker build \
--target release \
-t $(DOCKER_REGISTRY)/$(IMAGE_NAME_HAPI):$(VERSION) \
-t $(DOCKER_REGISTRY)/$(IMAGE_NAME_HAPI):$(LATEST_TAG) \
-t $(DOCKER_REGISTRY)/$(IMAGE_NAME_HAPI_EVM):$(VERSION) \
-t $(DOCKER_REGISTRY)/$(IMAGE_NAME_HAPI_EVM):$(LATEST_TAG) \
.

pull-image: ##@devops Pull the latest image from registry for caching
pull-image:
@docker pull $(DOCKER_REGISTRY)/$(IMAGE_NAME_HAPI):$(LATEST_TAG) || true
@docker pull $(DOCKER_REGISTRY)/$(IMAGE_NAME_HAPI_EVM):$(LATEST_TAG) || true

build-docker-cached: ##@devops Build the docker image using cached layers
build-docker-cached: ./Dockerfile
@docker build \
--target prod-stage \
--cache-from $(DOCKER_REGISTRY)/$(IMAGE_NAME_HAPI):$(LATEST_TAG) \
-t $(DOCKER_REGISTRY)/$(IMAGE_NAME_HAPI):$(VERSION) \
-t $(DOCKER_REGISTRY)/$(IMAGE_NAME_HAPI):$(LATEST_TAG) \
--cache-from $(DOCKER_REGISTRY)/$(IMAGE_NAME_HAPI_EVM):$(LATEST_TAG) \
-t $(DOCKER_REGISTRY)/$(IMAGE_NAME_HAPI_EVM):$(VERSION) \
-t $(DOCKER_REGISTRY)/$(IMAGE_NAME_HAPI_EVM):$(LATEST_TAG) \
.

push-image: ##@devops Push the freshly built image and tag with release or latest tag
push-image:
@docker push $(DOCKER_REGISTRY)/$(IMAGE_NAME_HAPI):$(VERSION)
@docker push $(DOCKER_REGISTRY)/$(IMAGE_NAME_HAPI_EVM):$(VERSION)

0 comments on commit 7af4267

Please sign in to comment.