-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcloudbuild-webapp.yaml
More file actions
55 lines (55 loc) · 1.59 KB
/
cloudbuild-webapp.yaml
File metadata and controls
55 lines (55 loc) · 1.59 KB
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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
# Cloud Build config for webapp (dev-webapp trigger).
# _REGION and _ENVIRONMENT are set by the trigger (Terraform).
steps:
- name: ghcr.io/astral-sh/uv:debian
entrypoint: bash
args:
- -c
- |
set -e
apt-get update && apt-get install -y --no-install-recommends git
uv lock --upgrade-package edvise
- name: gcr.io/cloud-builders/docker
args:
- build
- '-f'
- src/webapp/Dockerfile
- '-t'
- '${_REGION}-docker.pkg.dev/${PROJECT_ID}/edvise-api/webapp:$COMMIT_SHA'
- '-t'
- '${_REGION}-docker.pkg.dev/${PROJECT_ID}/edvise-api/webapp:latest'
- .
- name: gcr.io/cloud-builders/docker
args:
- push
- '${_REGION}-docker.pkg.dev/${PROJECT_ID}/edvise-api/webapp:$COMMIT_SHA'
- name: gcr.io/cloud-builders/docker
args:
- push
- '${_REGION}-docker.pkg.dev/${PROJECT_ID}/edvise-api/webapp:latest'
- name: gcr.io/cloud-builders/gcloud
args:
- run
- deploy
- '${_ENVIRONMENT}-webapp'
- '--image'
- '${_REGION}-docker.pkg.dev/${PROJECT_ID}/edvise-api/webapp:$COMMIT_SHA'
- '--region'
- '${_REGION}'
- name: curlimages/curl
args:
- '-X'
- POST
- '-H'
- 'Content-Type: application/json'
- '-f'
- '-d'
- >-
{"text":"🚀 *$REPO_NAME* deployed · `$BRANCH_NAME` · $TRIGGER_NAME · $BUILD_ID"}
- >-
https://hooks.slack.com/triggers/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
id: notify-slack
timeout: 600s
options:
logging: CLOUD_LOGGING_ONLY
dynamicSubstitutions: true