From 5481c42108dad747ba31a124e27dbb591e50ecbf 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 11:08:30 -0600 Subject: [PATCH] build: use trampoline_v2 for python samples and allow custom dockerfile (#6) Source-Link: https://github.com/googleapis/synthtool/commit/a7ed11ec0863c422ba2e73aafa75eab22c32b33d Post-Processor: gcr.io/repo-automation-bots/owlbot-python:latest@sha256:effb79ef0525b02611cada94df8d7a248758928579c03d522f26ed37f9867668 Co-authored-by: Owl Bot --- .../.github/.OwlBot.lock.yaml | 16 +--------------- .../.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 -- .../.trampolinerc | 17 ++++++++++++++--- 13 files changed, 24 insertions(+), 31 deletions(-) diff --git a/packages/google-cloud-bigquery-migration/.github/.OwlBot.lock.yaml b/packages/google-cloud-bigquery-migration/.github/.OwlBot.lock.yaml index 80347782c3c2..e24edd9af228 100644 --- a/packages/google-cloud-bigquery-migration/.github/.OwlBot.lock.yaml +++ b/packages/google-cloud-bigquery-migration/.github/.OwlBot.lock.yaml @@ -1,17 +1,3 @@ -# Copyright 2021 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - docker: image: gcr.io/repo-automation-bots/owlbot-python:latest - digest: sha256:0ccd9f4d714d36e311f60f407199dd460e43a99a125b5ca64b1d75f6e5f8581b + digest: sha256:effb79ef0525b02611cada94df8d7a248758928579c03d522f26ed37f9867668 diff --git a/packages/google-cloud-bigquery-migration/.kokoro/samples/lint/common.cfg b/packages/google-cloud-bigquery-migration/.kokoro/samples/lint/common.cfg index d53d2c6835aa..cb50eff143d5 100644 --- a/packages/google-cloud-bigquery-migration/.kokoro/samples/lint/common.cfg +++ b/packages/google-cloud-bigquery-migration/.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-bigquery-migration/.kokoro/trampoline.sh" \ No newline at end of file +build_file: "python-bigquery-migration/.kokoro/trampoline_v2.sh" \ No newline at end of file diff --git a/packages/google-cloud-bigquery-migration/.kokoro/samples/python3.6/common.cfg b/packages/google-cloud-bigquery-migration/.kokoro/samples/python3.6/common.cfg index 877ccab3c371..e13bc43351e7 100644 --- a/packages/google-cloud-bigquery-migration/.kokoro/samples/python3.6/common.cfg +++ b/packages/google-cloud-bigquery-migration/.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-bigquery-migration/.kokoro/trampoline.sh" \ No newline at end of file +build_file: "python-bigquery-migration/.kokoro/trampoline_v2.sh" \ No newline at end of file diff --git a/packages/google-cloud-bigquery-migration/.kokoro/samples/python3.6/periodic.cfg b/packages/google-cloud-bigquery-migration/.kokoro/samples/python3.6/periodic.cfg index 50fec9649732..71cd1e597e38 100644 --- a/packages/google-cloud-bigquery-migration/.kokoro/samples/python3.6/periodic.cfg +++ b/packages/google-cloud-bigquery-migration/.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-bigquery-migration/.kokoro/samples/python3.7/common.cfg b/packages/google-cloud-bigquery-migration/.kokoro/samples/python3.7/common.cfg index e15813e654df..fabfd2a14cfe 100644 --- a/packages/google-cloud-bigquery-migration/.kokoro/samples/python3.7/common.cfg +++ b/packages/google-cloud-bigquery-migration/.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-bigquery-migration/.kokoro/trampoline.sh" \ No newline at end of file +build_file: "python-bigquery-migration/.kokoro/trampoline_v2.sh" \ No newline at end of file diff --git a/packages/google-cloud-bigquery-migration/.kokoro/samples/python3.7/periodic.cfg b/packages/google-cloud-bigquery-migration/.kokoro/samples/python3.7/periodic.cfg index 50fec9649732..71cd1e597e38 100644 --- a/packages/google-cloud-bigquery-migration/.kokoro/samples/python3.7/periodic.cfg +++ b/packages/google-cloud-bigquery-migration/.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-bigquery-migration/.kokoro/samples/python3.8/common.cfg b/packages/google-cloud-bigquery-migration/.kokoro/samples/python3.8/common.cfg index 59180d5d14da..84f4c2bf72d5 100644 --- a/packages/google-cloud-bigquery-migration/.kokoro/samples/python3.8/common.cfg +++ b/packages/google-cloud-bigquery-migration/.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-bigquery-migration/.kokoro/trampoline.sh" \ No newline at end of file +build_file: "python-bigquery-migration/.kokoro/trampoline_v2.sh" \ No newline at end of file diff --git a/packages/google-cloud-bigquery-migration/.kokoro/samples/python3.8/periodic.cfg b/packages/google-cloud-bigquery-migration/.kokoro/samples/python3.8/periodic.cfg index 50fec9649732..71cd1e597e38 100644 --- a/packages/google-cloud-bigquery-migration/.kokoro/samples/python3.8/periodic.cfg +++ b/packages/google-cloud-bigquery-migration/.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-bigquery-migration/.kokoro/samples/python3.9/common.cfg b/packages/google-cloud-bigquery-migration/.kokoro/samples/python3.9/common.cfg index 0e2815e954d8..91a52b925eb7 100644 --- a/packages/google-cloud-bigquery-migration/.kokoro/samples/python3.9/common.cfg +++ b/packages/google-cloud-bigquery-migration/.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-bigquery-migration/.kokoro/trampoline.sh" \ No newline at end of file +build_file: "python-bigquery-migration/.kokoro/trampoline_v2.sh" \ No newline at end of file diff --git a/packages/google-cloud-bigquery-migration/.kokoro/samples/python3.9/periodic.cfg b/packages/google-cloud-bigquery-migration/.kokoro/samples/python3.9/periodic.cfg index 50fec9649732..71cd1e597e38 100644 --- a/packages/google-cloud-bigquery-migration/.kokoro/samples/python3.9/periodic.cfg +++ b/packages/google-cloud-bigquery-migration/.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-bigquery-migration/.kokoro/test-samples-against-head.sh b/packages/google-cloud-bigquery-migration/.kokoro/test-samples-against-head.sh index ff3868c88d1d..ba3a707b040c 100755 --- a/packages/google-cloud-bigquery-migration/.kokoro/test-samples-against-head.sh +++ b/packages/google-cloud-bigquery-migration/.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-bigquery-migration - exec .kokoro/test-samples-impl.sh diff --git a/packages/google-cloud-bigquery-migration/.kokoro/test-samples.sh b/packages/google-cloud-bigquery-migration/.kokoro/test-samples.sh index daf16dec9882..11c042d342d7 100755 --- a/packages/google-cloud-bigquery-migration/.kokoro/test-samples.sh +++ b/packages/google-cloud-bigquery-migration/.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-bigquery-migration - # 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-bigquery-migration/.trampolinerc b/packages/google-cloud-bigquery-migration/.trampolinerc index 383b6ec89fbc..0eee72ab62aa 100644 --- a/packages/google-cloud-bigquery-migration/.trampolinerc +++ b/packages/google-cloud-bigquery-migration/.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.