Skip to content

Commit

Permalink
build: use trampoline_v2 for python samples and allow custom dockerfi…
Browse files Browse the repository at this point in the history
…le (#182)

Source-Link: googleapis/synthtool@a7ed11e
Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-python:latest@sha256:6e7328583be8edd3ba8f35311c76a1ecbc823010279ccb6ab46b7a76e25eafcc

Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
  • Loading branch information
gcf-owl-bot[bot] and gcf-owl-bot[bot] authored Oct 5, 2021
1 parent c79af3a commit 6870534
Show file tree
Hide file tree
Showing 13 changed files with 24 additions and 17 deletions.
2 changes: 1 addition & 1 deletion packages/google-cloud-build/.github/.OwlBot.lock.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
docker:
image: gcr.io/cloud-devrel-public-resources/owlbot-python:latest
digest: sha256:82b12321da4446a73cb11bcb6812fbec8c105abda3946d46e6394e5fbfb64c0f
digest: sha256:6e7328583be8edd3ba8f35311c76a1ecbc823010279ccb6ab46b7a76e25eafcc
Original file line number Diff line number Diff line change
Expand Up @@ -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-cloudbuild/.kokoro/trampoline.sh"
build_file: "python-cloudbuild/.kokoro/trampoline_v2.sh"
Original file line number Diff line number Diff line change
Expand Up @@ -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-cloudbuild/.kokoro/trampoline.sh"
build_file: "python-cloudbuild/.kokoro/trampoline_v2.sh"
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@
env_vars: {
key: "INSTALL_LIBRARY_FROM_SOURCE"
value: "False"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -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-cloudbuild/.kokoro/trampoline.sh"
build_file: "python-cloudbuild/.kokoro/trampoline_v2.sh"
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@
env_vars: {
key: "INSTALL_LIBRARY_FROM_SOURCE"
value: "False"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -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-cloudbuild/.kokoro/trampoline.sh"
build_file: "python-cloudbuild/.kokoro/trampoline_v2.sh"
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@
env_vars: {
key: "INSTALL_LIBRARY_FROM_SOURCE"
value: "False"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -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-cloudbuild/.kokoro/trampoline.sh"
build_file: "python-cloudbuild/.kokoro/trampoline_v2.sh"
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@
env_vars: {
key: "INSTALL_LIBRARY_FROM_SOURCE"
value: "False"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,4 @@ set -eo pipefail
# Enables `**` to include files nested inside sub-folders
shopt -s globstar

cd github/python-cloudbuild

exec .kokoro/test-samples-impl.sh
2 changes: 0 additions & 2 deletions packages/google-cloud-build/.kokoro/test-samples.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,6 @@ set -eo pipefail
# Enables `**` to include files nested inside sub-folders
shopt -s globstar

cd github/python-cloudbuild

# Run periodic samples tests at latest release
if [[ $KOKORO_BUILD_ARTIFACTS_SUBDIR = *"periodic"* ]]; then
# preserving the test runner implementation.
Expand Down
17 changes: 14 additions & 3 deletions packages/google-cloud-build/.trampolinerc
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit 6870534

Please sign in to comment.