Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit e7f0c2a

Browse filesBrowse files
chore: add Cloud SQL samples env vars as secrets (GoogleCloudPlatform#13065)
1 parent 70df78b commit e7f0c2a
Copy full SHA for e7f0c2a

File tree

Expand file treeCollapse file tree

2 files changed

+8
-2
lines changed
Filter options
Expand file treeCollapse file tree

2 files changed

+8
-2
lines changed

‎.kokoro/tests/run_tests.sh

Copy file name to clipboardExpand all lines: .kokoro/tests/run_tests.sh
+4-2Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -108,16 +108,18 @@ 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 4 files:
111+
# This script will create 5 files:
112112
# - testing/test-env.sh
113113
# - testing/service-account.json
114114
# - testing/client-secrets.json
115115
# - testing/cloudai-samples-secrets.sh
116+
# - testing/cloudsql-samples-secrets.sh
116117
./scripts/decrypt-secrets.sh
117118
fi
118119

119120
source ./testing/test-env.sh
120121
source ./testing/cloudai-samples-secrets.sh
122+
source ./testing/cloudsql-samples-secrets.sh
121123
export GOOGLE_APPLICATION_CREDENTIALS=$(pwd)/testing/service-account.json
122124

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

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

215217
exit "$RTN"

‎scripts/decrypt-secrets.sh

Copy file name to clipboardExpand all lines: scripts/decrypt-secrets.sh
+4Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,3 +46,7 @@ gcloud secrets versions access latest \
4646
--secret="cloudai-samples-secrets" \
4747
--project="python-docs-samples-tests" \
4848
> testing/cloudai-samples-secrets.sh
49+
gcloud secrets versions access latest \
50+
--secret="python-docs-samples-cloud-sql-secrets" \
51+
--project="cloud-sql-connector-testing" \
52+
> testing/cloudsql-samples-secrets.sh

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.