|
1 | | -region = 'us-central1-a' |
2 | | -testUrlPrefix = 'https://percona-jenkins-artifactory-public.s3.amazonaws.com/cloud-psmdb-operator' |
3 | | -tests = [] |
| 1 | +import groovy.transform.Field |
| 2 | + |
| 3 | +@Field def region = 'us-central1-a' |
| 4 | +@Field def testUrlPrefix = 'https://percona-jenkins-artifactory-public.s3.amazonaws.com/cloud-psmdb-operator' |
| 5 | +@Field def tests = [] |
4 | 6 |
|
5 | 7 | void createCluster(String CLUSTER_SUFFIX) { |
6 | 8 | withCredentials([string(credentialsId: 'GCP_PROJECT_ID', variable: 'GCP_PROJECT'), file(credentialsId: 'gcloud-key-file', variable: 'CLIENT_SECRET_FILE')]) { |
@@ -182,8 +184,8 @@ String formatTime(def time) { |
182 | 184 | } |
183 | 185 | } |
184 | 186 |
|
185 | | -TestsReport = '| Test Name | Result | Time |\r\n| ----------- | -------- | ------ |' |
186 | | -TestsReportXML = '<testsuite name=\\"PSMDB\\">\n' |
| 187 | +@Field def TestsReport = '| Test Name | Result | Time |\r\n| ----------- | -------- | ------ |' |
| 188 | +@Field def TestsReportXML = '<testsuite name=\\"PSMDB\\">\n' |
187 | 189 |
|
188 | 190 | void makeReport() { |
189 | 191 | def wholeTestAmount = tests.size() |
@@ -290,7 +292,7 @@ void prepareNode() { |
290 | 292 | sudo curl -sLo /usr/local/bin/kubectl https://dl.k8s.io/release/\$(curl -Ls https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl && sudo chmod +x /usr/local/bin/kubectl |
291 | 293 | kubectl version --client --output=yaml |
292 | 294 |
|
293 | | - curl -fsSL https://get.helm.sh/helm-v3.19.0-linux-amd64.tar.gz | sudo tar -C /usr/local/bin --strip-components 1 -xzf - linux-amd64/helm |
| 295 | + curl -fsSL https://get.helm.sh/helm-v3.20.0-linux-amd64.tar.gz | sudo tar -C /usr/local/bin --strip-components 1 -xzf - linux-amd64/helm |
294 | 296 |
|
295 | 297 | sudo curl -fsSL https://github.com/mikefarah/yq/releases/download/v4.48.1/yq_linux_amd64 -o /usr/local/bin/yq && sudo chmod +x /usr/local/bin/yq |
296 | 298 | sudo curl -fsSL https://github.com/jqlang/jq/releases/download/jq-1.7.1/jq-linux64 -o /usr/local/bin/jq && sudo chmod +x /usr/local/bin/jq |
@@ -344,7 +346,7 @@ boolean isManualBuild() { |
344 | 346 | return !causes.isEmpty() |
345 | 347 | } |
346 | 348 |
|
347 | | -needToRunTests = true |
| 349 | +@Field def needToRunTests = true |
348 | 350 | void checkE2EIgnoreFiles() { |
349 | 351 | if (isManualBuild()) { |
350 | 352 | echo "This is a manual rebuild. Forcing pipeline execution." |
@@ -423,9 +425,9 @@ pipeline { |
423 | 425 | CLOUDSDK_CORE_DISABLE_PROMPTS = 1 |
424 | 426 | CLEAN_NAMESPACE = 1 |
425 | 427 | OPERATOR_NS = 'psmdb-operator' |
426 | | - GIT_SHORT_COMMIT = sh(script: 'git rev-parse --short HEAD', , returnStdout: true).trim() |
| 428 | + GIT_SHORT_COMMIT = sh(script: 'git rev-parse --short HEAD', returnStdout: true).trim() |
427 | 429 | VERSION = "${env.GIT_BRANCH}-${env.GIT_SHORT_COMMIT}" |
428 | | - CLUSTER_NAME = sh(script: "echo jen-psmdb-${env.CHANGE_ID}-${GIT_SHORT_COMMIT}-${env.BUILD_NUMBER} | tr '[:upper:]' '[:lower:]'", , returnStdout: true).trim() |
| 430 | + CLUSTER_NAME = sh(script: "echo jen-psmdb-${env.CHANGE_ID}-${GIT_SHORT_COMMIT}-${env.BUILD_NUMBER} | tr '[:upper:]' '[:lower:]'", returnStdout: true).trim() |
429 | 431 | AUTHOR_NAME = sh(script: "echo ${CHANGE_AUTHOR_EMAIL} | awk -F'@' '{print \$1}'", , returnStdout: true).trim() |
430 | 432 | ENABLE_LOGGING = "true" |
431 | 433 | } |
|
0 commit comments