From f0c587d61d23ef772336817bffb5f51d7007141e Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Fri, 14 Jan 2022 14:14:12 +0000 Subject: [PATCH] chore(python): update release.sh to use keystore (#293) build: switch to release-please for tagging --- .../google-cloud-vision/.github/.OwlBot.lock.yaml | 2 +- .../google-cloud-vision/.github/release-please.yml | 1 + .../google-cloud-vision/.github/release-trigger.yml | 1 + packages/google-cloud-vision/.kokoro/release.sh | 2 +- .../google-cloud-vision/.kokoro/release/common.cfg | 12 +++++++++++- 5 files changed, 15 insertions(+), 3 deletions(-) create mode 100644 packages/google-cloud-vision/.github/release-trigger.yml diff --git a/packages/google-cloud-vision/.github/.OwlBot.lock.yaml b/packages/google-cloud-vision/.github/.OwlBot.lock.yaml index 6b8a73b31465..eecb84c21b27 100644 --- a/packages/google-cloud-vision/.github/.OwlBot.lock.yaml +++ b/packages/google-cloud-vision/.github/.OwlBot.lock.yaml @@ -1,3 +1,3 @@ docker: image: gcr.io/cloud-devrel-public-resources/owlbot-python:latest - digest: sha256:36a95b8f494e4674dc9eee9af98961293b51b86b3649942aac800ae6c1f796d4 + digest: sha256:ae600f36b6bc972b368367b6f83a1d91ec2c82a4a116b383d67d547c56fe6de3 diff --git a/packages/google-cloud-vision/.github/release-please.yml b/packages/google-cloud-vision/.github/release-please.yml index 4507ad0598a5..466597e5b196 100644 --- a/packages/google-cloud-vision/.github/release-please.yml +++ b/packages/google-cloud-vision/.github/release-please.yml @@ -1 +1,2 @@ releaseType: python +handleGHRelease: true diff --git a/packages/google-cloud-vision/.github/release-trigger.yml b/packages/google-cloud-vision/.github/release-trigger.yml new file mode 100644 index 000000000000..d4ca94189e16 --- /dev/null +++ b/packages/google-cloud-vision/.github/release-trigger.yml @@ -0,0 +1 @@ +enabled: true diff --git a/packages/google-cloud-vision/.kokoro/release.sh b/packages/google-cloud-vision/.kokoro/release.sh index 15990123f18f..fd81d068af50 100755 --- a/packages/google-cloud-vision/.kokoro/release.sh +++ b/packages/google-cloud-vision/.kokoro/release.sh @@ -26,7 +26,7 @@ python3 -m pip install --upgrade twine wheel setuptools export PYTHONUNBUFFERED=1 # Move into the package, build the distribution and upload. -TWINE_PASSWORD=$(cat "${KOKORO_GFILE_DIR}/secret_manager/google-cloud-pypi-token") +TWINE_PASSWORD=$(cat "${KOKORO_KEYSTORE_DIR}/73713_google-cloud-pypi-token-keystore-1") cd github/python-vision python3 setup.py sdist bdist_wheel twine upload --username __token__ --password "${TWINE_PASSWORD}" dist/* diff --git a/packages/google-cloud-vision/.kokoro/release/common.cfg b/packages/google-cloud-vision/.kokoro/release/common.cfg index de8ffad4dd92..4e14286f56d2 100644 --- a/packages/google-cloud-vision/.kokoro/release/common.cfg +++ b/packages/google-cloud-vision/.kokoro/release/common.cfg @@ -23,8 +23,18 @@ env_vars: { value: "github/python-vision/.kokoro/release.sh" } +# Fetch PyPI password +before_action { + fetch_keystore { + keystore_resource { + keystore_config_id: 73713 + keyname: "google-cloud-pypi-token-keystore-1" + } + } +} + # Tokens needed to report release status back to GitHub env_vars: { key: "SECRET_MANAGER_KEYS" - value: "releasetool-publish-reporter-app,releasetool-publish-reporter-googleapis-installation,releasetool-publish-reporter-pem,google-cloud-pypi-token" + value: "releasetool-publish-reporter-app,releasetool-publish-reporter-googleapis-installation,releasetool-publish-reporter-pem" }