-
Notifications
You must be signed in to change notification settings - Fork 1
/
Tiltfile
75 lines (68 loc) · 1.7 KB
/
Tiltfile
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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
if 'ENABLE_NGROK_EXTENSION' in os.environ and os.environ['ENABLE_NGROK_EXTENSION'] == '1':
v1alpha1.extension_repo(
name = 'default',
url = 'https://github.com/tilt-dev/tilt-extensions'
)
v1alpha1.extension(name = 'ngrok', repo_name = 'default', repo_path = 'ngrok')
load('ext://min_k8s_version', 'min_k8s_version')
min_k8s_version('1.18.0')
trigger_mode(TRIGGER_MODE_MANUAL)
load('ext://namespace', 'namespace_create')
namespace_create('brigade-slack-gateway')
k8s_resource(
new_name = 'namespace',
objects = ['brigade-slack-gateway:namespace'],
labels = ['brigade-slack-gateway']
)
k8s_resource(
new_name = 'common',
objects = [
'brigade-slack-gateway:secret',
'brigade-slack-gateway-config:secret'
],
labels = ['brigade-slack-gateway']
)
docker_build(
'brigadecore/brigade-slack-gateway-monitor', '.',
dockerfile = 'monitor/Dockerfile',
only = [
'internal/',
'monitor/'
'go.mod',
'go.sum'
],
ignore = ['**/*_test.go']
)
k8s_resource(
workload = 'brigade-slack-gateway-monitor',
new_name = 'monitor',
labels = ['brigade-slack-gateway']
)
docker_build(
'brigadecore/brigade-slack-gateway-receiver', '.',
dockerfile = 'receiver/Dockerfile',
only = [
'internal/',
'receiver/',
'go.mod',
'go.sum'
],
ignore = ['**/*_test.go']
)
k8s_resource(
workload = 'brigade-slack-gateway-receiver',
new_name = 'receiver',
port_forwards = '31700:8080',
labels = ['brigade-slack-gateway']
)
k8s_yaml(
helm(
'./charts/brigade-slack-gateway',
name = 'brigade-slack-gateway',
namespace = 'brigade-slack-gateway',
set = [
'brigade.apiToken=' + os.environ['BRIGADE_API_TOKEN'],
'receiver.tls.enabled=false'
]
)
)