Skip to content

Commit

Permalink
Add withLocalPreview
Browse files Browse the repository at this point in the history
  • Loading branch information
mads-hartmann committed Sep 19, 2022
1 parent 18affaa commit dc1d3dd
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 1 deletion.
1 change: 1 addition & 0 deletions .werft/jobs/build/build-and-publish.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ export async function buildAndPublish(werft: Werft, jobConfig: JobConfig) {
"REPLICATED_APP": process.env.REPLICATED_APP,
"npmPublishTrigger": publishToNpm ? Date.now().toString() : "false",
"jbMarketplacePublishTrigger": publishToJBMarketplace ? Date.now().toString() : "false",
"withLocalPreview": jobConfig.withLocalPreview.toString()
}
const buildArgumentsString = Object.values(buildArguments).map(([key, value]) => `-d${key}=${value}`)

Expand Down
3 changes: 3 additions & 0 deletions .werft/jobs/build/job-config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ export interface JobConfig {
withSelfHostedPreview: boolean;
withObservability: boolean;
withPayment: boolean;
withLocalPreview: boolean;
workspaceFeatureFlags: string[];
previewEnvironment: PreviewEnvironmentConfig;
repository: Repository;
Expand Down Expand Up @@ -97,6 +98,7 @@ export function jobConfig(werft: Werft, context: any): JobConfig {
const withPayment = "with-payment" in buildConfig && !mainBuild;
const withObservability = "with-observability" in buildConfig && !mainBuild;
const withLargeVM = "with-large-vm" in buildConfig && !mainBuild;
const withLocalPreview = "with-local-preview" in buildConfig || mainBuild
const repository: Repository = {
owner: context.Repository.owner,
repo: context.Repository.repo,
Expand Down Expand Up @@ -148,6 +150,7 @@ export function jobConfig(werft: Werft, context: any): JobConfig {
withPayment,
withUpgradeTests,
withSelfHostedPreview,
withLocalPreview,
workspaceFeatureFlags,
withLargeVM,
};
Expand Down
2 changes: 1 addition & 1 deletion install/preview/BUILD.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
const packages = []

const withLocalPreview = true
const withLocalPreview = args.withLocalPreview == "true"

if (withLocalPreview) {
const docker = {
Expand Down

0 comments on commit dc1d3dd

Please sign in to comment.