Skip to content

Commit ceea735

Browse files
committed
Add gcp tests env vars in Jenkinsfile
1 parent 417bfbe commit ceea735

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

.ci/Jenkinsfile

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@ pipeline {
1717
JOB_GCS_BUCKET_INTERNAL = 'beats-ci-temp-internal'
1818
JOB_GCS_CREDENTIALS = 'beats-ci-gcs-plugin'
1919
JOB_GCS_EXT_CREDENTIALS = 'beats-ci-gcs-plugin-file-credentials'
20+
ELASTIC_PACKAGE_GCP_SECRET = 'secret/observability-team/ci/service-account/elastic-package-gcp'
21+
ELASTIC_OBSERVABILITY_PROJECT_ID = 'elastic-observability'
2022
STACK_VERSION = "${params.stackVersion}"
2123
}
2224
options {
@@ -257,6 +259,11 @@ def withCloudTestEnv(Closure body) {
257259
[var: "AWS_ACCESS_KEY_ID", password: aws.access_key],
258260
[var: "AWS_SECRET_ACCESS_KEY", password: aws.secret_key],
259261
])
262+
// GCP
263+
withGCPEnv(secret: env.ELASTIC_PACKAGE_GCP_SECRET) {
264+
maskedVars.add([var: 'GOOGLE_CREDENTIALS', password: readFile(file: env.GOOGLE_APPLICATION_CREDENTIALS)]);
265+
maskedVars.add([var: 'GCP_PROJECT_ID', password: env.ELASTIC_OBSERVABILITY_PROJECT_ID])
266+
}
260267
withEnvMask(vars: maskedVars) {
261268
body()
262269
}

0 commit comments

Comments
 (0)