Skip to content

Commit 193eb9b

Browse files
author
Christian Weichel
committed
[devstaging] Deploy all preview environments with HTTPS
and remove the `https` build config. This is In preparation for making registry-facade standard. Fixes #2704
1 parent d722d8e commit 193eb9b

File tree

1 file changed

+7
-10
lines changed

1 file changed

+7
-10
lines changed

.werft/build.js

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,6 @@ async function build(context, version) {
5151
const dontTest = "no-test" in buildConfig;
5252
const cacheLevel = "no-cache" in buildConfig ? "remote-push" : "remote";
5353
const publishRelease = "publish-release" in buildConfig;
54-
const previewWithHttps = "https" in buildConfig;
5554
const workspaceFeatureFlags = (buildConfig["ws-feature-flags"] || "").split(",").map(e => e.trim())
5655
const dynamicCPULimits = "dynamic-cpu-limits" in buildConfig;
5756
const withInstaller = "with-installer" in buildConfig || masterBuild;
@@ -64,7 +63,6 @@ async function build(context, version) {
6463
dontTest,
6564
cacheLevel,
6665
publishRelease,
67-
previewWithHttps,
6866
workspaceFeatureFlags,
6967
dynamicCPULimits,
7068
noPreview,
@@ -113,20 +111,20 @@ async function build(context, version) {
113111
werft.phase("deploy", "not deploying");
114112
console.log("no-preview or publish-release is set");
115113
} else {
116-
await deployToDev(version, previewWithHttps, workspaceFeatureFlags, dynamicCPULimits, registryFacadeHandover);
114+
await deployToDev(version, workspaceFeatureFlags, dynamicCPULimits, registryFacadeHandover);
117115
}
118116
}
119117

120118

121119
/**
122120
* Deploy dev
123121
*/
124-
async function deployToDev(version, previewWithHttps, workspaceFeatureFlags, dynamicCPULimits, registryFacadeHandover) {
122+
async function deployToDev(version, workspaceFeatureFlags, dynamicCPULimits, registryFacadeHandover) {
125123
werft.phase("deploy", "deploying to dev");
126124
const destname = version.split(".")[0];
127125
const namespace = `staging-${destname}`;
128126
const domain = `${destname}.staging.gitpod-dev.com`;
129-
const url = `${!!previewWithHttps ? "https" : "http"}://${domain}`;
127+
const url = `https://${domain}`;
130128
const wsdaemonPort = `1${Math.floor(Math.random()*1000)}`;
131129
const registryProxyPort = `2${Math.floor(Math.random()*1000)}`;
132130
const registryNodePort = `${30000 + Math.floor(Math.random()*1000)}`;
@@ -184,11 +182,10 @@ async function deployToDev(version, previewWithHttps, workspaceFeatureFlags, dyn
184182
}
185183

186184
let certificatePromise = undefined;
187-
if (previewWithHttps) {
188-
// TODO [geropl] Now that the certs reside in a separate namespaces, start the actual certificate issuing _before_ the namespace cleanup
189-
werft.log('certificate', "organizing a certificate for the preview environment...");
190-
certificatePromise = issueAndInstallCertficate(namespace, domain);
191-
}
185+
186+
// TODO(geropl): Now that the certs reside in a separate namespaces, start the actual certificate issuing _before_ the namespace cleanup
187+
werft.log('certificate', "organizing a certificate for the preview environment...");
188+
certificatePromise = issueAndInstallCertficate(namespace, domain);
192189

193190
werft.log("predeploy cleanup", "removing old unnamespaced objects - this might take a while");
194191
try {

0 commit comments

Comments
 (0)