forked from uengine-oss/kubeez
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathcloudbuild-dev.yaml
33 lines (33 loc) · 1.04 KB
/
cloudbuild-dev.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:
### Build
- id: 'install'
name: 'gcr.io/cloud-builders/npm'
args: ['install']
- id: 'source build'
name: 'gcr.io/cloud-builders/npm'
args: ['run','build']
env:
- 'NODE_OPTIONS=--max_old_space_size=4096'
- id: 'docker build'
name: 'gcr.io/cloud-builders/docker'
entrypoint: 'bash'
args:
- '-c'
- |
echo '$COMMIT_SHA =' $COMMIT_SHA
echo $_PROJECT_NAME
docker build -t gcr.io/$PROJECT_ID/eventstorming-ui-dev:$COMMIT_SHA .
### Test
### Publish
- id: 'publish'
name: 'gcr.io/cloud-builders/docker'
entrypoint: 'bash'
args:
- '-c'
- |
docker push gcr.io/$PROJECT_ID/eventstorming-ui-dev:$COMMIT_SHA
### Deploy image to Cloud Run
- name: 'gcr.io/cloud-builders/gcloud'
args: ['beta','run','deploy','eventstorming-ui-dev','--image','gcr.io/eventstorming-tool/eventstorming-ui-dev:$COMMIT_SHA','--region','asia-northeast1','--platform','managed','--allow-unauthenticated']
images:
- gcr.io/eventstorming-tool/eventstorming-ui-dev:$COMMIT_SHA