Skip to content

Commit

Permalink
Merge branch 'GoogleCloudPlatform:main' into gmn_labels
Browse files Browse the repository at this point in the history
  • Loading branch information
bcreddy-gcp authored Mar 12, 2024
2 parents 2a7e0c4 + a6ceb9e commit 0d4e6a5
Show file tree
Hide file tree
Showing 231 changed files with 11,264 additions and 706 deletions.
6 changes: 3 additions & 3 deletions .ci/gcb-community-checker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ steps:
- name: 'gcr.io/graphite-docker-images/go-plus'
entrypoint: '/workspace/.ci/scripts/go-plus/magician/exec.sh'
id: community-checker
secretEnv: ["GITHUB_TOKEN", "GENERATE_DIFFS_TRIGGER"]
secretEnv: ["GITHUB_TOKEN_MAGIC_MODULES", "GENERATE_DIFFS_TRIGGER"]
timeout: 8000s
args:
- "community-checker"
Expand All @@ -74,7 +74,7 @@ steps:

availableSecrets:
secretManager:
- versionName: projects/673497134629/secrets/github-magician-token/versions/latest
env: GITHUB_TOKEN
- versionName: projects/673497134629/secrets/github-magician-token-generate-diffs-magic-modules/versions/latest
env: GITHUB_TOKEN_MAGIC_MODULES
- versionName: projects/673497134629/secrets/ci-trigger-generate-diffs/versions/latest
env: GENERATE_DIFFS_TRIGGER
10 changes: 3 additions & 7 deletions .ci/gcb-contributor-membership-checker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,21 +62,17 @@ steps:
entrypoint: "/workspace/.ci/scripts/go-plus/magician/exec.sh"
id: contributor-membership-checker
secretEnv:
["GITHUB_TOKEN", "GENERATE_DIFFS_TRIGGER", "COMMUNITY_CHECKER_TRIGGER"]
["GITHUB_TOKEN_MAGIC_MODULES", "GENERATE_DIFFS_TRIGGER", "COMMUNITY_CHECKER_TRIGGER"]
timeout: 8000s
args:
- "membership-checker"
- $_PR_NUMBER
- $COMMIT_SHA
- $BRANCH_NAME
- $_HEAD_REPO_URL
- $_HEAD_BRANCH
- $_BASE_BRANCH

availableSecrets:
secretManager:
- versionName: projects/673497134629/secrets/github-magician-token/versions/latest
env: GITHUB_TOKEN
- versionName: projects/673497134629/secrets/github-magician-token-generate-diffs-magic-modules/versions/latest
env: GITHUB_TOKEN_MAGIC_MODULES
- versionName: projects/673497134629/secrets/ci-trigger-generate-diffs/versions/latest
env: GENERATE_DIFFS_TRIGGER
- versionName: projects/673497134629/secrets/ci-trigger-community-checker/versions/latest
Expand Down
36 changes: 19 additions & 17 deletions .ci/gcb-generate-diffs-new.yml
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ steps:
- name: 'gcr.io/graphite-docker-images/build-environment'
entrypoint: '/workspace/.ci/scripts/go-plus/magician/exec.sh'
id: tpg-head
secretEnv: ["GITHUB_TOKEN"]
secretEnv: ["GITHUB_TOKEN_DOWNSTREAMS"]
waitFor: ["build-magician-binary"]
env:
- BASE_BRANCH=$_BASE_BRANCH
Expand All @@ -86,7 +86,7 @@ steps:
- name: 'gcr.io/graphite-docker-images/build-environment'
entrypoint: '/workspace/.ci/scripts/go-plus/magician/exec.sh'
id: tpg-base
secretEnv: ["GITHUB_TOKEN"]
secretEnv: ["GITHUB_TOKEN_DOWNSTREAMS"]
waitFor: ["build-magician-binary"]
env:
- BASE_BRANCH=$_BASE_BRANCH
Expand All @@ -99,7 +99,7 @@ steps:

