-
Notifications
You must be signed in to change notification settings - Fork 0
/
cloudbuild.yaml
33 lines (29 loc) · 960 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
27
28
29
30
31
32
33
steps:
- name: "gcr.io/cloud-builders/npm:node-18.12.0"
args: ["install"]
id: NPM_INSTALL
- name: 'gcr.io/cloud-builders/docker'
args:
- 'build'
- '--tag=gcr.io/ons-hatespeech-detector-2/ons2-be:$TAG_NAME'
- '--tag=gcr.io/ons-hatespeech-detector-2/ons2-be:latest'
- '.'
id: BUILD_BE_IMAGE
- name: 'gcr.io/cloud-builders/docker'
args: ['push', 'gcr.io/ons-hatespeech-detector-2/ons2-be:$TAG_NAME']
id: PUSH_FE
- name: 'gcr.io/cloud-builders/docker'
args: ['push', 'gcr.io/ons-hatespeech-detector-2/ons2-be:latest']
id: PUSH_BE_LATEST
################ START DEPLOY ##################
- name: 'gcr.io/cloud-builders/gke-deploy:stable'
args:
- run
- --filename=k8s/deployment.yaml
- --image=gcr.io/ons-hatespeech-detector-2/ons2-be:$TAG_NAME
- --location=europe-west1-b
- --cluster=ons2-k8s
- --project=ons-hatespeech-detector-2
id: DEPLOY_BE
timeout: 900s
images: ['gcr.io/ons-hatespeech-detector-2/ons2-be']