Skip to content

Commit

Permalink
[build] Fix sweeper deployment
Browse files Browse the repository at this point in the history
  • Loading branch information
csweichel committed Jun 15, 2021
1 parent 7acbacf commit f77a2e3
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 4 deletions.
9 changes: 7 additions & 2 deletions .werft/build.ts
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,8 @@ export async function build(context, version) {

exec(`LICENCE_HEADER_CHECK_ONLY=true leeway run components:update-license-header || { echo "[build|FAIL] There are some license headers missing. Please run 'leeway run components:update-license-header'."; exit 1; }`)
exec(`leeway vet --ignore-warnings`);
exec(`leeway build --werft=true -c ${cacheLevel} ${dontTest ? '--dont-test' : ''} --dont-retag --coverage-output-path=${coverageOutput} -Dversion=${version} -DimageRepoBase=eu.gcr.io/gitpod-core-dev/dev dev:all`);
exec(`leeway build --werft=true -c ${cacheLevel} ${dontTest ? '--dont-test' : ''} --dont-retag --coverage-output-path=${coverageOutput} --save /tmp/dev.tar.gz -Dversion=${version} -DimageRepoBase=eu.gcr.io/gitpod-core-dev/dev dev:all`);
const sweeperImage = exec(`tar xfO /tmp/dev.tar.gz ./sweeper.txt`).stdout.trim();
if (publishRelease) {
exec(`gcloud auth activate-service-account --key-file "/mnt/secrets/gcp-sa-release/service-account.json"`);
}
Expand Down Expand Up @@ -200,6 +201,7 @@ export async function build(context, version) {
withWsCluster,
analytics,
cleanSlateDeployment,
sweeperImage
};
await deployToDev(deploymentConfig, workspaceFeatureFlags, dynamicCPULimits, storage);
await triggerIntegrationTests(deploymentConfig, !withIntegrationTests)
Expand All @@ -215,6 +217,7 @@ interface DeploymentConfig {
withWsCluster?: PreviewWorkspaceClusterRef | undefined;
analytics?: string;
cleanSlateDeployment: boolean;
sweeperImage: string;
}

/**
Expand Down Expand Up @@ -368,7 +371,9 @@ export async function deployToDev(deploymentConfig: DeploymentConfig, workspaceF

if (!wsCluster) {
werft.log('helm', 'installing Sweeper');
exec(`/usr/local/bin/helm3 upgrade --install --set image.version=${version} --set command="werft run github -a namespace=${namespace} --remote-job-path .werft/wipe-devstaging.yaml github.com/gitpod-io/gitpod:main" sweeper ../dev/charts/sweeper`);
const sweeperVersion = deploymentConfig.sweeperImage.split(":")[1];
werft.log('helm', `Sweeper version: ${sweeperVersion}`);
exec(`/usr/local/bin/helm3 upgrade --install --set image.version=${sweeperVersion} --set command="werft run github -a namespace=${namespace} --remote-job-path .werft/wipe-devstaging.yaml github.com/gitpod-io/gitpod:main" sweeper ../dev/charts/sweeper`);
}

werft.log('helm', 'done');
Expand Down
2 changes: 1 addition & 1 deletion components/ws-daemon/seccomp-profile-installer/BUILD.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ packages:
config:
dockerfile: leeway.Dockerfile
metadata:
helm-component: wsDaemon.seccompProfileInstaller
helm-component: wsDaemon.userNamespaces.seccompProfileInstaller
image:
- ${imageRepoBase}/seccomp-profile-installer:${version}
- ${imageRepoBase}/seccomp-profile-installer:${__pkg_version}
2 changes: 1 addition & 1 deletion components/ws-daemon/shiftfs-module-loader/BUILD.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ packages:
config:
dockerfile: leeway.Dockerfile
metadata:
helm-component: wsDaemon.shiftfsModuleLoader
helm-component: wsDaemon.userNamespaces.shiftfsModuleLoader
image:
- ${imageRepoBase}/shiftfs-module-loader:${version}
- ${imageRepoBase}/shiftfs-module-loader:${__pkg_version}
3 changes: 3 additions & 0 deletions dev/BUILD.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,6 @@ packages:
- dev/image:docker
- dev/poolkeeper:docker
- dev/sweeper:docker
config:
commands:
- ["sh", "-c", "tail -n1 dev-sweeper--docker/imgnames.txt > sweeper.txt"]

0 comments on commit f77a2e3

Please sign in to comment.