- name: 'gcr.io/graphite-docker-images/build-environment'
entrypoint: '/workspace/.ci/scripts/go-plus/magician/exec.sh'
secretEnv: ["GITHUB_TOKEN"]
secretEnv: ["GITHUB_TOKEN_DOWNSTREAMS"]
id: tpgb-head
waitFor: ["build-magician-binary"]
env:
Expand All @@ -114,7 +114,7 @@ steps:
- name: 'gcr.io/graphite-docker-images/build-environment'
entrypoint: '/workspace/.ci/scripts/go-plus/magician/exec.sh'
id: tpgb-base
secretEnv: ["GITHUB_TOKEN"]
secretEnv: ["GITHUB_TOKEN_DOWNSTREAMS"]
waitFor: ["build-magician-binary"]
env:
- BASE_BRANCH=$_BASE_BRANCH
Expand All @@ -128,7 +128,7 @@ steps:
- name: 'gcr.io/graphite-docker-images/build-environment'
entrypoint: '/workspace/.ci/scripts/go-plus/magician/exec.sh'
id: tgc-head
secretEnv: ["GITHUB_TOKEN"]
secretEnv: ["GITHUB_TOKEN_DOWNSTREAMS"]
waitFor: ["build-magician-binary"]
env:
- BASE_BRANCH=$_BASE_BRANCH
Expand All @@ -142,7 +142,7 @@ steps:
- name: 'gcr.io/graphite-docker-images/build-environment'
entrypoint: '/workspace/.ci/scripts/go-plus/magician/exec.sh'
id: tgc-base
secretEnv: ["GITHUB_TOKEN"]
secretEnv: ["GITHUB_TOKEN_DOWNSTREAMS"]
waitFor: ["build-magician-binary"]
env:
- BASE_BRANCH=$_BASE_BRANCH
Expand All @@ -156,7 +156,7 @@ steps:
- name: 'gcr.io/graphite-docker-images/build-environment'
entrypoint: '/workspace/.ci/scripts/go-plus/magician/exec.sh'
id: tf-oics-head
secretEnv: ["GITHUB_TOKEN"]
secretEnv: ["GITHUB_TOKEN_DOWNSTREAMS"]
waitFor: ["build-magician-binary"]
env:
- BASE_BRANCH=$_BASE_BRANCH
Expand All @@ -170,7 +170,7 @@ steps:
- name: 'gcr.io/graphite-docker-images/build-environment'
entrypoint: '/workspace/.ci/scripts/go-plus/magician/exec.sh'
id: tf-oics-base
secretEnv: ["GITHUB_TOKEN"]
secretEnv: ["GITHUB_TOKEN_DOWNSTREAMS"]
waitFor: ["build-magician-binary"]
env:
- BASE_BRANCH=$_BASE_BRANCH
Expand All @@ -184,7 +184,7 @@ steps:
- name: 'gcr.io/graphite-docker-images/go-plus'
entrypoint: '/workspace/.ci/scripts/go-plus/magician/exec.sh'
id: diff
secretEnv: ["GITHUB_TOKEN"]
secretEnv: ["GITHUB_TOKEN_DOWNSTREAMS", "GITHUB_TOKEN_MAGIC_MODULES"]
args:
- 'generate-comment'
env:
Expand All @@ -198,7 +198,7 @@ steps:
id: tgc-test
allowFailure: true
entrypoint: '/workspace/.ci/scripts/go-plus/magician/exec.sh'
secretEnv: ["GITHUB_TOKEN"]
secretEnv: ["GITHUB_TOKEN_MAGIC_MODULES"]
waitFor: ["tpgb-head", "tpgb-base", "tgc-head", "tgc-base"]
args:
- 'test-tgc'
Expand All @@ -210,7 +210,7 @@ steps:
id: tgc-test-integration
entrypoint: '/workspace/.ci/scripts/go-plus/tgc-tester-integration/test_tgc_integration.sh'
allowFailure: true
secretEnv: ["GITHUB_TOKEN"]
secretEnv: ["GITHUB_TOKEN_MAGIC_MODULES"]
waitFor: ["tpgb-head", "tpgb-base", "tgc-head", "tgc-base"]
env:
- TEST_PROJECT=$_VALIDATOR_TEST_PROJECT
Expand All @@ -229,7 +229,7 @@ steps:
id: tpgb-test
allowFailure: true
entrypoint: '/workspace/.ci/scripts/go-plus/magician/exec.sh'
secretEnv: ["GITHUB_TOKEN"]
secretEnv: ["GITHUB_TOKEN_MAGIC_MODULES"]
waitFor: ["tpgb-head", "tpgb-base"]
args:
- 'test-tpg'
Expand All @@ -242,7 +242,7 @@ steps:
id: tpg-test
allowFailure: true
entrypoint: '/workspace/.ci/scripts/go-plus/magician/exec.sh'
secretEnv: ["GITHUB_TOKEN"]
secretEnv: ["GITHUB_TOKEN_MAGIC_MODULES"]
waitFor: ["tpg-head", "tpg-base"]
args:
- 'test-tpg'
Expand All @@ -254,7 +254,7 @@ steps:
- name: 'gcr.io/graphite-docker-images/go-plus'
id: gcb-tpg-vcr-test
entrypoint: '/workspace/.ci/scripts/go-plus/magician/exec.sh'
secretEnv: ["GITHUB_TOKEN", "GOOGLE_BILLING_ACCOUNT", "GOOGLE_CUST_ID", "GOOGLE_FIRESTORE_PROJECT", "GOOGLE_IDENTITY_USER", "GOOGLE_MASTER_BILLING_ACCOUNT", "GOOGLE_ORG", "GOOGLE_ORG_2", "GOOGLE_ORG_DOMAIN", "GOOGLE_PROJECT", "GOOGLE_PROJECT_NUMBER", "GOOGLE_SERVICE_ACCOUNT", "SA_KEY", "GOOGLE_PUBLIC_AVERTISED_PREFIX_DESCRIPTION", "GOOGLE_TPU_V2_VM_RUNTIME_VERSION"]
secretEnv: ["GITHUB_TOKEN_DOWNSTREAMS", "GITHUB_TOKEN_MAGIC_MODULES", "GOOGLE_BILLING_ACCOUNT", "GOOGLE_CUST_ID", "GOOGLE_FIRESTORE_PROJECT", "GOOGLE_IDENTITY_USER", "GOOGLE_MASTER_BILLING_ACCOUNT", "GOOGLE_ORG", "GOOGLE_ORG_2", "GOOGLE_ORG_DOMAIN", "GOOGLE_PROJECT", "GOOGLE_PROJECT_NUMBER", "GOOGLE_SERVICE_ACCOUNT", "SA_KEY", "GOOGLE_PUBLIC_AVERTISED_PREFIX_DESCRIPTION", "GOOGLE_TPU_V2_VM_RUNTIME_VERSION"]
waitFor: ["diff"]
env:
- BASE_BRANCH=$_BASE_BRANCH
Expand All @@ -271,7 +271,7 @@ steps:

