-
Notifications
You must be signed in to change notification settings - Fork 0
/
Tiltfile
47 lines (42 loc) · 1.06 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
disable_snapshots()
analytics_settings(enable=False)
allow_k8s_contexts(os.getenv("TILT_ALLOW_CONTEXT"))
include('./service-dependencies/Tiltfile')
include('./tests/Tiltfile')
k8s_yaml('deployment/config.yaml')
k8s_yaml('deployment/kubernetes.yaml')
target='prod'
live_update=[]
if os.environ.get('PROD', '') == '':
target='build-env'
live_update=[
sync('pkg', '/app/pkg'),
sync('cmd', '/app/cmd'),
sync('go.mod', '/app/go.mod'),
sync('go.sum', '/app/go.sum'),
run('go install -v ./cmd/wedding'),
]
docker_build(
'davedamoon/wedding:latest',
'.',
dockerfile='deployment/Dockerfile',
target=target,
build_args={"SOURCE_BRANCH":"development", "SOURCE_COMMIT":"development"},
only=[ 'go.mod'
, 'go.sum'
, 'pkg'
, 'cmd'
, 'deployment'
],
ignore=[ '.git'
, '*/*_test.go'
, 'deployment/kubernetes.yaml'
],
live_update=live_update,
)
k8s_resource(
'wedding',
port_forwards=['12375:2375'],
resource_deps=['minio-buckets', 'registry', 'docker-hub-mirror'],
labels=["application"],
)