Skip to content

Commit 754b5a4

Browse files
authored
chore: add a new secret (#12777)
1 parent d8ee104 commit 754b5a4

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

.kokoro/tests/run_tests.sh

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -108,14 +108,16 @@ fi
108108
# On kokoro, we should be able to use the default service account. We
109109
# need to somehow bootstrap the secrets on other CI systems.
110110
if [[ "${TRAMPOLINE_CI}" == "kokoro" ]]; then
111-
# This script will create 3 files:
111+
# This script will create 4 files:
112112
# - testing/test-env.sh
113113
# - testing/service-account.json
114114
# - testing/client-secrets.json
115+
# - testing/cloudai-samples-secrets.sh
115116
./scripts/decrypt-secrets.sh
116117
fi
117118

118119
source ./testing/test-env.sh
120+
source ./testing/cloudai-samples-secrets.sh
119121
export GOOGLE_APPLICATION_CREDENTIALS=$(pwd)/testing/service-account.json
120122

121123
# For cloud-run session, we activate the service account for gcloud sdk.
@@ -207,7 +209,7 @@ cd "$ROOT"
207209

208210
# Remove secrets if we used decrypt-secrets.sh.
209211
if [[ -f "${KOKORO_GFILE_DIR}/secrets_viewer_service_account.json" ]]; then
210-
rm testing/{test-env.sh,client-secrets.json,service-account.json}
212+
rm testing/{test-env.sh,client-secrets.json,service-account.json,cloudai-samples-secrets.sh}
211213
fi
212214

213215
exit "$RTN"

scripts/decrypt-secrets.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,3 +42,7 @@ gcloud secrets versions access latest \
4242
--secret="python-docs-samples-client-secrets" \
4343
--project="${PROJECT_ID}" \
4444
> testing/client-secrets.json
45+
gcloud secrets versions access latest \
46+
--secret="cloudai-samples-secrets" \
47+
--project="python-docs-samples-tests" \
48+
> testing/cloudai-samples-secrets.sh

0 commit comments

Comments
 (0)