-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcloudbuild.yaml
26 lines (24 loc) · 918 Bytes
/
cloudbuild.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
steps:
# Build the docker image
- name: 'gcr.io/cloud-builders/docker'
args: [ 'build', '-t', 'europe-west1-docker.pkg.dev/$PROJECT_ID/prac/ci-cd:$COMMIT_SHA', '.' ]
# Push the image to artifact registry
- name: 'gcr.io/cloud-builders/docker'
args: ['push', 'europe-west1-docker.pkg.dev/$PROJECT_ID/prac/ci-cd:$COMMIT_SHA']
# Deploy container image to Cloud Run
- name: 'gcr.io/google.com/cloudsdktool/cloud-sdk'
entrypoint: gcloud
args:
- 'run'
- 'deploy'
- 'prac'
- '--image'
- 'europe-west1-docker.pkg.dev/$PROJECT_ID/prac/ci-cd:$COMMIT_SHA'
- '--region'
- 'europe-west1'
- '--port'
- '5000'
- '--set-env-vars=ESPADA=Barragan Louisenbairn'
- '--set-env-vars=RANK=2'
- '--set-env-vars=MONGODB_URI=mongodb+srv://interclub-api:[email protected]/interclub'
- '--allow-unauthenticated'