Skip to content

Commit

Permalink
Rando suffix for CI (#452)
Browse files Browse the repository at this point in the history
  • Loading branch information
AlCutter authored Jan 16, 2025
1 parent 94e0759 commit ecacf9c
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 24 deletions.
1 change: 1 addition & 0 deletions deployment/live/gcp/conformance/ci/terragrunt.hcl
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,6 @@ include "root" {
inputs = merge(
include.root.locals,
{
base_name = get_env("TESSERA_BASE_NAME", "ci-conformance-${substr(uuid(), 0, 4)}")
}
)
3 changes: 2 additions & 1 deletion deployment/live/gcp/conformance/terragrunt.hcl
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ locals {
project_id = get_env("GOOGLE_PROJECT")
location = get_env("GOOGLE_REGION", "us-central1")
base_name = get_env("TESSERA_BASE_NAME", "${local.env}-conformance")
state_bucket_name = "${local.base_name}"
server_docker_image = get_env("TESSERA_CLOUD_RUN_DOCKER_IMAGE")
signer = get_env("TESSERA_SIGNER")
tessera_reader = get_env("TESSERA_READER", "")
Expand All @@ -22,7 +23,7 @@ remote_state {
config = {
project = local.project_id
location = local.location
bucket = "${local.project_id}-${local.base_name}-terraform-state"
bucket = "${local.project_id}-${local.state_bucket_name}-terraform-state"
prefix = "${local.env}/terraform.tfstate"

gcs_bucket_labels = {
Expand Down
23 changes: 0 additions & 23 deletions deployment/modules/gcp/cloudbuild/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -162,29 +162,6 @@ resource "google_cloudbuild_trigger" "docker" {
EOT
wait_for = ["terraform_outputs", "generate_keys", "access"]
}
## Destroy the deployment/live/gcp/conformance/ci terragrunt config.
## This will tear down the conformance infrastructure we brought up
## above.
step {
id = "terraform_destroy_conformance_ci"
name = "alpine/terragrunt:1.9.8"
script = <<EOT
terragrunt --terragrunt-non-interactive --terragrunt-no-color destroy -auto-approve -no-color 2>&1
EOT
dir = "deployment/live/gcp/conformance/ci"
env = [
"TESSERA_SIGNER=unused",
"TESSERA_CLOUD_RUN_DOCKER_IMAGE=${local.conformance_gcp_docker_image}:latest",
"TESSERA_CLOUD_RUN_SERVICE_ACCOUNT=cloudrun-ci-sa@trillian-tessera.iam.gserviceaccount.com",
"TESSERA_READER=serviceAccount:[email protected]",
"TESSERA_WRITER=serviceAccount:[email protected]",
"GOOGLE_PROJECT=${var.project_id}",
"TF_IN_AUTOMATION=1",
"TF_INPUT=false",
"TF_VAR_project_id=${var.project_id}"
]
wait_for = ["hammer"]
}

options {
logging = "CLOUD_LOGGING_ONLY"
Expand Down

0 comments on commit ecacf9c

Please sign in to comment.