Skip to content

Commit 582ac2f

Browse files
committed
Allow verify directories to already exist
Allow the hypershift and client-fo directories to already exist. This means that when you use `/testwith`, which clones the working code out from another PR, we can leverage that code rather than the main branch content.
1 parent b64d45d commit 582ac2f

1 file changed

Lines changed: 9 additions & 3 deletions

File tree

ci-operator/config/openshift/api/openshift-api-master.yaml

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,9 @@ tests:
8383
- as: verify-client-go
8484
commands: |
8585
dir=$GOPATH/src/github.com/openshift/client-go
86-
git clone https://github.com/openshift/client-go --branch ${PULL_BASE_REF:-master} --single-branch $dir
86+
if [ -d $dir ]; then
87+
git clone https://github.com/openshift/client-go --branch ${PULL_BASE_REF:-master} --single-branch $dir
88+
fi
8789
rm -rf $dir/vendor/github.com/openshift/api/*
8890
cp -Rf ./ $dir/api/
8991
rm -rf $dir/api/vendor
@@ -99,8 +101,12 @@ tests:
99101
- as: verify-hypershift-integration
100102
commands: |
101103
dir=$GOPATH/src/github.com/openshift/hypershift
102-
git clone https://github.com/openshift/hypershift --branch main --single-branch $dir
103-
git clone https://github.com/openshift/client-go --branch master --single-branch $dir/openshift-client-go
104+
if [ -d $dir ]; then
105+
git clone https://github.com/openshift/hypershift --branch main --single-branch $dir
106+
fi
107+
if [ -d $dir/openshift-client-go ]; then
108+
git clone https://github.com/openshift/client-go --branch master --single-branch $dir/openshift-client-go
109+
fi
104110
rm -rf $dir/vendor/github.com/openshift/api/*
105111
rm -rf $dir/vendor/github.com/openshift/client-go/*
106112
cp -Rf ./ $dir/openshift-api/

0 commit comments

Comments
 (0)