- name: 'gcr.io/graphite-docker-images/go-plus'
entrypoint: '/workspace/.ci/scripts/go-plus/magician/exec.sh'
secretEnv: ["GITHUB_TOKEN"]
secretEnv: ["GITHUB_TOKEN_MAGIC_MODULES"]
waitFor: ["diff"]
args:
- 'request-service-reviewers'
Expand All @@ -284,8 +284,10 @@ options:

availableSecrets:
secretManager:
- versionName: projects/673497134629/secrets/github-magician-token/versions/latest
env: GITHUB_TOKEN
- versionName: projects/673497134629/secrets/github-magician-token-generate-diffs-downstreams/versions/latest
env: GITHUB_TOKEN_DOWNSTREAMS
- versionName: projects/673497134629/secrets/github-magician-token-generate-diffs-magic-modules/versions/latest
env: GITHUB_TOKEN_MAGIC_MODULES
- versionName: projects/673497134629/secrets/ci-test-billing-account/versions/latest
env: GOOGLE_BILLING_ACCOUNT
- versionName: projects/673497134629/secrets/ci-test-cust-id/versions/latest
Expand Down
44 changes: 21 additions & 23 deletions .ci/gcb-push-downstream.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ steps:
- name: 'gcr.io/graphite-docker-images/bash-plus'
entrypoint: '/workspace/.ci/scripts/bash-plus/downstream-waiter/wait_for_commit.sh'
id: tpg-sync
secretEnv: ["GITHUB_TOKEN"]
waitFor: ["checkout"]
args:
- 'tpg-sync'
Expand All @@ -42,7 +41,7 @@ steps:

- name: 'gcr.io/graphite-docker-images/build-environment'
entrypoint: '/workspace/.ci/scripts/go-plus/magician/exec.sh'
secretEnv: ["GITHUB_TOKEN"]
secretEnv: ["GITHUB_TOKEN_CLASSIC"]
id: tpg-push
waitFor: ["tpg-sync", "build-magician-binary"]
env:
Expand All @@ -56,22 +55,21 @@ steps:

