Skip to content

Commit 0e4e441

Browse files
committed
[installer-tests] avoid cleaning up preview setup for release branches
1 parent dc5a03b commit 0e4e441

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

.werft/jobs/build/self-hosted-upgrade-tests.ts

+5
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,11 @@ export async function triggerUpgradeTests(werft: Werft, config: JobConfig, usern
4646
exec(`git config --global user.name "${username}"`);
4747
var annotation = `-a version=${config.fromVersion} -a upgrade=true -a channel=${channel} -a preview=true -a skipTests=true`;
4848

49+
// the following bit make sure that the subdomain stays the same upon multiple runs, and always start with release
50+
const regex = /[\/,\.]/ig;
51+
const subdomain: string = config.repository.branch.replaceAll(regex, '-')
52+
annotation = annotation.concat(`-a subdomain=${subdomain}`)
53+
4954
for (let phase in phases) {
5055
const upgradeConfig = phases[phase];
5156

install/tests/cleanup.sh

+1
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ for i in $(gsutil ls gs://nightly-tests/tf-state); do
2525
cloud=$(echo "$TF_VAR_TEST_ID" | sed 's/\(.*\)-/\1 /' | xargs | awk '{print $2}')
2626

2727
if [[ "$TF_VAR_TEST_ID" == gitpod-* ]] ; then echo "$TF_VAR_TEST_ID has the pattern gitpod-*, skipping"; continue; fi
28+
if [[ "$TF_VAR_TEST_ID" == release-* ]] ; then echo "$TF_VAR_TEST_ID has the pattern gitpod-*, skipping"; continue; fi
2829

2930
if [ "$TF_VAR_TEST_ID" = "default" ] || [ "$TF_VAR_TEST_ID" = "" ]; then continue; fi
3031

0 commit comments

Comments
 (0)