Skip to content

Commit ee23ab0

Browse files
committed
fix the channel name
1 parent cc325f4 commit ee23ab0

File tree

1 file changed

+22
-1
lines changed

1 file changed

+22
-1
lines changed

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

+22-1
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,28 @@ export async function triggerSelfHostedPreview(werft: Werft, config: JobConfig,
7272
const replicatedChannel = config.replicatedChannel || config.repository.branch;
7373
const cluster = config.cluster || "k3s";
7474

75+
var licenseFlag: string = ""
76+
77+
if(!["stable", "unstable", "beta"].includes(replicatedChannel.toLowerCase())){
78+
werft.phase("get-replicated-license", `Create and download replicated license for ${replicatedChannel}`);
79+
80+
exec(`replicated customer create --channel ${replicatedChannel} --name ${replicatedChannel}`,
81+
{ slice: "get-replicated-license"})
82+
83+
exec(`replicated customer download-license --customer ${replicatedChannel} > license.yaml`,
84+
{ slice: "get-replicated-license", dontCheckRc: true})
85+
86+
exec(`install -D license.yaml install/licenses/${replicatedChannel}.yaml`,
87+
{ slice: "get-replicated-license"},
88+
)
89+
werft.done("get-replicated-license");
90+
91+
licenseFlag = `-s install/licenses/${replicatedChannel}.yaml`
92+
}
93+
94+
7595
exec(`git config --global user.name "${username}"`);
96+
7697
var annotation = `-a channel=${replicatedChannel} -a preview=true -a skipTests=true -a deps=external`;
7798

7899
werft.phase("self-hosted-preview", `Create self-hosted preview in ${cluster}`);
@@ -83,7 +104,7 @@ export async function triggerSelfHostedPreview(werft: Werft, config: JobConfig,
83104

84105
try {
85106
exec(
86-
`werft run --remote-job-path ${testFile} ${annotation} github`,
107+
`werft run --remote-job-path ${testFile} ${annotation} github ${licenseFlag}`,
87108
{
88109
slice: "self-hosted-preview"
89110
},

0 commit comments

Comments
 (0)