-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcloudbuild.yaml
29 lines (29 loc) · 934 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
steps:
- id: 'install'
name: 'python'
entrypoint: 'pip'
args: ['install', '-r', 'requirements.txt', '--user']
- id: 'html'
name: 'python'
entrypoint: 'python'
args: ['-m', 'pelican', 'content', '-o', 'output', '-s', 'publishconf.py']
- id: 'build'
name: 'gcr.io/cloud-builders/docker'
args: ['build', '-t', '${_AR_PATH}/$PROJECT_ID/thomasflanigan/${_IMAGE}:$COMMIT_SHA', '.']
- id: 'push'
name: 'gcr.io/cloud-builders/docker'
args: ['push', '${_AR_PATH}/$PROJECT_ID/thomasflanigan/${_IMAGE}:$COMMIT_SHA']
- id: 'substitute'
name: 'gcr.io/$PROJECT_ID/envsubst'
env:
- 'IMAGE_NAME=${_AR_PATH}/$PROJECT_ID/thomasflanigan/${_IMAGE}:$COMMIT_SHA'
script: |
mkdir build && envsubst < k8s-config.yaml > build/k8s-config.yaml
- id: 'deploy'
name: 'gcr.io/cloud-builders/gke-deploy'
args:
- apply
- --filename=build/k8s-config.yaml
- --location=${_LOCATION}
- --cluster=${_CLUSTER}
tags: ['tf-site']