diff --git a/.werft/build.ts b/.werft/build.ts index 3bd429a75d64c4..aefa2b754a3d59 100644 --- a/.werft/build.ts +++ b/.werft/build.ts @@ -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"`); } @@ -200,6 +201,7 @@ export async function build(context, version) { withWsCluster, analytics, cleanSlateDeployment, + sweeperImage }; await deployToDev(deploymentConfig, workspaceFeatureFlags, dynamicCPULimits, storage); await triggerIntegrationTests(deploymentConfig, !withIntegrationTests) @@ -215,6 +217,7 @@ interface DeploymentConfig { withWsCluster?: PreviewWorkspaceClusterRef | undefined; analytics?: string; cleanSlateDeployment: boolean; + sweeperImage: string; } /** @@ -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'); diff --git a/components/ws-daemon/seccomp-profile-installer/BUILD.yaml b/components/ws-daemon/seccomp-profile-installer/BUILD.yaml index 940928c4e04833..78fc652361d604 100644 --- a/components/ws-daemon/seccomp-profile-installer/BUILD.yaml +++ b/components/ws-daemon/seccomp-profile-installer/BUILD.yaml @@ -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} diff --git a/components/ws-daemon/shiftfs-module-loader/BUILD.yaml b/components/ws-daemon/shiftfs-module-loader/BUILD.yaml index 77d0ac159cc087..9789d8072cf91c 100644 --- a/components/ws-daemon/shiftfs-module-loader/BUILD.yaml +++ b/components/ws-daemon/shiftfs-module-loader/BUILD.yaml @@ -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} diff --git a/dev/BUILD.yaml b/dev/BUILD.yaml index 4cc5de3e6073a5..f3bf5217d6d5d0 100644 --- a/dev/BUILD.yaml +++ b/dev/BUILD.yaml @@ -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"] \ No newline at end of file