From 241ee7e916c6413fd298c78a8594cbc07545e460 Mon Sep 17 00:00:00 2001 From: The Magician Date: Tue, 14 Nov 2023 12:14:02 -0800 Subject: [PATCH] TeamCity : Skip `google_project` sweeper in Beta projects (#8756) (#16534) * Add `SKIP_PROJECT_SWEEPER` to Beta projects only * Adding log to project sweeper so skip decision is in logs * Make the param an environment variable instead of configuration parameter * Remove log about skipping project sweeper [upstream:184b2f168d1320cfb1d2c557433bd29e01afa116] Signed-off-by: Modular Magician --- .changelog/8756.txt | 3 +++ .teamcity/components/generated/project.kt | 2 +- .../resourcemanager/resource_google_project_sweeper.go | 1 + 3 files changed, 5 insertions(+), 1 deletion(-) create mode 100644 .changelog/8756.txt diff --git a/.changelog/8756.txt b/.changelog/8756.txt new file mode 100644 index 00000000000..8ec013c0699 --- /dev/null +++ b/.changelog/8756.txt @@ -0,0 +1,3 @@ +```release-note:none + +``` diff --git a/.teamcity/components/generated/project.kt b/.teamcity/components/generated/project.kt index cf25eceea7a..d547b91bd13 100644 --- a/.teamcity/components/generated/project.kt +++ b/.teamcity/components/generated/project.kt @@ -59,8 +59,8 @@ fun Google(environment: String, projDescription: String, manualVcsRoot: Absolute // Adding this allows custom builds to use alternative branches. E.g. testing release branches in the downstreams params { + // Controls the VCS root, and allows custom builds to point at different branches param("BRANCH_NAME", branchRef) - // Not used, but making `environment` a param makes the value visible to non-admins in TeamCity param("ENVIRONMENT", environment) } diff --git a/google/services/resourcemanager/resource_google_project_sweeper.go b/google/services/resourcemanager/resource_google_project_sweeper.go index 6aa5aa0e343..562de7902cd 100644 --- a/google/services/resourcemanager/resource_google_project_sweeper.go +++ b/google/services/resourcemanager/resource_google_project_sweeper.go @@ -23,6 +23,7 @@ func init() { // already be in-progress. // Example: SKIP_PROJECT_SWEEPER=1 go test ./google -v -sweep=us-central1 -sweep-run= if os.Getenv("SKIP_PROJECT_SWEEPER") != "" { + // No logging here - see https://github.com/GoogleCloudPlatform/magic-modules/pull/7439 return }