Skip to content

Commit d9f4cbb

Browse files
committed
Allow injecting the GitHub owner for Cloud Build repo mapping
1 parent c70f861 commit d9f4cbb

File tree

3 files changed

+11
-5
lines changed

3 files changed

+11
-5
lines changed

deployment/live/gcp/cloudbuild/terragrunt.hcl

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,11 @@ terraform {
33
}
44

55
locals {
6-
env = path_relative_to_include()
7-
project_id = get_env("GOOGLE_PROJECT", "static-ct")
8-
location = get_env("GOOGLE_REGION", "us-central1")
9-
base_name = get_env("TESSERA_BASE_NAME", "${local.env}-cloudbuild")
6+
env = path_relative_to_include()
7+
project_id = get_env("GOOGLE_PROJECT", "static-ct")
8+
location = get_env("GOOGLE_REGION", "us-central1")
9+
base_name = get_env("TESSERA_BASE_NAME", "${local.env}-cloudbuild")
10+
github_owner = get_env("GITHUB_OWNER", "transparency-dev")
1011
}
1112

1213
remote_state {

deployment/modules/gcp/cloudbuild/main.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ resource "google_cloudbuild_trigger" "build_trigger" {
7676
location = var.location
7777

7878
github {
79-
owner = "transparency-dev"
79+
owner = var.github_owner
8080
name = "static-ct"
8181
push {
8282
branch = "^main$"

deployment/modules/gcp/cloudbuild/variables.tf

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,3 +17,8 @@ variable "docker_env" {
1717
description = "Unique identifier for the Docker env, e.g. dev or ci or prod"
1818
type = string
1919
}
20+
21+
variable "github_owner" {
22+
description = "GitHub owner used in Cloud Build trigger repository mapping"
23+
type = string
24+
}

0 commit comments

Comments
 (0)