-
Notifications
You must be signed in to change notification settings - Fork 10
/
Tiltfile
54 lines (49 loc) · 1.3 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
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-bitbucket-gateway')
k8s_resource(
new_name = 'namespace',
objects = ['brigade-bitbucket-gateway:namespace'],
labels = ['brigade-bitbucket-gateway']
)
docker_build(
'brigadecore/brigade-bitbucket-gateway', '.',
only = [
'internal/',
'config.go',
'go.mod',
'go.sum',
'main.go'
],
ignore = ['**/*_test.go']
)
k8s_resource(
workload = 'brigade-bitbucket-gateway',
new_name = 'gateway',
port_forwards = '31700:8080',
labels = ['brigade-bitbucket-gateway']
)
k8s_resource(
workload = 'gateway',
objects = ['brigade-bitbucket-gateway:secret']
)
k8s_yaml(
helm(
'./charts/brigade-bitbucket-gateway',
name = 'brigade-bitbucket-gateway',
namespace = 'brigade-bitbucket-gateway',
set = [
'brigade.apiToken=' + os.environ['BRIGADE_API_TOKEN'],
'service.type=NodePort',
'tls.enabled=false'
]
)
)