From 39b527a39f5cd56d4882b3874fc08eed4756cebe Mon Sep 17 00:00:00 2001 From: Takashi Matsuo Date: Thu, 30 Jul 2020 18:26:35 -0700 Subject: [PATCH] fix(python-library): add missing changes (#710) --- .../python_library/.kokoro/docs/common.cfg | 4 ++-- .../python_library/.kokoro/publish-docs.sh | 18 ++++-------------- 2 files changed, 6 insertions(+), 16 deletions(-) diff --git a/synthtool/gcp/templates/python_library/.kokoro/docs/common.cfg b/synthtool/gcp/templates/python_library/.kokoro/docs/common.cfg index 54fb4a873..bbed6a4dc 100644 --- a/synthtool/gcp/templates/python_library/.kokoro/docs/common.cfg +++ b/synthtool/gcp/templates/python_library/.kokoro/docs/common.cfg @@ -11,12 +11,12 @@ action { gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/trampoline" # Use the trampoline script to run in docker. -build_file: "{{ metadata['repo']['repo'].split('/')[1] }}/.kokoro/trampoline.sh" +build_file: "{{ metadata['repo']['repo'].split('/')[1] }}/.kokoro/trampoline_v2.sh" # Configure the docker image for kokoro-trampoline. env_vars: { key: "TRAMPOLINE_IMAGE" - value: "gcr.io/cloud-devrel-kokoro-resources/python-multi" + value: "gcr.io/cloud-devrel-kokoro-resources/python-lib-docs" } env_vars: { key: "TRAMPOLINE_BUILD_FILE" diff --git a/synthtool/gcp/templates/python_library/.kokoro/publish-docs.sh b/synthtool/gcp/templates/python_library/.kokoro/publish-docs.sh index 56469d148..8acb14e80 100755 --- a/synthtool/gcp/templates/python_library/.kokoro/publish-docs.sh +++ b/synthtool/gcp/templates/python_library/.kokoro/publish-docs.sh @@ -18,26 +18,16 @@ set -eo pipefail # Disable buffering, so that the logs stream through. export PYTHONUNBUFFERED=1 -cd github/{{ metadata['repo']['repo'].split('/')[1] }} - -# Remove old nox -python3.6 -m pip uninstall --yes --quiet nox-automation +export PATH="${HOME}/.local/bin:${PATH}" # Install nox -python3.6 -m pip install --upgrade --quiet nox -python3.6 -m nox --version +python3 -m pip install --user --upgrade --quiet nox +python3 -m nox --version # build docs nox -s docs -python3 -m pip install gcp-docuploader - -# install a json parser -sudo apt-get update -sudo apt-get -y install software-properties-common -sudo add-apt-repository universe -sudo apt-get update -sudo apt-get -y install jq +python3 -m pip install --user gcp-docuploader # create metadata python3 -m docuploader create-metadata \