Skip to content

Commit 410b49d

Browse files
jleboncgwalters
authored andcommittedDec 6, 2021
ci/prow-rhcos.sh: check both OPENSHIFT_BUILD_REFERENCE and PULL_BASE_REF
In rehearsal CI jobs on PRs to openshift/release, the first will be correct but not the second (which will instead be the base ref of that repo).
1 parent 862dd51 commit 410b49d

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed
 

‎ci/prow-rhcos.sh

+4-2
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,10 @@
22
# Entrypoint run via OpenShift Prow (https://docs.ci.openshift.org/)
33
# that tests RHCOS (openshift/os).
44
set -xeuo pipefail
5-
# https://github.com/kubernetes/test-infra/blob/master/prow/jobs.md
6-
BRANCH=${PULL_BASE_REF:-main}
5+
# PULL_BASE_REF: https://github.com/kubernetes/test-infra/blob/master/prow/jobs.md
6+
# But prefer OPENSHIFT_BUILD_REFERENCE if available, which is more correct in
7+
# rehearsal jobs: https://github.com/coreos/coreos-assembler/pull/2598
8+
BRANCH=${OPENSHIFT_BUILD_REFERENCE:-${PULL_BASE_REF:-main}}
79
case ${BRANCH} in
810
# For now; OpenShift hasn't done the master->main transition
911
main|master) RHCOS_BRANCH=master;;

0 commit comments

Comments
 (0)
Please sign in to comment.