Skip to content

Instantly share code, notes, and snippets.

@Klerith
Last active November 1, 2024 16:55
Show Gist options
  • Save Klerith/aa11e73e7b8686576a2da87e9b81b0ca to your computer and use it in GitHub Desktop.
Save Klerith/aa11e73e7b8686576a2da87e9b81b0ca to your computer and use it in GitHub Desktop.
cloudbuild.yml con secretos
steps:
- name: 'gcr.io/cloud-builders/docker'
entrypoint: 'bash'
args:
- -c
- |
docker build -t XXXXXX-docker.pkg.dev/project/image-registry/image-name -f dockerfile.prod --platform=linux/amd64 --build-arg ORDERS_DATABASE_URL=$$DATABASE_URL .
secretEnv: ['DATABASE_URL']
- name: 'gcr.io/cloud-builders/docker'
args:
[
'push',
'XXXXXX-docker.pkg.dev/project/image-registry/image-name',
]
availableSecrets:
secretManager:
- versionName: projects/367390259998/secrets/orders_database_url/versions/1
env: 'DATABASE_URL'
@Nullises
Copy link

Para los que le salga este error

Screenshot 2024-07-26 094344

Deben otorgar un nuevo permiso a su cuenta

Screenshot 2024-07-26 093516

@jalfonsosuarez
Copy link

Gracias por el tip. Ya estaba loco.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment