Skip to content

Commit

Permalink
Moving cleaning before scaling down the cluster. (#262)
Browse files Browse the repository at this point in the history
  • Loading branch information
skordas authored Sep 14, 2022
1 parent a2f261d commit 8010aab
Showing 1 changed file with 12 additions and 11 deletions.
23 changes: 12 additions & 11 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -304,17 +304,7 @@ pipeline {
}

script {
// if the build fails, scale down will not happen, letting user review and decide if cluster is ready for scale down or re-run the job on same cluster
if (params.SCALE_DOWN.toInteger() > 0) {
build job: 'scale-ci/e2e-benchmarking-multibranch-pipeline/cluster-workers-scaling',
parameters: [
string(name: 'BUILD_NUMBER', value: BUILD_NUMBER), string(name: 'WORKER_COUNT', value: SCALE_DOWN),
text(name: "ENV_VARS", value: ENV_VARS), string(name: 'JENKINS_AGENT_LABEL', value: JENKINS_AGENT_LABEL)
]
}
}

script {
// if the build fails, cleaning and scale down will not happen, letting user review and decide if cluster is ready for scale down or re-run the job on same cluster
if (params.CLEANUP == true) {
build job: 'scale-ci/e2e-benchmarking-multibranch-pipeline/benchmark-cleaner',
parameters: [
Expand All @@ -325,6 +315,17 @@ pipeline {
propagate: false
}
}

script {
if (params.SCALE_DOWN.toInteger() > 0) {
build job: 'scale-ci/e2e-benchmarking-multibranch-pipeline/cluster-workers-scaling',
parameters: [
string(name: 'BUILD_NUMBER', value: BUILD_NUMBER), string(name: 'WORKER_COUNT', value: SCALE_DOWN),
text(name: "ENV_VARS", value: ENV_VARS), string(name: 'JENKINS_AGENT_LABEL', value: JENKINS_AGENT_LABEL)
]
}
}

}
}
}
Expand Down

0 comments on commit 8010aab

Please sign in to comment.