Skip to content

Commit 35ca6e3

Browse files
committed
UPSTREAM: <carry>: fix e2e tests on release branches
1 parent a009f85 commit 35ca6e3

File tree

2 files changed

+20
-2
lines changed

2 files changed

+20
-2
lines changed

openshift/e2e-openstack.sh

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,15 @@ echo "Running e2e-openstack.sh"
77
unset GOFLAGS
88
tmp="$(mktemp -d)"
99

10-
git clone --depth=1 "https://github.com/openshift/cluster-api-provider-openstack.git" "$tmp"
10+
if [ "${PULL_BASE_REF}" == "master" ]; then
11+
# the default branch for cluster-api-provider-openstack is main.
12+
CAPO_BASE_REF="main"
13+
else
14+
CAPO_BASE_REF=$PULL_BASE_REF
15+
fi
1116

17+
echo "cloning github.com/openshift/cluster-api-provider-openstack at branch '$CAPO_BASE_REF'"
18+
git clone --single-branch --branch="$CAPO_BASE_REF" --depth=1 "https://github.com/openshift/cluster-api-provider-openstack.git" "$tmp"
19+
20+
echo "running cluster-api-provider-openstack's: make -C 'openshift' e2e"
1221
exec make -C "$tmp/openshift" e2e

openshift/e2e-tests.sh

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,15 @@ echo "Running e2e-tests.sh"
77
unset GOFLAGS
88
tmp="$(mktemp -d)"
99

10-
git clone --depth=1 "https://github.com/openshift/cluster-capi-operator.git" "$tmp"
10+
if [ "${PULL_BASE_REF}" == "master" ]; then
11+
# the default branch for cluster-capi-operator is main.
12+
CCAPIO_BASE_REF="main"
13+
else
14+
CCAPIO_BASE_REF=$PULL_BASE_REF
15+
fi
1116

17+
echo "cloning github.com/openshift/cluster-capi-operator at branch '$CCAPIO_BASE_REF'"
18+
git clone --single-branch --branch="$CCAPIO_BASE_REF" --depth=1 "https://github.com/openshift/cluster-capi-operator.git" "$tmp"
19+
20+
echo "running cluster-capi-operator's: make e2e"
1221
exec make -C "$tmp" e2e

0 commit comments

Comments
 (0)