Skip to content

Commit 02496b2

Browse files
committed
[installer-tests] fix the subdomain for upgrade tests to include the provider
1 parent 66be58d commit 02496b2

File tree

3 files changed

+16
-7
lines changed

3 files changed

+16
-7
lines changed

.werft/installer-tests.ts

+1
Original file line numberDiff line numberDiff line change
@@ -313,6 +313,7 @@ export async function installerTests(config: TestConfig) {
313313
new Error("Upgrade test failed"),
314314
slackHook.get("self-hosted-jobs"),
315315
);
316+
console.log("Upgrade tests have failed, please inspect!")
316317

317318
return;
318319
}

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

+5-5
Original file line numberDiff line numberDiff line change
@@ -44,19 +44,19 @@ export async function triggerUpgradeTests(werft: Werft, config: JobConfig, usern
4444
const channel: string = config.replicatedChannel || "beta";
4545

4646
exec(`git config --global user.name "${username}"`);
47-
var annotation = `-a version=${config.fromVersion} -a upgrade=true -a channel=${channel} -a preview=true -a skipTests=true`;
47+
var annotation = ` -a deps=external -a version=${config.fromVersion} -a upgrade=true -a channel=${channel} -a preview=true -a skipTests=true`;
4848

4949
// the following bit make sure that the subdomain stays the same upon multiple runs, and always start with release
50-
const regex = /[\/,\.]/g;
51-
const subdomain: string = config.repository.branch.replace(regex, '-')
52-
annotation = annotation.concat(` -a subdomain=${subdomain}`)
50+
// const regex = /[\/,\.]/g;
51+
// const subdomain: string = config.repository.branch.replace(regex, '-')
52+
const subdomain: string = "release"
5353

5454
for (let phase in phases) {
5555
const upgradeConfig = phases[phase];
5656

5757
werft.phase(upgradeConfig.phase, upgradeConfig.description);
5858

59-
annotation = `${annotation} -a cluster=${phase} -a updateGitHubStatus=gitpod-io/gitpod`
59+
annotation = `${annotation} -a cluster=${phase} -a updateGitHubStatus=gitpod-io/gitpod -a subdomain=${subdomain}-${upgradeConfig.cloud}`
6060

6161
const testFile: string = `.werft/${phase}-installer-tests.yaml`;
6262

install/tests/Makefile

+10-2
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,12 @@ ifndef TF_VAR_TEST_ID
1212
$(error TF_VAR_TEST_ID is not defined)
1313
endif
1414

15+
check-env-domain:
16+
ifndef TF_VAR_domain
17+
$(error TF_VAR_domain is not defined)
18+
endif
19+
20+
1521
check-env-cloud:
1622
ifndef cloud
1723
$(error cloud is not defined)
@@ -328,7 +334,7 @@ generate-kots-config: cloud_storage = $(if $(findstring external,$(storage)),$(c
328334
generate-kots-config: cloud_registry = $(if $(findstring external,$(registry)),$(cloud),incluster)
329335
generate-kots-config: cloud_db = $(if $(findstring external,$(db)),$(cloud),incluster)
330336
## generate-kots-config: Generate the kots config based on test config
331-
generate-kots-config: select-workspace check-env-cloud get-base-config
337+
generate-kots-config: select-workspace check-env-cloud get-base-config check-env-domain check-env-sub-domain
332338
$(MAKE) storage-config-${cloud_storage}
333339
$(MAKE) db-config-${cloud_db}
334340
$(MAKE) registry-config-${cloud_registry}
@@ -352,6 +358,8 @@ kots-install: preflight-flag = $(if $(preflights:true=),--skip-preflights,)
352358
kots-install: license-file = $(if $(license_community_$(channel)),$(license_community_$(channel)),"../licenses/$(channel).yaml")
353359
kots-install: install-kots-cli
354360
kubectl kots remove ${app} -n gitpod --force --kubeconfig=${KUBECONFIG} || echo "No kots app existing, Installing"
361+
$(MAKE) destroy-gitpod
362+
export KUBECONFIG=${KUBECONFIG} && \
355363
kubectl kots install ${app}/${channel} \
356364
--skip-rbac-check ${version-flag} ${preflight-flag} \
357365
--wait-duration "10m" \
@@ -361,7 +369,7 @@ kots-install: install-kots-cli
361369
--no-port-forward \
362370
--config-values tmp_config.yml
363371

364-
time_to_sleep_azure := 600 # azure seem to take more time to fullfil DNS propogation
372+
time_to_sleep_azure := 800 # azure seem to take more time to fullfil DNS propogation
365373
time_to_sleep := 300
366374

367375
wait_time := 180

0 commit comments

Comments
 (0)