Skip to content

Commit b30b4e4

Browse files
Simon Emmsroboquat
Simon Emms
authored andcommitted
Add "publish-to-kots" flag in werft
1 parent 003f9a3 commit b30b4e4

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

.werft/jobs/build/job-config.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ export interface JobConfig {
1616
publishRelease: boolean;
1717
publishToJBMarketplace: string
1818
publishToNpm: string
19+
publishToKots: boolean;
1920
retag: string
2021
storage: string;
2122
version: string;
@@ -78,6 +79,7 @@ export function jobConfig(werft: Werft, context: any): JobConfig {
7879
const withIntegrationTests = "with-integration-tests" in buildConfig && !mainBuild;
7980
const publishToNpm = "publish-to-npm" in buildConfig || mainBuild;
8081
const publishToJBMarketplace = "publish-to-jb-marketplace" in buildConfig || mainBuild;
82+
const publishToKots = "publish-to-kots" in buildConfig || mainBuild;
8183
const analytics = buildConfig["analytics"];
8284
const localAppVersion = mainBuild || ("with-localapp-version" in buildConfig) ? version : "unknown";
8385
const retag = ("with-retag" in buildConfig) ? "" : "--dont-retag";
@@ -125,6 +127,7 @@ export function jobConfig(werft: Werft, context: any): JobConfig {
125127
publishRelease,
126128
publishToJBMarketplace,
127129
publishToNpm,
130+
publishToKots,
128131
repository,
129132
retag,
130133
storage,

.werft/jobs/build/publish-kots.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,10 @@ const REPLICATED_YAML_DIR = './install/kots/manifests';
1111
const INSTALLER_JOB_IMAGE = 'spec.template.spec.containers[0].image';
1212

1313
export async function publishKots(werft: Werft, config: JobConfig) {
14+
if (!config.publishToKots) {
15+
return;
16+
}
17+
1418
werft.phase(phases.PUBLISH_KOTS, 'Publish release to KOTS');
1519

1620
const imageAndTag = exec(`yq r ${REPLICATED_YAML_DIR}/gitpod-installer-job.yaml ${INSTALLER_JOB_IMAGE}`);

0 commit comments

Comments
 (0)