-
Notifications
You must be signed in to change notification settings - Fork 5
/
cloudbuild.yaml
36 lines (36 loc) · 1.16 KB
/
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
34
35
36
steps:
# - id: create build timestamp
# name: 'ubuntu'
# args: [ 'bash', '-c', 'date > _BUILD_DATUM_TIJD; echo ($cat _BUILD_DATUM_TIJD)' ]
- id: docker build
name: 'gcr.io/cloud-builders/docker'
args: [
'build',
'--tag', 'europe-west4-docker.pkg.dev/$PROJECT_ID/${_REPOSITORY}/${_DEPLOYMENT}',
'--build-arg', 'versienummer=${_VERSION}',
'--build-arg', 'buildId=$BUILD_ID',
'--build-arg', 'commit=$SHORT_SHA',
'--file', 'Containerfile',
'.'
]
- id: docker push
name: 'gcr.io/cloud-builders/docker'
args: [ 'push', 'europe-west4-docker.pkg.dev/$PROJECT_ID/${_REPOSITORY}/${_DEPLOYMENT}' ]
- id: Deploy to GKE
name: 'gcr.io/cloud-builders/kubectl'
env:
- CLOUDSDK_COMPUTE_ZONE=europe-west4-a
- CLOUDSDK_CONTAINER_CLUSTER=develop
args: [ 'rollout', 'restart', 'deployment', '${_DEPLOYMENT}' ]
images:
- europe-west4-docker.pkg.dev/$PROJECT_ID/${_REPOSITORY}/${_DEPLOYMENT}:${_VERSION}
timeout: 900s
options:
dynamic_substitutions: true
substitutions:
_REPOSITORY: common-ground
_DEPLOYMENT: zaakafhandelcomponent
_VERSION: latest
tags:
- '${_DEPLOYMENT}'
- '${_VERSION}'