Skip to content

Commit a0d8667

Browse files
authored
build(python): switch to keystore for publication (GoogleCloudPlatform#249)
1 parent 7a6698b commit a0d8667

File tree

2 files changed

+11
-7
lines changed

2 files changed

+11
-7
lines changed

.kokoro/release.sh

+2-2
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ python3 -m pip install --upgrade twine wheel setuptools
2222
export PYTHONUNBUFFERED=1
2323

2424
# Move into the package, build the distribution and upload.
25-
TWINE_PASSWORD=$(cat "${KOKORO_GFILE_DIR}/secret_manager/google-cloud-pypi-token")
25+
TWINE_PASSWORD=$(cat "${KOKORO_KEYSTORE_DIR}/73713_google-cloud-pypi-token-keystore-1")
2626
cd github/cloud-sql-python-connector
2727
python3 setup.py sdist bdist_wheel
28-
twine upload --username __token__ --password "${TWINE_PASSWORD}" dist/*
28+
twine upload --username __token__ --password "${TWINE_PASSWORD}" dist/*

.kokoro/release/common.cfg

+9-5
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,12 @@ env_vars: {
3636
value: "github/cloud-sql-python-connector/.kokoro/release.sh"
3737
}
3838

39-
# Tokens needed to report release status back to GitHub
40-
env_vars: {
41-
key: "SECRET_MANAGER_KEYS"
42-
value: "google-cloud-pypi-token"
43-
}
39+
# Fetch PyPI password
40+
before_action {
41+
fetch_keystore {
42+
keystore_resource {
43+
keystore_config_id: 73713
44+
keyname: "google-cloud-pypi-token-keystore-1"
45+
}
46+
}
47+
}

0 commit comments

Comments
 (0)