Skip to content

Commit 36736f7

Browse files
authored
Merge pull request #1044 from youngnick/release-0.4
Fix release-staging cloudbuild job - hopefully
2 parents 304e8ae + b4bd15d commit 36736f7

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

Makefile

+4-1
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,10 @@ export BASE_REF ?= master
3838
# The commit hash of the current checkout
3939
# Used to pass a binary version for master,
4040
# overridden to semver for tagged versions.
41-
export COMMIT=$(shell git rev-parse --short HEAD)
41+
# Cloudbuild will set this in the environment to the
42+
# commit SHA, since the Prow does not seem to check out
43+
# a git repo.
44+
export COMMIT ?= $(shell git rev-parse --short HEAD)
4245

4346
DOCKER ?= docker
4447
# TOP is the current directory where this Makefile lives.

cloudbuild.yaml

+3
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ steps:
1313
- DOCKER_CLI_EXPERIMENTAL=enabled
1414
- GIT_TAG=$_GIT_TAG
1515
- BASE_REF=$_PULL_BASE_REF
16+
- COMMIT=$_PULL_BASE_SHA
1617
args:
1718
- release-staging
1819
substitutions:
@@ -22,3 +23,5 @@ substitutions:
2223
# _PULL_BASE_REF will contain the ref that was pushed to to trigger this build -
2324
# a branch like 'master' or 'release-0.2', or a tag like 'v0.2'.
2425
_PULL_BASE_REF: 'master'
26+
# _PULL_BASE_SHA will contain the Git SHA of the commit that was pushed to trigger this build.
27+
_PULL_BASE_SHA: 'abcdef'

0 commit comments

Comments
 (0)