forked from markhilton/docker-php-fpm
-
Notifications
You must be signed in to change notification settings - Fork 0
/
cloudbuild.yaml
41 lines (36 loc) · 1.11 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
37
38
39
40
41
steps:
# slack deployment status
- name: 'gcr.io/cloud-builders/curl'
args:
[
'-X',
'POST',
'-H',
'Content-type: application/json',
'--data',
'{"text":"gcr.io/${PROJECT_ID}/${_IMAGE}:${_VERSION}${BRANCH_NAME}${TAG_NAME} build started!"}',
'${_WEBHOOK_URL}',
]
- name: 'gcr.io/cloud-builders/docker'
args: [ 'build', '-t', 'gcr.io/$PROJECT_ID/$_IMAGE:$_VERSION$BRANCH_NAME$TAG_NAME', '-f', '$_VERSION/Dockerfile', '.' ]
# slack deployment status
- name: 'gcr.io/cloud-builders/curl'
args:
[
'-X',
'POST',
'-H',
'Content-type: application/json',
'--data',
'{"text":"gcr.io/${PROJECT_ID}/${_IMAGE}:${_VERSION}${BRANCH_NAME}${TAG_NAME} build completed!"}',
'${_WEBHOOK_URL}',
]
# extend timeout to 40 min
timeout: 2400s
# store artifact
images: ['gcr.io/$PROJECT_ID/$_IMAGE:$_VERSION$BRANCH_NAME$TAG_NAME']
# arguments
substitutions:
_IMAGE: php-fpm
_VERSION: "7.4" # PHP runtime version
_WEBHOOK_URL: https://hooks.slack.com/services/A/B/C # slack notifications