Skip to content

Commit

Permalink
frontend: Tweak image and push Makefile targets
Browse files Browse the repository at this point in the history
- image: Skip if the docker image already exists.
- push: Depends on image target.
  • Loading branch information
Matthew Barnes committed May 23, 2024
1 parent 3d4086e commit cce1cb2
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions frontend/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,17 @@ frontend:
clean:
rm -f aro-hcp-frontend

build-push: image push
build-push: image push

image:
ifeq ($(shell docker images --filter reference=${ARO_HCP_FRONTEND_IMAGE} --quiet),)
pushd .. && git archive --output frontend/archive.tar.gz HEAD && popd
docker build --platform="linux/amd64" -f "./Dockerfile" -t ${ARO_HCP_FRONTEND_IMAGE} .
rm -f archive.tar.gz
endif

push:
docker push ${ARO_HCP_FRONTEND_IMAGE}
push: image
docker push ${ARO_HCP_FRONTEND_IMAGE}

deploy:
@test "${RESOURCEGROUP}" != "" || (echo "RESOURCEGROUP must be defined" && exit 1)
Expand Down

0 comments on commit cce1cb2

Please sign in to comment.