- name: 'gcr.io/cloud-builders/git'
waitFor: ["tpg-push"]
secretEnv: ["GITHUB_TOKEN"]
secretEnv: ["GITHUB_TOKEN_CLASSIC"]
entrypoint: 'bash'
args:
- -c
- |
if [ "$BRANCH_NAME" == "main" ]; then
git push https://modular-magician:$$GITHUB_TOKEN@github.com/GoogleCloudPlatform/magic-modules $COMMIT_SHA:tpg-sync
git push https://modular-magician:$$GITHUB_TOKEN_CLASSIC@github.com/GoogleCloudPlatform/magic-modules $COMMIT_SHA:tpg-sync
else
git push https://modular-magician:$$GITHUB_TOKEN@github.com/GoogleCloudPlatform/magic-modules $COMMIT_SHA:tpg-sync-$BRANCH_NAME
git push https://modular-magician:$$GITHUB_TOKEN_CLASSIC@github.com/GoogleCloudPlatform/magic-modules $COMMIT_SHA:tpg-sync-$BRANCH_NAME
fi
# TPGB
- name: 'gcr.io/graphite-docker-images/bash-plus'
entrypoint: '/workspace/.ci/scripts/bash-plus/downstream-waiter/wait_for_commit.sh'
id: tpgb-sync
secretEnv: ["GITHUB_TOKEN"]
waitFor: ["checkout"]
args:
- 'tpgb-sync'
Expand All @@ -80,7 +78,7 @@ steps:

- name: 'gcr.io/graphite-docker-images/build-environment'
entrypoint: '/workspace/.ci/scripts/go-plus/magician/exec.sh'
secretEnv: ["GITHUB_TOKEN"]
secretEnv: ["GITHUB_TOKEN_CLASSIC"]
id: tpgb-push
waitFor: ["tpgb-sync", "build-magician-binary"]
env:
Expand All @@ -94,22 +92,21 @@ steps:

- name: 'gcr.io/cloud-builders/git'
waitFor: ["tpgb-push"]
secretEnv: ["GITHUB_TOKEN"]
secretEnv: ["GITHUB_TOKEN_CLASSIC"]
entrypoint: 'bash'
args:
- -c
- |
if [ "$BRANCH_NAME" == "main" ]; then
git push https://modular-magician:$$GITHUB_TOKEN@github.com/GoogleCloudPlatform/magic-modules $COMMIT_SHA:tpgb-sync
git push https://modular-magician:$$GITHUB_TOKEN_CLASSIC@github.com/GoogleCloudPlatform/magic-modules $COMMIT_SHA:tpgb-sync
else
git push https://modular-magician:$$GITHUB_TOKEN@github.com/GoogleCloudPlatform/magic-modules $COMMIT_SHA:tpgb-sync-$BRANCH_NAME
git push https://modular-magician:$$GITHUB_TOKEN_CLASSIC@github.com/GoogleCloudPlatform/magic-modules $COMMIT_SHA:tpgb-sync-$BRANCH_NAME
fi
# TGC
- name: 'gcr.io/graphite-docker-images/bash-plus'
entrypoint: '/workspace/.ci/scripts/bash-plus/downstream-waiter/wait_for_commit.sh'
id: tgc-sync
secretEnv: ["GITHUB_TOKEN"]
waitFor: ["checkout"]
args:
- 'tgc-sync'
Expand All @@ -118,7 +115,7 @@ steps:

- name: 'gcr.io/graphite-docker-images/build-environment'
entrypoint: '/workspace/.ci/scripts/go-plus/magician/exec.sh'
secretEnv: ["GITHUB_TOKEN"]
secretEnv: ["GITHUB_TOKEN_CLASSIC"]
id: tgc-push
waitFor: ["tgc-sync", "tpgb-push"]
env:
Expand All @@ -132,22 +129,21 @@ steps:

- name: 'gcr.io/cloud-builders/git'
waitFor: ["tgc-push"]
secretEnv: ["GITHUB_TOKEN"]
secretEnv: ["GITHUB_TOKEN_CLASSIC"]
entrypoint: 'bash'
args:
- -c
- |
if [ "$BRANCH_NAME" == "main" ]; then
git push https://modular-magician:$$GITHUB_TOKEN@github.com/GoogleCloudPlatform/magic-modules $COMMIT_SHA:tgc-sync
git push https://modular-magician:$$GITHUB_TOKEN_CLASSIC@github.com/GoogleCloudPlatform/magic-modules $COMMIT_SHA:tgc-sync
else
git push https://modular-magician:$$GITHUB_TOKEN@github.com/GoogleCloudPlatform/magic-modules $COMMIT_SHA:tgc-sync-$BRANCH_NAME
git push https://modular-magician:$$GITHUB_TOKEN_CLASSIC@github.com/GoogleCloudPlatform/magic-modules $COMMIT_SHA:tgc-sync-$BRANCH_NAME
fi
# TF-OICS
- name: 'gcr.io/graphite-docker-images/bash-plus'
entrypoint: '/workspace/.ci/scripts/bash-plus/downstream-waiter/wait_for_commit.sh'
id: tf-oics-sync
secretEnv: ["GITHUB_TOKEN"]
waitFor: ["checkout"]
args:
- 'tf-oics-sync'
Expand All @@ -156,7 +152,7 @@ steps:

