Skip to content

Commit 02ceb05

Browse files
build: use PyPI API token in secret manager (#1293)
This PR was generated using Autosynth. 🌈 Synth log will be available here: https://source.cloud.google.com/results/invocations/e0804924-dc62-46a8-9754-d4c5ab9a96a5/targets - [ ] To automatically regenerate this PR, check this box. (May take up to 24 hours.) Source-Link: googleapis/synthtool@043cc62
1 parent c4ecb6c commit 02ceb05

File tree

3 files changed

+6
-16
lines changed

3 files changed

+6
-16
lines changed

.kokoro/release.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ python3 -m pip install --upgrade twine wheel setuptools
2626
export PYTHONUNBUFFERED=1
2727

2828
# Move into the package, build the distribution and upload.
29-
TWINE_PASSWORD=$(cat "${KOKORO_KEYSTORE_DIR}/73713_google_cloud_pypi_password")
29+
TWINE_PASSWORD=$(cat "${KOKORO_GFILE_DIR}/secret_manager/google-cloud-pypi-token")
3030
cd github/google-api-python-client
3131
python3 setup.py sdist bdist_wheel
32-
twine upload --username gcloudpypi --password "${TWINE_PASSWORD}" dist/*
32+
twine upload --username __token__ --password "${TWINE_PASSWORD}" dist/*

.kokoro/release/common.cfg

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -23,18 +23,8 @@ env_vars: {
2323
value: "github/google-api-python-client/.kokoro/release.sh"
2424
}
2525

26-
# Fetch PyPI password
27-
before_action {
28-
fetch_keystore {
29-
keystore_resource {
30-
keystore_config_id: 73713
31-
keyname: "google_cloud_pypi_password"
32-
}
33-
}
34-
}
35-
3626
# Tokens needed to report release status back to GitHub
3727
env_vars: {
3828
key: "SECRET_MANAGER_KEYS"
39-
value: "releasetool-publish-reporter-app,releasetool-publish-reporter-googleapis-installation,releasetool-publish-reporter-pem"
40-
}
29+
value: "releasetool-publish-reporter-app,releasetool-publish-reporter-googleapis-installation,releasetool-publish-reporter-pem,google-cloud-pypi-token"
30+
}

synth.metadata

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,14 @@
44
"git": {
55
"name": ".",
66
"remote": "https://github.com/googleapis/google-api-python-client.git",
7-
"sha": "bd2c5f9c5c5181e21cf970eb6f966afcf0323723"
7+
"sha": "c4ecb6ce55deb57469e380d95d7a3db2e9160fa0"
88
}
99
},
1010
{
1111
"git": {
1212
"name": "synthtool",
1313
"remote": "https://github.com/googleapis/synthtool.git",
14-
"sha": "0a071b3460344886297a304253bf924aa68ddb7e"
14+
"sha": "043cc620d6a6111816d9e09f2a97208565fde958"
1515
}
1616
}
1717
],

0 commit comments

Comments
 (0)