Skip to content

Commit b937cdf

Browse files
committed
run tf builder tests sequentially
1 parent 8324c7b commit b937cdf

File tree

4 files changed

+2
-26
lines changed

4 files changed

+2
-26
lines changed

build/int.cloudbuild.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ steps:
121121

122122
- id: apply-tfbuilder-github
123123
waitFor:
124-
- create-all
124+
- teardown-tfbuilder
125125
name: 'gcr.io/cloud-foundation-cicd/$_DOCKER_IMAGE_DEVELOPER_TOOLS:$_DOCKER_TAG_VERSION_DEVELOPER_TOOLS'
126126
args: ['/bin/bash', '-c', 'cft test run TestTFCloudBuildBuilderGitHub --stage apply --verbose']
127127
secretEnv: ['IM_GITHUB_PAT']
@@ -140,7 +140,7 @@ steps:
140140

141141
- id: apply-tfbuilder-gitlab
142142
waitFor:
143-
- create-all
143+
- teardown-tfbuilder-github
144144
name: 'gcr.io/cloud-foundation-cicd/$_DOCKER_IMAGE_DEVELOPER_TOOLS:$_DOCKER_TAG_VERSION_DEVELOPER_TOOLS'
145145
args: ['/bin/bash', '-c', 'cft test run TestTFCloudBuildBuilderGitLab --stage apply --verbose']
146146
secretEnv: ['IM_GITLAB_PAT']

examples/tf_cloudbuild_builder_simple/main.tf

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -14,20 +14,12 @@
1414
* limitations under the License.
1515
*/
1616

17-
resource "google_service_account" "cb_sa" {
18-
project = module.enabled_google_apis.project_id
19-
account_id = "tf-cb-builder-sa-s"
20-
display_name = "SA for Terraform builder build trigger. Managed by Terraform."
21-
create_ignore_already_exists = true
22-
}
23-
2417
module "cloudbuilder" {
2518
source = "terraform-google-modules/bootstrap/google//modules/tf_cloudbuild_builder"
2619
version = "~> 8.0"
2720

2821
project_id = module.enabled_google_apis.project_id
2922
dockerfile_repo_uri = google_sourcerepo_repository.builder_dockerfile_repo.url
30-
cloudbuild_sa = google_service_account.cb_sa.id
3123
trigger_location = "us-central1"
3224
gar_repo_location = "us-central1"
3325
build_timeout = "1200s"

examples/tf_cloudbuild_builder_simple_github/main.tf

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -24,13 +24,6 @@ locals {
2424
location = "us-central1"
2525
}
2626

27-
resource "google_service_account" "cb_sa" {
28-
project = module.enabled_google_apis.project_id
29-
account_id = "tf-cb-builder-sa-gh"
30-
display_name = "SA for Terraform builder build trigger. Managed by Terraform."
31-
create_ignore_already_exists = true
32-
}
33-
3427
module "cloudbuilder" {
3528
# source = "terraform-google-modules/bootstrap/google//modules/tf_cloudbuild_builder"
3629
# version = "~> 8.0"
@@ -40,7 +33,6 @@ module "cloudbuilder" {
4033
dockerfile_repo_uri = module.git_repo_connection.cloud_build_repositories_2nd_gen_repositories["test_repo"].id
4134
dockerfile_repo_type = "GITHUB"
4235
use_cloudbuildv2_repository = true
43-
cloudbuild_sa = google_service_account.cb_sa.id
4436
trigger_location = local.location
4537
gar_repo_location = local.location
4638
build_timeout = "1200s"

examples/tf_cloudbuild_builder_simple_gitlab/main.tf

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -24,13 +24,6 @@ locals {
2424
location = "us-central1"
2525
}
2626

27-
resource "google_service_account" "cb_sa" {
28-
project = module.enabled_google_apis.project_id
29-
account_id = "tf-cb-builder-sa-gl"
30-
display_name = "SA for Terraform builder build trigger. Managed by Terraform."
31-
create_ignore_already_exists = true
32-
}
33-
3427
module "cloudbuilder" {
3528
source = "../../modules/tf_cloudbuild_builder"
3629

@@ -39,7 +32,6 @@ module "cloudbuilder" {
3932
dockerfile_repo_uri = module.git_repo_connection.cloud_build_repositories_2nd_gen_repositories["test_repo"].id
4033
dockerfile_repo_type = "UNKNOWN" // "GITLAB" is not one of the options available so we need to use "UNKNOWN"
4134
use_cloudbuildv2_repository = true
42-
cloudbuild_sa = google_service_account.cb_sa.id
4335
trigger_location = local.location
4436
gar_repo_location = local.location
4537
build_timeout = "1200s"

0 commit comments

Comments
 (0)