Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use commit SHA for image tags by default #3086

Merged
merged 1 commit into from
May 4, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is neat. I will steal this bit for kpt version as well.


IMAGE_TAG=$(git_tag)
endif

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