- name: 'gcr.io/graphite-docker-images/build-environment'
entrypoint: '/workspace/.ci/scripts/go-plus/magician/exec.sh'
secretEnv: ["GITHUB_TOKEN"]
secretEnv: ["GITHUB_TOKEN_CLASSIC"]
id: tf-oics-push
waitFor: ["tf-oics-sync", "build-magician-binary"]
env:
Expand All @@ -170,20 +166,20 @@ steps:

- name: 'gcr.io/cloud-builders/git'
waitFor: ["tf-oics-push"]
secretEnv: ["GITHUB_TOKEN"]
secretEnv: ["GITHUB_TOKEN_CLASSIC"]
entrypoint: 'bash'
args:
- -c
- |
if [ "$BRANCH_NAME" == "main" ]; then
git push https://modular-magician:$$GITHUB_TOKEN@github.com/GoogleCloudPlatform/magic-modules $COMMIT_SHA:tf-oics-sync
git push https://modular-magician:$$GITHUB_TOKEN_CLASSIC@github.com/GoogleCloudPlatform/magic-modules $COMMIT_SHA:tf-oics-sync
else
git push https://modular-magician:$$GITHUB_TOKEN@github.com/GoogleCloudPlatform/magic-modules $COMMIT_SHA:tf-oics-sync-$BRANCH_NAME
git push https://modular-magician:$$GITHUB_TOKEN_CLASSIC@github.com/GoogleCloudPlatform/magic-modules $COMMIT_SHA:tf-oics-sync-$BRANCH_NAME
fi
- name: 'gcr.io/graphite-docker-images/go-plus'
entrypoint: '/workspace/.ci/scripts/go-plus/vcr-cassette-merger/vcr_merge.sh'
secretEnv: ["GITHUB_TOKEN", "GOOGLE_PROJECT"]
secretEnv: ["GITHUB_TOKEN_CLASSIC", "GOOGLE_PROJECT"]
id: vcr-merge
waitFor: ["tpg-push"]
env:
Expand All @@ -196,7 +192,7 @@ steps:
waitFor: ["vcr-merge"]
entrypoint: '/workspace/.ci/scripts/go-plus/magician/exec.sh'
secretEnv:
- "GITHUB_TOKEN"
- "GITHUB_TOKEN_DOWNSTREAMS"
- "GOOGLE_BILLING_ACCOUNT"
- "GOOGLE_CUST_ID"
- "GOOGLE_FIRESTORE_PROJECT"
Expand Down Expand Up @@ -228,7 +224,9 @@ logsBucket: 'gs://cloudbuild-downstream-builder-logs'
availableSecrets:
secretManager:
- versionName: projects/673497134629/secrets/github-classic--repo-workflow/versions/latest
env: GITHUB_TOKEN
env: GITHUB_TOKEN_CLASSIC
- versionName: projects/673497134629/secrets/github-magician-token-generate-diffs-downstreams/versions/latest
env: GITHUB_TOKEN_DOWNSTREAMS
- versionName: projects/673497134629/secrets/ci-test-billing-account/versions/latest
env: GOOGLE_BILLING_ACCOUNT
- versionName: projects/673497134629/secrets/ci-test-cust-id/versions/latest
Expand Down
2 changes: 1 addition & 1 deletion .ci/gcb-vcr-nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,4 +42,4 @@ availableSecrets:
- versionName: projects/673497134629/secrets/ci-test-public-advertised-prefix-description/versions/latest
env: GOOGLE_PUBLIC_AVERTISED_PREFIX_DESCRIPTION
- versionName: projects/673497134629/secrets/ci-test-tpu-v2-vm-runtime-version/versions/latest
env: GOOGLE_TPU_V2_VM_RUNTIME_VERSION
env: GOOGLE_TPU_V2_VM_RUNTIME_VERSION
1 change: 1 addition & 0 deletions .ci/infra/terraform/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,7 @@ module "project-services" {
"apikeys.googleapis.com",
"appengine.googleapis.com",
"appengineflex.googleapis.com",
"apphub.googleapis.com",
"artifactregistry.googleapis.com",
"assuredworkloads.googleapis.com",
"autoscaling.googleapis.com",
Expand Down
Loading

0 comments on commit 0d4e6a5

Please sign in to comment.