diff --git a/vars/longevityPipeline.groovy b/vars/longevityPipeline.groovy index 750e94a621..269afa0d28 100644 --- a/vars/longevityPipeline.groovy +++ b/vars/longevityPipeline.groovy @@ -290,24 +290,22 @@ def call(Map pipelineParams) { } stage('Provision Resources') { steps { - catchError(stageResult: 'FAILURE') { - script { - wrap([$class: 'BuildUser']) { - dir('scylla-cluster-tests') { - timeout(time: 30, unit: 'MINUTES') { - if (params.backend == 'aws' || params.backend == 'azure') { - provisionResources(params, builder.region) - } else if (params.backend.contains('docker')) { - sh """ - echo 'Tests are to be executed on Docker backend in SCT-Runner. No additional resources to be provisioned.' - """ - } else { - sh """ - echo 'Skipping because non-AWS/Azure backends are not supported' - """ - } - completed_stages['provision_resources'] = true + script { + wrap([$class: 'BuildUser']) { + dir('scylla-cluster-tests') { + timeout(time: 30, unit: 'MINUTES') { + if (params.backend == 'aws' || params.backend == 'azure') { + provisionResources(params, builder.region) + } else if (params.backend.contains('docker')) { + sh """ + echo 'Tests are to be executed on Docker backend in SCT-Runner. No additional resources to be provisioned.' + """ + } else { + sh """ + echo 'Skipping because non-AWS/Azure backends are not supported' + """ } + completed_stages['provision_resources'] = true } } } @@ -455,6 +453,17 @@ def call(Map pipelineParams) { } } } + if (!completed_stages['clean_sct_runner']) { + catchError { + script { + wrap([$class: 'BuildUser']) { + dir('scylla-cluster-tests') { + cleanSctRunners(params, currentBuild) + } + } + } + } + } if (!completed_stages['send_email']) { catchError { script { diff --git a/vars/perfRegressionParallelPipeline.groovy b/vars/perfRegressionParallelPipeline.groovy index 309af5ec43..290b0b89db 100644 --- a/vars/perfRegressionParallelPipeline.groovy +++ b/vars/perfRegressionParallelPipeline.groovy @@ -283,23 +283,21 @@ def call(Map pipelineParams) { } stage("Provision Resources for ${sub_test}") { - catchError(stageResult: 'FAILURE') { - script { - wrap([$class: 'BuildUser']) { - dir('scylla-cluster-tests') { - timeout(time: 30, unit: 'MINUTES') { - if (params.backend == 'aws' || params.backend == 'azure') { - provisionResources(new_params, builder.region) - } else { - sh """ - echo 'Skipping because non-AWS/Azure backends are not supported' - """ - } - } + script { + wrap([$class: 'BuildUser']) { + dir('scylla-cluster-tests') { + timeout(time: 30, unit: 'MINUTES') { + if (params.backend == 'aws' || params.backend == 'azure') { + provisionResources(new_params, builder.region) + } else { + sh """ + echo 'Skipping because non-AWS/Azure backends are not supported' + """ } } } } + } } stage("Run ${sub_test}"){