Skip to content

Commit

Permalink
Use commit SHA for image tags by default (#3086)
Browse files Browse the repository at this point in the history
  • Loading branch information
martinmaly authored May 4, 2022
1 parent 840e7a1 commit 810f425
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion porch/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,16 @@ MODULES = \
# GCP project to use for development
export GCP_PROJECT_ID ?= $(shell gcloud config get-value project)
export IMAGE_REPO ?= gcr.io/$(GCP_PROJECT_ID)
export IMAGE_TAG ?= latest
export IMAGE_TAG
ifndef IMAGE_TAG
git_tag := $(shell git rev-parse --short HEAD || "latest" )
$(shell git diff --quiet)
ifneq ($(.SHELLSTATUS), 0)
git_tag := $(git_tag)-dirty
endif

IMAGE_TAG=$(git_tag)
endif

PORCH_SERVER_IMAGE ?= porch-server
PORCH_FUNCTION_RUNNER_IMAGE ?= porch-function-runner
Expand Down

0 comments on commit 810f425

Please sign in to comment.