Skip to content
This repository was archived by the owner on Mar 6, 2026. It is now read-only.

Commit cca554b

Browse files
build: use PyPI API token in secret manager (#208)
* docs(python): add empty lines between methods Source-Author: Bu Sun Kim <8822365+busunkim96@users.noreply.github.com> Source-Date: Wed Apr 14 14:41:09 2021 -0600 Source-Repo: googleapis/synthtool Source-Sha: 721339ab60a6eb63b889978b3d9b295dcb3be370 Source-Link: googleapis/synthtool@721339a * build: use PyPI API token in secret manager Migrate python libraries onto the PyPI API token stored in secret manager. A PyPI API token is limited in scope to uploading new releases. https://pypi.org/help/#apitoken Verified that this works with [build](https://fusion2.corp.google.com/invocations/14bae126-83fa-4328-8da9-d390ed99315c/targets/cloud-devrel%2Fclient-libraries%2Fpython%2Fgoogleapis%2Fpython-vision%2Frelease%2Frelease;config=default/log) on googleapis/python-vision#136 Source-Author: Bu Sun Kim <8822365+busunkim96@users.noreply.github.com> Source-Date: Wed Apr 14 17:46:06 2021 -0600 Source-Repo: googleapis/synthtool Source-Sha: 043cc620d6a6111816d9e09f2a97208565fde958 Source-Link: googleapis/synthtool@043cc62 Co-authored-by: Anthonios Partheniou <partheniou@google.com>
1 parent 5f2dda0 commit cca554b

File tree

4 files changed

+63
-18
lines changed

4 files changed

+63
-18
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-resumable-media-python
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-resumable-media-python/.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+
}

docs/_static/custom.css

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,20 @@
11
div#python2-eol {
22
border-color: red;
33
border-width: medium;
4-
}
4+
}
55

66
/* Ensure minimum width for 'Parameters' / 'Returns' column */
77
dl.field-list > dt {
88
min-width: 100px
99
}
10+
11+
/* Insert space between methods for readability */
12+
dl.method {
13+
padding-top: 10px;
14+
padding-bottom: 10px
15+
}
16+
17+
/* Insert empty space between classes */
18+
dl.class {
19+
padding-bottom: 50px
20+
}

synth.metadata

Lines changed: 47 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,60 @@
33
{
44
"git": {
55
"name": ".",
6-
"remote": "git@github.com:googleapis/google-resumable-media-python",
7-
"sha": "30c3a9059f6028d97a1913a48d2d2065c040fc37"
6+
"remote": "https://github.com/googleapis/google-resumable-media-python.git",
7+
"sha": "1bcb561753e0f54eee2136991fee253471277af3"
88
}
99
},
1010
{
1111
"git": {
1212
"name": "synthtool",
1313
"remote": "https://github.com/googleapis/synthtool.git",
14-
"sha": "ff39353f34a36e7643b86e97724e4027ab466dc6"
14+
"sha": "043cc620d6a6111816d9e09f2a97208565fde958"
1515
}
1616
}
17+
],
18+
"generatedFiles": [
19+
".kokoro/build.sh",
20+
".kokoro/continuous/common.cfg",
21+
".kokoro/continuous/continuous.cfg",
22+
".kokoro/docker/docs/Dockerfile",
23+
".kokoro/docker/docs/fetch_gpg_keys.sh",
24+
".kokoro/docs/common.cfg",
25+
".kokoro/docs/docs-presubmit.cfg",
26+
".kokoro/docs/docs.cfg",
27+
".kokoro/populate-secrets.sh",
28+
".kokoro/presubmit/common.cfg",
29+
".kokoro/presubmit/presubmit.cfg",
30+
".kokoro/publish-docs.sh",
31+
".kokoro/release.sh",
32+
".kokoro/release/common.cfg",
33+
".kokoro/release/release.cfg",
34+
".kokoro/samples/lint/common.cfg",
35+
".kokoro/samples/lint/continuous.cfg",
36+
".kokoro/samples/lint/periodic.cfg",
37+
".kokoro/samples/lint/presubmit.cfg",
38+
".kokoro/samples/python3.6/common.cfg",
39+
".kokoro/samples/python3.6/continuous.cfg",
40+
".kokoro/samples/python3.6/periodic-head.cfg",
41+
".kokoro/samples/python3.6/periodic.cfg",
42+
".kokoro/samples/python3.6/presubmit.cfg",
43+
".kokoro/samples/python3.7/common.cfg",
44+
".kokoro/samples/python3.7/continuous.cfg",
45+
".kokoro/samples/python3.7/periodic-head.cfg",
46+
".kokoro/samples/python3.7/periodic.cfg",
47+
".kokoro/samples/python3.7/presubmit.cfg",
48+
".kokoro/samples/python3.8/common.cfg",
49+
".kokoro/samples/python3.8/continuous.cfg",
50+
".kokoro/samples/python3.8/periodic-head.cfg",
51+
".kokoro/samples/python3.8/periodic.cfg",
52+
".kokoro/samples/python3.8/presubmit.cfg",
53+
".kokoro/test-samples-against-head.sh",
54+
".kokoro/test-samples-impl.sh",
55+
".kokoro/test-samples.sh",
56+
".kokoro/trampoline.sh",
57+
".kokoro/trampoline_v2.sh",
58+
".trampolinerc",
59+
"docs/_static/custom.css",
60+
"docs/_templates/layout.html"
1761
]
1862
}

0 commit comments

Comments
 (0)