From 9bab0fe3c0d4bca40543c4efb9c112b55694b9b8 Mon Sep 17 00:00:00 2001 From: ramonskie Date: Thu, 24 Sep 2026 16:35:18 +0200 Subject: [PATCH] Label the bosh-deployment pipeline GCP resources Pilot for GCP cost attribution. - Declare the BBL_GCP_LABELS task param and set it to pipeline=bosh-deployment on the bbl-up task of the GCP jobs, so bbl labels the director and jumpbox VMs and the terraform resources it manages (cloudfoundry/bosh-bootloader#694). - Apply misc/tags.yml to the nats deployment so the deployment VMs are labelled as well (cloudfoundry/bosh-deployment#534). --- ci/pipeline.yml | 2 ++ ci/tasks/bbl-up-bosh-gcp.yml | 1 + ci/tasks/test-gcp.sh | 4 +++- 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/ci/pipeline.yml b/ci/pipeline.yml index 9defee75..02e3e349 100644 --- a/ci/pipeline.yml +++ b/ci/pipeline.yml @@ -138,6 +138,7 @@ jobs: params: BBL_GCP_SERVICE_ACCOUNT_KEY: ((gcp_json_key)) BBL_GCP_REGION: *bbl_gcp_region + BBL_GCP_LABELS: pipeline=bosh-deployment - task: test-gcp file: bosh-deployment/ci/tasks/test-gcp.yml input_mapping: @@ -218,6 +219,7 @@ jobs: params: BBL_GCP_SERVICE_ACCOUNT_KEY: ((gcp_json_key)) BBL_GCP_REGION: *bbl_gcp_region + BBL_GCP_LABELS: pipeline=bosh-deployment DIRECTOR_OPS_FILES: "gcp/use-resolute.yml misc/use-compiled-resolute-releases.yml" - task: test-gcp file: bosh-deployment/ci/tasks/test-gcp.yml diff --git a/ci/tasks/bbl-up-bosh-gcp.yml b/ci/tasks/bbl-up-bosh-gcp.yml index 0ce069c8..46ca051a 100644 --- a/ci/tasks/bbl-up-bosh-gcp.yml +++ b/ci/tasks/bbl-up-bosh-gcp.yml @@ -17,6 +17,7 @@ params: BBL_IAAS: gcp BBL_GCP_REGION: replace-me DIRECTOR_OPS_FILES: "" # Space-separated, repo-relative ops files applied to the director + BBL_GCP_LABELS: "" # Comma-separated key=value GCP resource labels applied by bbl run: path: bosh-deployment/ci/tasks/bbl-up-bosh-gcp.sh diff --git a/ci/tasks/test-gcp.sh b/ci/tasks/test-gcp.sh index 55a2c278..42351614 100755 --- a/ci/tasks/test-gcp.sh +++ b/ci/tasks/test-gcp.sh @@ -20,7 +20,9 @@ pushd "${PWD}/bbl-state" echo "-----> `date`: Deploy" bosh -n -d nats deploy "${script_dir}/../assets/nats.yml" \ -o bosh-deployment/tests/cred-test.yml \ - -v stemcell_os="${STEMCELL_OS}" + -o bosh-deployment/misc/tags.yml \ + -v stemcell_os="${STEMCELL_OS}" \ + -v 'deployment_tags={"pipeline":"bosh-deployment"}' echo "-----> `date`: Exercise deployment" bosh -n -d nats run-errand smoke-tests