Skip to content

Commit 901cdc3

Browse files
authored
Merge pull request #103 from jduimovich/use-original-images
USE_RHTAP_IMAGES flag
2 parents 0425a07 + 851ff31 commit 901cdc3

File tree

1 file changed

+19
-4
lines changed

1 file changed

+19
-4
lines changed

ci-test.sh

Lines changed: 19 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,18 @@ eval "$(hack/get-trustification-env.sh)"
77
# after the first setting, you can skip this step
88
# warning, if your secrets are stale, do not skip this step
99
SKIP_SECRETS=${SKIP_SECRETS:-false}
10+
USE_RHTAP_IMAGES=${USE_RHTAP_IMAGES:-false}
1011

1112
if [ $SKIP_SECRETS == "true" ]; then
1213
echo "WARNING SKIP_SECRETS set to true, skipping configuration of secrets"
1314
fi
15+
if [ $USE_RHTAP_IMAGES == "true" ]; then
16+
echo "USE_RHTAP_IMAGES is set to $USE_RHTAP_IMAGES"
17+
echo "Note - configuration is going to use the runner images and Jenkins from redhat-appstudio"
18+
else
19+
echo "USE_RHTAP_IMAGES is set to $USE_RHTAP_IMAGES"
20+
echo "Note - configuration is going to use the runner images#MY_QUAY_USER and Jenkins MY_GITHUB_USER"
21+
fi
1422

1523
if [ $TEST_REPO_ORG == "redhat-appstudio" ]; then
1624
echo "Cannot do CI testing using the redhat-appstudio org"
@@ -19,10 +27,17 @@ if [ $TEST_REPO_ORG == "redhat-appstudio" ]; then
1927
fi
2028

2129
function updateGitAndQuayRefs() {
22-
if [ -f $1 ]; then
23-
sed -i "s!quay.io/redhat-appstudio/rhtap-task-runner.*!quay.io/$MY_QUAY_USER/rhtap-task-runner:dev!g" $1
24-
sed -i "s!https://github.com/redhat-appstudio!https://github.com/$MY_GITHUB_USER!g" $1
25-
sed -i "s!RHTAP_Jenkins@main!RHTAP_Jenkins@dev!g" $1
30+
if [ $USE_RHTAP_IMAGES == "true" ]; then
31+
echo "USE_RHTAP_IMAGES is set to $USE_RHTAP_IMAGES"
32+
echo "No images or Jenkins references patched"
33+
else
34+
echo "USE_RHTAP_IMAGES is set to $USE_RHTAP_IMAGES"
35+
echo "images or Jenkins references patched to quay.io/$MY_QUAY_USER and github.com/$MY_GITHUB_USER"
36+
if [ -f $1 ]; then
37+
sed -i "s!quay.io/redhat-appstudio/rhtap-task-runner.*!quay.io/$MY_QUAY_USER/rhtap-task-runner:dev!g" $1
38+
sed -i "s!https://github.com/redhat-appstudio!https://github.com/$MY_GITHUB_USER!g" $1
39+
sed -i "s!RHTAP_Jenkins@.*'!RHTAP_Jenkins@dev'!g" $1
40+
fi
2641
fi
2742
}
2843

0 commit comments

Comments
 (0)