From 49208cdd2215f2cb58ca74b8f7a04ec8bec33df1 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Tue, 5 Oct 2021 13:13:02 -0600 Subject: [PATCH] build: use trampoline_v2 for python samples and allow custom dockerfile (#265) Source-Link: https://github.com/googleapis/synthtool/commit/a7ed11ec0863c422ba2e73aafa75eab22c32b33d Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-python:latest@sha256:6e7328583be8edd3ba8f35311c76a1ecbc823010279ccb6ab46b7a76e25eafcc Co-authored-by: Owl Bot --- .../.github/.OwlBot.lock.yaml | 2 +- .../.kokoro/samples/lint/common.cfg | 2 +- .../.kokoro/samples/python3.6/common.cfg | 2 +- .../.kokoro/samples/python3.6/periodic.cfg | 2 +- .../.kokoro/samples/python3.7/common.cfg | 2 +- .../.kokoro/samples/python3.7/periodic.cfg | 2 +- .../.kokoro/samples/python3.8/common.cfg | 2 +- .../.kokoro/samples/python3.8/periodic.cfg | 2 +- .../.kokoro/samples/python3.9/common.cfg | 2 +- .../.kokoro/samples/python3.9/periodic.cfg | 2 +- .../.kokoro/test-samples-against-head.sh | 2 -- .../.kokoro/test-samples.sh | 2 -- packages/google-cloud-translate/.trampolinerc | 17 ++++++++++++++--- 13 files changed, 24 insertions(+), 17 deletions(-) diff --git a/packages/google-cloud-translate/.github/.OwlBot.lock.yaml b/packages/google-cloud-translate/.github/.OwlBot.lock.yaml index ae6c57fad807..ee94722ab57b 100644 --- a/packages/google-cloud-translate/.github/.OwlBot.lock.yaml +++ b/packages/google-cloud-translate/.github/.OwlBot.lock.yaml @@ -1,3 +1,3 @@ docker: image: gcr.io/cloud-devrel-public-resources/owlbot-python:latest - digest: sha256:82b12321da4446a73cb11bcb6812fbec8c105abda3946d46e6394e5fbfb64c0f + digest: sha256:6e7328583be8edd3ba8f35311c76a1ecbc823010279ccb6ab46b7a76e25eafcc diff --git a/packages/google-cloud-translate/.kokoro/samples/lint/common.cfg b/packages/google-cloud-translate/.kokoro/samples/lint/common.cfg index 782a7fb5b2d3..d92a6b40e63a 100644 --- a/packages/google-cloud-translate/.kokoro/samples/lint/common.cfg +++ b/packages/google-cloud-translate/.kokoro/samples/lint/common.cfg @@ -31,4 +31,4 @@ gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/python-docs-samples" gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/trampoline" # Use the trampoline script to run in docker. -build_file: "python-translate/.kokoro/trampoline.sh" \ No newline at end of file +build_file: "python-translate/.kokoro/trampoline_v2.sh" \ No newline at end of file diff --git a/packages/google-cloud-translate/.kokoro/samples/python3.6/common.cfg b/packages/google-cloud-translate/.kokoro/samples/python3.6/common.cfg index 0afe4cf9d2be..290dfe0f0f2b 100644 --- a/packages/google-cloud-translate/.kokoro/samples/python3.6/common.cfg +++ b/packages/google-cloud-translate/.kokoro/samples/python3.6/common.cfg @@ -37,4 +37,4 @@ gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/python-docs-samples" gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/trampoline" # Use the trampoline script to run in docker. -build_file: "python-translate/.kokoro/trampoline.sh" \ No newline at end of file +build_file: "python-translate/.kokoro/trampoline_v2.sh" \ No newline at end of file diff --git a/packages/google-cloud-translate/.kokoro/samples/python3.6/periodic.cfg b/packages/google-cloud-translate/.kokoro/samples/python3.6/periodic.cfg index 50fec9649732..71cd1e597e38 100644 --- a/packages/google-cloud-translate/.kokoro/samples/python3.6/periodic.cfg +++ b/packages/google-cloud-translate/.kokoro/samples/python3.6/periodic.cfg @@ -3,4 +3,4 @@ env_vars: { key: "INSTALL_LIBRARY_FROM_SOURCE" value: "False" -} \ No newline at end of file +} diff --git a/packages/google-cloud-translate/.kokoro/samples/python3.7/common.cfg b/packages/google-cloud-translate/.kokoro/samples/python3.7/common.cfg index b82e68aea280..ef2a4632eb98 100644 --- a/packages/google-cloud-translate/.kokoro/samples/python3.7/common.cfg +++ b/packages/google-cloud-translate/.kokoro/samples/python3.7/common.cfg @@ -37,4 +37,4 @@ gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/python-docs-samples" gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/trampoline" # Use the trampoline script to run in docker. -build_file: "python-translate/.kokoro/trampoline.sh" \ No newline at end of file +build_file: "python-translate/.kokoro/trampoline_v2.sh" \ No newline at end of file diff --git a/packages/google-cloud-translate/.kokoro/samples/python3.7/periodic.cfg b/packages/google-cloud-translate/.kokoro/samples/python3.7/periodic.cfg index 50fec9649732..71cd1e597e38 100644 --- a/packages/google-cloud-translate/.kokoro/samples/python3.7/periodic.cfg +++ b/packages/google-cloud-translate/.kokoro/samples/python3.7/periodic.cfg @@ -3,4 +3,4 @@ env_vars: { key: "INSTALL_LIBRARY_FROM_SOURCE" value: "False" -} \ No newline at end of file +} diff --git a/packages/google-cloud-translate/.kokoro/samples/python3.8/common.cfg b/packages/google-cloud-translate/.kokoro/samples/python3.8/common.cfg index 9a34eac6b038..d00f60b3d945 100644 --- a/packages/google-cloud-translate/.kokoro/samples/python3.8/common.cfg +++ b/packages/google-cloud-translate/.kokoro/samples/python3.8/common.cfg @@ -37,4 +37,4 @@ gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/python-docs-samples" gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/trampoline" # Use the trampoline script to run in docker. -build_file: "python-translate/.kokoro/trampoline.sh" \ No newline at end of file +build_file: "python-translate/.kokoro/trampoline_v2.sh" \ No newline at end of file diff --git a/packages/google-cloud-translate/.kokoro/samples/python3.8/periodic.cfg b/packages/google-cloud-translate/.kokoro/samples/python3.8/periodic.cfg index 50fec9649732..71cd1e597e38 100644 --- a/packages/google-cloud-translate/.kokoro/samples/python3.8/periodic.cfg +++ b/packages/google-cloud-translate/.kokoro/samples/python3.8/periodic.cfg @@ -3,4 +3,4 @@ env_vars: { key: "INSTALL_LIBRARY_FROM_SOURCE" value: "False" -} \ No newline at end of file +} diff --git a/packages/google-cloud-translate/.kokoro/samples/python3.9/common.cfg b/packages/google-cloud-translate/.kokoro/samples/python3.9/common.cfg index 68305cbe1c3a..d8f225ec2274 100644 --- a/packages/google-cloud-translate/.kokoro/samples/python3.9/common.cfg +++ b/packages/google-cloud-translate/.kokoro/samples/python3.9/common.cfg @@ -37,4 +37,4 @@ gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/python-docs-samples" gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/trampoline" # Use the trampoline script to run in docker. -build_file: "python-translate/.kokoro/trampoline.sh" \ No newline at end of file +build_file: "python-translate/.kokoro/trampoline_v2.sh" \ No newline at end of file diff --git a/packages/google-cloud-translate/.kokoro/samples/python3.9/periodic.cfg b/packages/google-cloud-translate/.kokoro/samples/python3.9/periodic.cfg index 50fec9649732..71cd1e597e38 100644 --- a/packages/google-cloud-translate/.kokoro/samples/python3.9/periodic.cfg +++ b/packages/google-cloud-translate/.kokoro/samples/python3.9/periodic.cfg @@ -3,4 +3,4 @@ env_vars: { key: "INSTALL_LIBRARY_FROM_SOURCE" value: "False" -} \ No newline at end of file +} diff --git a/packages/google-cloud-translate/.kokoro/test-samples-against-head.sh b/packages/google-cloud-translate/.kokoro/test-samples-against-head.sh index e1137ce0bd4f..ba3a707b040c 100755 --- a/packages/google-cloud-translate/.kokoro/test-samples-against-head.sh +++ b/packages/google-cloud-translate/.kokoro/test-samples-against-head.sh @@ -23,6 +23,4 @@ set -eo pipefail # Enables `**` to include files nested inside sub-folders shopt -s globstar -cd github/python-translate - exec .kokoro/test-samples-impl.sh diff --git a/packages/google-cloud-translate/.kokoro/test-samples.sh b/packages/google-cloud-translate/.kokoro/test-samples.sh index 71a494e37d39..11c042d342d7 100755 --- a/packages/google-cloud-translate/.kokoro/test-samples.sh +++ b/packages/google-cloud-translate/.kokoro/test-samples.sh @@ -24,8 +24,6 @@ set -eo pipefail # Enables `**` to include files nested inside sub-folders shopt -s globstar -cd github/python-translate - # Run periodic samples tests at latest release if [[ $KOKORO_BUILD_ARTIFACTS_SUBDIR = *"periodic"* ]]; then # preserving the test runner implementation. diff --git a/packages/google-cloud-translate/.trampolinerc b/packages/google-cloud-translate/.trampolinerc index 383b6ec89fbc..0eee72ab62aa 100644 --- a/packages/google-cloud-translate/.trampolinerc +++ b/packages/google-cloud-translate/.trampolinerc @@ -16,15 +16,26 @@ # Add required env vars here. required_envvars+=( - "STAGING_BUCKET" - "V2_STAGING_BUCKET" ) # Add env vars which are passed down into the container here. pass_down_envvars+=( + "NOX_SESSION" + ############### + # Docs builds + ############### "STAGING_BUCKET" "V2_STAGING_BUCKET" - "NOX_SESSION" + ################## + # Samples builds + ################## + "INSTALL_LIBRARY_FROM_SOURCE" + "RUN_TESTS_SESSION" + "BUILD_SPECIFIC_GCLOUD_PROJECT" + # Target directories. + "RUN_TESTS_DIRS" + # The nox session to run. + "RUN_TESTS_SESSION" ) # Prevent unintentional override on the default image.