Skip to content

Commit 348fc8f

Browse files
chore: migrate samples to google-cloud-python system test infrastructure (#2768)
* chore: migrate samples to system infra * fix: remove BUILD_SPECIFIC_GCLOUD_PROJECT and fix trampoline image * fix: restore .kokoro/samples path for Kokoro configs * fix: use python3 instead of python3.9 in test runner * fix: use --user for pip install to avoid permission denied * fix: remove pip install nox as it fails in virtualenv and nox is already installed * fix: use trampoline.sh to properly initialize python-multi environment * fix: change directory to project root before executing test-system-impl * fix: set CLOUD_STORAGE_BUCKET env var for compute tests * revert: move tests/system back to samples * revert: rename test scripts back to their original names * chore: remove tests for unsupported python 3.7-3.9 * chore: remove Python 3.7-3.9 from required github presubmit checks * chore: retrigger CI * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * chore: revert owlbot overwrite and explicitly exclude samples from owlbot sync * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --------- Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
1 parent 6e471c0 commit 348fc8f

26 files changed

Lines changed: 41 additions & 296 deletions

‎.github/sync-repo-settings.yaml‎

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,6 @@ branchProtectionRules:
1111
- 'Kokoro'
1212
- 'OwlBot Post Processor'
1313
- 'Samples - Lint'
14-
- 'Samples - Python 3.7'
15-
- 'Samples - Python 3.8'
16-
- 'Samples - Python 3.9'
1714
- 'Samples - Python 3.10'
1815
- 'Samples - Python 3.11'
1916
- 'Samples - Python 3.12'

‎.kokoro/samples/lint/common.cfg‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,14 +21,14 @@ env_vars: {
2121
# Configure the docker image for kokoro-trampoline.
2222
env_vars: {
2323
key: "TRAMPOLINE_IMAGE"
24-
value: "gcr.io/cloud-devrel-kokoro-resources/python-samples-testing-docker"
24+
value: "gcr.io/cloud-devrel-kokoro-resources/python-multi"
2525
}
2626

2727
# Download secrets for samples
28-
gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/python-docs-samples"
28+
gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/google-cloud-python"
2929

3030
# Download trampoline resources.
3131
gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/trampoline"
3232

3333
# Use the trampoline script to run in docker.
34-
build_file: "google-api-python-client/.kokoro/trampoline_v2.sh"
34+
build_file: "google-api-python-client/.kokoro/trampoline.sh"

‎.kokoro/samples/python3.10/common.cfg‎

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,6 @@ env_vars: {
1313
value: "py-3.10"
1414
}
1515

16-
# Declare build specific Cloud project.
17-
env_vars: {
18-
key: "BUILD_SPECIFIC_GCLOUD_PROJECT"
19-
value: "python-docs-samples-tests-310"
20-
}
21-
2216
env_vars: {
2317
key: "TRAMPOLINE_BUILD_FILE"
2418
value: "github/google-api-python-client/.kokoro/test-samples.sh"
@@ -27,14 +21,14 @@ env_vars: {
2721
# Configure the docker image for kokoro-trampoline.
2822
env_vars: {
2923
key: "TRAMPOLINE_IMAGE"
30-
value: "gcr.io/cloud-devrel-kokoro-resources/python-samples-testing-docker"
24+
value: "gcr.io/cloud-devrel-kokoro-resources/python-multi"
3125
}
3226

3327
# Download secrets for samples
34-
gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/python-docs-samples"
28+
gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/google-cloud-python"
3529

3630
# Download trampoline resources.
3731
gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/trampoline"
3832

3933
# Use the trampoline script to run in docker.
40-
build_file: "google-api-python-client/.kokoro/trampoline_v2.sh"
34+
build_file: "google-api-python-client/.kokoro/trampoline.sh"

‎.kokoro/samples/python3.11/common.cfg‎

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,6 @@ env_vars: {
1313
value: "py-3.11"
1414
}
1515

16-
# Declare build specific Cloud project.
17-
env_vars: {
18-
key: "BUILD_SPECIFIC_GCLOUD_PROJECT"
19-
value: "python-docs-samples-tests-311"
20-
}
21-
2216
env_vars: {
2317
key: "TRAMPOLINE_BUILD_FILE"
2418
value: "github/google-api-python-client/.kokoro/test-samples.sh"
@@ -27,14 +21,14 @@ env_vars: {
2721
# Configure the docker image for kokoro-trampoline.
2822
env_vars: {
2923
key: "TRAMPOLINE_IMAGE"
30-
value: "gcr.io/cloud-devrel-kokoro-resources/python-samples-testing-docker"
24+
value: "gcr.io/cloud-devrel-kokoro-resources/python-multi"
3125
}
3226

3327
# Download secrets for samples
34-
gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/python-docs-samples"
28+
gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/google-cloud-python"
3529

3630
# Download trampoline resources.
3731
gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/trampoline"
3832

3933
# Use the trampoline script to run in docker.
40-
build_file: "google-api-python-client/.kokoro/trampoline_v2.sh"
34+
build_file: "google-api-python-client/.kokoro/trampoline.sh"

‎.kokoro/samples/python3.12/common.cfg‎

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,6 @@ env_vars: {
1313
value: "py-3.12"
1414
}
1515

16-
# Declare build specific Cloud project.
17-
env_vars: {
18-
key: "BUILD_SPECIFIC_GCLOUD_PROJECT"
19-
value: "python-docs-samples-tests-312"
20-
}
21-
2216
env_vars: {
2317
key: "TRAMPOLINE_BUILD_FILE"
2418
value: "github/google-api-python-client/.kokoro/test-samples.sh"
@@ -27,14 +21,14 @@ env_vars: {
2721
# Configure the docker image for kokoro-trampoline.
2822
env_vars: {
2923
key: "TRAMPOLINE_IMAGE"
30-
value: "gcr.io/cloud-devrel-kokoro-resources/python-samples-testing-docker"
24+
value: "gcr.io/cloud-devrel-kokoro-resources/python-multi"
3125
}
3226

3327
# Download secrets for samples
34-
gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/python-docs-samples"
28+
gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/google-cloud-python"
3529

3630
# Download trampoline resources.
3731
gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/trampoline"
3832

3933
# Use the trampoline script to run in docker.
40-
build_file: "google-api-python-client/.kokoro/trampoline_v2.sh"
34+
build_file: "google-api-python-client/.kokoro/trampoline.sh"

‎.kokoro/samples/python3.13/common.cfg‎

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,6 @@ env_vars: {
1313
value: "py-3.13"
1414
}
1515

16-
# Declare build specific Cloud project.
17-
env_vars: {
18-
key: "BUILD_SPECIFIC_GCLOUD_PROJECT"
19-
value: "python-docs-samples-tests-313"
20-
}
21-
2216
env_vars: {
2317
key: "TRAMPOLINE_BUILD_FILE"
2418
value: "github/google-api-python-client/.kokoro/test-samples.sh"
@@ -27,14 +21,14 @@ env_vars: {
2721
# Configure the docker image for kokoro-trampoline.
2822
env_vars: {
2923
key: "TRAMPOLINE_IMAGE"
30-
value: "gcr.io/cloud-devrel-kokoro-resources/python-samples-testing-docker"
24+
value: "gcr.io/cloud-devrel-kokoro-resources/python-multi"
3125
}
3226

3327
# Download secrets for samples
34-
gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/python-docs-samples"
28+
gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/google-cloud-python"
3529

3630
# Download trampoline resources.
3731
gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/trampoline"
3832

3933
# Use the trampoline script to run in docker.
40-
build_file: "google-api-python-client/.kokoro/trampoline_v2.sh"
34+
build_file: "google-api-python-client/.kokoro/trampoline.sh"

‎.kokoro/samples/python3.14/common.cfg‎

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,6 @@ env_vars: {
1313
value: "py-3.14"
1414
}
1515

16-
# Declare build specific Cloud project.
17-
env_vars: {
18-
key: "BUILD_SPECIFIC_GCLOUD_PROJECT"
19-
value: "python-docs-samples-tests-314"
20-
}
21-
2216
env_vars: {
2317
key: "TRAMPOLINE_BUILD_FILE"
2418
value: "github/google-api-python-client/.kokoro/test-samples.sh"
@@ -27,14 +21,14 @@ env_vars: {
2721
# Configure the docker image for kokoro-trampoline.
2822
env_vars: {
2923
key: "TRAMPOLINE_IMAGE"
30-
value: "gcr.io/cloud-devrel-kokoro-resources/python-samples-testing-docker"
24+
value: "gcr.io/cloud-devrel-kokoro-resources/python-multi"
3125
}
3226

3327
# Download secrets for samples
34-
gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/python-docs-samples"
28+
gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/google-cloud-python"
3529

3630
# Download trampoline resources.
3731
gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/trampoline"
3832

3933
# Use the trampoline script to run in docker.
40-
build_file: "google-api-python-client/.kokoro/trampoline_v2.sh"
34+
build_file: "google-api-python-client/.kokoro/trampoline.sh"

‎.kokoro/samples/python3.7/common.cfg‎

Lines changed: 0 additions & 40 deletions
This file was deleted.

‎.kokoro/samples/python3.7/continuous.cfg‎

Lines changed: 0 additions & 6 deletions
This file was deleted.

‎.kokoro/samples/python3.7/periodic-head.cfg‎

Lines changed: 0 additions & 11 deletions
This file was deleted.

0 commit comments

Comments
 (0)