Skip to content

Commit

Permalink
Update cloudbuild.yaml
Browse files Browse the repository at this point in the history
Signed-off-by: Marcin Kozlowski <[email protected]>
  • Loading branch information
marcinguy authored Jul 7, 2024
1 parent f5251eb commit 5756069
Showing 1 changed file with 1 addition and 12 deletions.
13 changes: 1 addition & 12 deletions cloudbuild.yaml
Original file line number Diff line number Diff line change
@@ -1,22 +1,11 @@
steps:

- name: 'gcr.io/cloud-builders/gcloud'
entrypoint: 'bash'
args:
- '-c'
- |
PROJECT_ID=$(gcloud config get-value project)
SERVICE_ACCOUNT_EMAIL="betterscan-service@${PROJECT_ID}.iam.gserviceaccount.com"
gcloud iam service-accounts keys create key \
--iam-account=$SERVICE_ACCOUNT_EMAIL
# Step 1: Access the service account key from Secret Manager
- name: 'gcr.io/cloud-builders/gcloud'
entrypoint: 'bash'
args:
- '-c'
- |
gcloud secrets versions access latest --secret=key > /key.json
gcloud secrets versions access latest --secret=252c6579c3d5746578b7769146b0c02458b2c468 > /key.json
# Step 2: Authenticate Docker with your PAT
- name: 'gcr.io/cloud-builders/docker'
Expand Down

0 comments on commit 5756069

Please sign in to comment.