From abbc97db69a57dcb991ba97ef503305b701ffb3a Mon Sep 17 00:00:00 2001 From: sofisl <55454395+sofisl@users.noreply.github.com> Date: Mon, 19 Dec 2022 13:57:59 -0800 Subject: [PATCH] build: have Kokoro grab service account credentials from secret that will be rotated for system tests (#1739) --- .../node_library/.kokoro/continuous/node12/system-test.cfg | 5 +++++ .../node_library/.kokoro/presubmit/node12/system-test.cfg | 5 +++++ synthtool/gcp/templates/node_library/.kokoro/system-test.sh | 2 +- 3 files changed, 11 insertions(+), 1 deletion(-) diff --git a/synthtool/gcp/templates/node_library/.kokoro/continuous/node12/system-test.cfg b/synthtool/gcp/templates/node_library/.kokoro/continuous/node12/system-test.cfg index a680040df..b8437bdc3 100644 --- a/synthtool/gcp/templates/node_library/.kokoro/continuous/node12/system-test.cfg +++ b/synthtool/gcp/templates/node_library/.kokoro/continuous/node12/system-test.cfg @@ -5,3 +5,8 @@ env_vars: { key: "TRAMPOLINE_BUILD_FILE" value: "github/{{ metadata['repository_name'] }}/.kokoro/system-test.sh" } + +env_vars: { + key: "SECRET_MANAGER_KEYS" + value: "long-door-651-kokoro-system-test-service-account" +} \ No newline at end of file diff --git a/synthtool/gcp/templates/node_library/.kokoro/presubmit/node12/system-test.cfg b/synthtool/gcp/templates/node_library/.kokoro/presubmit/node12/system-test.cfg index a680040df..b8437bdc3 100644 --- a/synthtool/gcp/templates/node_library/.kokoro/presubmit/node12/system-test.cfg +++ b/synthtool/gcp/templates/node_library/.kokoro/presubmit/node12/system-test.cfg @@ -5,3 +5,8 @@ env_vars: { key: "TRAMPOLINE_BUILD_FILE" value: "github/{{ metadata['repository_name'] }}/.kokoro/system-test.sh" } + +env_vars: { + key: "SECRET_MANAGER_KEYS" + value: "long-door-651-kokoro-system-test-service-account" +} \ No newline at end of file diff --git a/synthtool/gcp/templates/node_library/.kokoro/system-test.sh b/synthtool/gcp/templates/node_library/.kokoro/system-test.sh index b93793e4f..f356afbde 100755 --- a/synthtool/gcp/templates/node_library/.kokoro/system-test.sh +++ b/synthtool/gcp/templates/node_library/.kokoro/system-test.sh @@ -19,7 +19,7 @@ set -eo pipefail export NPM_CONFIG_PREFIX=${HOME}/.npm-global # Setup service account credentials. -export GOOGLE_APPLICATION_CREDENTIALS=${KOKORO_GFILE_DIR}/service-account.json +export GOOGLE_APPLICATION_CREDENTIALS=${KOKORO_GFILE_DIR}/secret_manager/long-door-651-kokoro-system-test-service-account export GCLOUD_PROJECT={{ test_project or 'long-door-651' }} cd $(dirname $0)/..