Skip to content

Commit 6db8ef1

Browse files
ArthurSensroboquat
authored andcommitted
.werft/VM: Certify we're using the correct namespace to check pod rollout
Signed-off-by: ArthurSens <[email protected]>
1 parent 506dcc5 commit 6db8ef1

File tree

1 file changed

+12
-9
lines changed

1 file changed

+12
-9
lines changed

.werft/build.ts

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -609,7 +609,7 @@ export async function deployToDevWithInstaller(deploymentConfig: DeploymentConfi
609609

610610
try {
611611
werft.log(installerSlices.DEPLOYMENT_WAITING, "Server not ready. Let the waiting...commence!");
612-
exec(`kubectl rollout status deployment/server --timeout=5m`,{ slice: installerSlices.DEPLOYMENT_WAITING });
612+
exec(`kubectl -n ${namespace} rollout status deployment/server --timeout=5m`,{ slice: installerSlices.DEPLOYMENT_WAITING });
613613
werft.done(installerSlices.DEPLOYMENT_WAITING);
614614
} catch (err) {
615615
werft.fail(installerSlices.DEPLOYMENT_WAITING, err);
@@ -640,14 +640,17 @@ export async function deployToDevWithInstaller(deploymentConfig: DeploymentConfi
640640
const argsStr = Object.entries(args).map(([k, v]) => `\"--${k}\", \"${v}\"`).join(", ");
641641
const allArgsStr = `--set args="{${argsStr}}" --set githubToken.secret=github-sweeper-read-branches --set githubToken.key=token`;
642642

643-
// copy GH token into namespace
644-
exec(`kubectl --namespace werft get secret github-sweeper-read-branches -o yaml \
645-
| yq w - metadata.namespace ${namespace} \
646-
| yq d - metadata.uid \
647-
| yq d - metadata.resourceVersion \
648-
| yq d - metadata.creationTimestamp \
649-
| kubectl apply -f -`);
650-
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" ${allArgsStr} sweeper ./dev/charts/sweeper`);
643+
// TODO: Implement sweeper logic for VMs in Harvester
644+
if (!withVM) {
645+
// copy GH token into namespace
646+
exec(`kubectl --namespace werft get secret github-sweeper-read-branches -o yaml \
647+
| yq w - metadata.namespace ${namespace} \
648+
| yq d - metadata.uid \
649+
| yq d - metadata.resourceVersion \
650+
| yq d - metadata.creationTimestamp \
651+
| kubectl apply -f -`);
652+
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" ${allArgsStr} sweeper ./dev/charts/sweeper`);
653+
}
651654

652655
werft.done(phases.DEPLOY);
653656

0 commit comments

Comments
 (0)