This repository has been archived by the owner on Oct 29, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
deploy.yaml
61 lines (54 loc) · 1.51 KB
/
deploy.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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
steps:
# build image
- name: 'gcr.io/cloud-builders/docker'
id: build
args:
- build
- --tag=${_REGISTRY}/$PROJECT_ID/hangouts-jira-bot:$SHORT_SHA
- --file=Dockerfile
- .
# push image
- name: 'gcr.io/cloud-builders/docker'
id: push
waitFor:
- build
args: ['push', '${_REGISTRY}/$PROJECT_ID/hangouts-jira-bot:$SHORT_SHA']
# template configmap
- name: 'gcr.io/cloud-builders/gcloud'
id: templateConfigMap
entrypoint: /bin/bash
args: ['./scripts/template_configmap.sh']
env:
- 'PUBSUB_PROJECT=$_PUBSUB_PROJECT'
- 'PUBSUB_TOPIC=$_PUBSUB_TOPIC'
- 'PUBSUB_SUBSCRIPTION=$_PUBSUB_SUBSCRIPTION'
# deploy
- name: "gcr.io/cloud-builders/gke-deploy"
id: deploy
waitFor:
- templateConfigMap
- push
args:
- run
- --filename=kubernetes-manifests/bot
- --output=Manifests
- --image=${_REGISTRY}/$PROJECT_ID/hangouts-jira-bot:$SHORT_SHA
- --namespace=hangouts-jira-bot
- --location=${_CLUSTER_LOCATION}
- --cluster=${_CLUSTER_NAME}
# defs
substitutions:
# cluster to deploy to
_CLUSTER_NAME: dev
_CLUSTER_LOCATION: europe-west3-c
# registry to push the image
_REGISTRY: eu.gcr.io
# project of the pubsub topic to receive chat messages
_PUBSUB_PROJECT: hangouts-jira-bot-dev
# topic where chat messages will be sent to by Google
_PUBSUB_TOPIC: hangouts-jira-bot
# subscription to the topic used by this bot
_PUBSUB_SUBSCRIPTION: hangouts-jira-bot
options:
# skip substitution check, as not all of them are used directly in the config
substitutionOption: ALLOW_LOOSE