@@ -83,8 +83,6 @@ export async function deployToPreviewEnvironment(werft: Werft, jobConfig: JobCon
83
83
| yq r - data['.dockerconfigjson'] \
84
84
| base64 -d)" | base64 -w 0` , { silent : true } ) . stdout . trim ( ) ;
85
85
86
- const sweeperImage = exec ( `tar xfO /tmp/dev.tar.gz ./sweeper.txt` ) . stdout . trim ( ) ;
87
-
88
86
const deploymentConfig : DeploymentConfig = {
89
87
version,
90
88
destname,
@@ -94,7 +92,6 @@ export async function deployToPreviewEnvironment(werft: Werft, jobConfig: JobCon
94
92
url,
95
93
analytics,
96
94
cleanSlateDeployment,
97
- sweeperImage,
98
95
installEELicense,
99
96
imagePullAuth,
100
97
withPayment,
@@ -358,34 +355,6 @@ async function deployToDevWithInstaller(werft: Werft, jobConfig: JobConfig, depl
358
355
}
359
356
addAgentSmithToken ( werft , deploymentConfig . namespace , installer . options . kubeconfigPath , tokenHash )
360
357
361
- // TODO: Fix sweeper, it does not appear to be doing clean-up
362
- werft . log ( 'sweeper' , 'installing Sweeper' ) ;
363
- const sweeperVersion = deploymentConfig . sweeperImage . split ( ":" ) [ 1 ] ;
364
- werft . log ( 'sweeper' , `Sweeper version: ${ sweeperVersion } ` ) ;
365
-
366
- // prepare args
367
- const args = {
368
- "period" : "10m" ,
369
- "timeout" : "48h" , // period of inactivity that triggers a removal
370
- branch : jobConfig . repository . branch , // the branch to check for deletion
371
- owner : jobConfig . repository . owner ,
372
- repo : jobConfig . repository . repo ,
373
- } ;
374
- const argsStr = Object . entries ( args ) . map ( ( [ k , v ] ) => `\"--${ k } \", \"${ v } \"` ) . join ( ", " ) ;
375
- const allArgsStr = `--set args="{${ argsStr } }" --set githubToken.secret=github-sweeper-read-branches --set githubToken.key=token` ;
376
-
377
- // TODO: Implement sweeper logic for VMs in Harvester
378
- if ( ! withVM ) {
379
- // copy GH token into namespace
380
- exec ( `kubectl --kubeconfig ${ CORE_DEV_KUBECONFIG_PATH } --namespace werft get secret github-sweeper-read-branches -o yaml \
381
- | yq w - metadata.namespace ${ namespace } \
382
- | yq d - metadata.uid \
383
- | yq d - metadata.resourceVersion \
384
- | yq d - metadata.creationTimestamp \
385
- | kubectl --kubeconfig ${ CORE_DEV_KUBECONFIG_PATH } apply -f -` ) ;
386
- exec ( `/usr/local/bin/helm3 --kubeconfig ${ CORE_DEV_KUBECONFIG_PATH } 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` ) ;
387
- }
388
-
389
358
werft . done ( phases . DEPLOY ) ;
390
359
391
360
async function cleanStateEnv ( kubeconfig : string , shellOpts : ExecOptions ) {
@@ -561,30 +530,6 @@ async function deployToDevWithHelm(werft: Werft, jobConfig: JobConfig, deploymen
561
530
562
531
exec ( `helm dependencies up` ) ;
563
532
exec ( `/usr/local/bin/helm3 --kubeconfig ${ CORE_DEV_KUBECONFIG_PATH } upgrade --install --timeout 10m -f ../.werft/jobs/build/helm/${ nodeAffinityValues [ nodepoolIndex ] } -f ../.werft/jobs/build/helm/values.dev.yaml ${ flags } ${ helmInstallName } .` ) ;
564
-
565
- werft . log ( 'helm' , 'installing Sweeper' ) ;
566
- const sweeperVersion = deploymentConfig . sweeperImage . split ( ":" ) [ 1 ] ;
567
- werft . log ( 'helm' , `Sweeper version: ${ sweeperVersion } ` ) ;
568
-
569
- // prepare args
570
- const args = {
571
- "period" : "10m" ,
572
- "timeout" : "48h" , // period of inactivity that triggers a removal
573
- branch : jobConfig . repository . branch , // the branch to check for deletion
574
- owner : jobConfig . repository . owner ,
575
- repo : jobConfig . repository . repo ,
576
- } ;
577
- const argsStr = Object . entries ( args ) . map ( ( [ k , v ] ) => `\"--${ k } \", \"${ v } \"` ) . join ( ", " ) ;
578
- const allArgsStr = `--set args="{${ argsStr } }" --set githubToken.secret=github-sweeper-read-branches --set githubToken.key=token` ;
579
-
580
- // copy GH token into namespace
581
- exec ( `kubectl --kubeconfig ${ CORE_DEV_KUBECONFIG_PATH } --namespace werft get secret github-sweeper-read-branches -o yaml \
582
- | yq w - metadata.namespace ${ namespace } \
583
- | yq d - metadata.uid \
584
- | yq d - metadata.resourceVersion \
585
- | yq d - metadata.creationTimestamp \
586
- | kubectl --kubeconfig ${ CORE_DEV_KUBECONFIG_PATH } apply -f -` ) ;
587
- exec ( `/usr/local/bin/helm3 --kubeconfig ${ CORE_DEV_KUBECONFIG_PATH } 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` ) ;
588
533
}
589
534
590
535
function addDeploymentFlags ( ) {
@@ -684,7 +629,6 @@ interface DeploymentConfig {
684
629
url : string ;
685
630
analytics ?: string ;
686
631
cleanSlateDeployment : boolean ;
687
- sweeperImage : string ;
688
632
installEELicense : boolean ;
689
633
imagePullAuth : string ;
690
634
withPayment : boolean ;
0 commit comments