-
Notifications
You must be signed in to change notification settings - Fork 0
/
Tiltfile
34 lines (28 loc) · 872 Bytes
/
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
load('ext://restart_process', 'docker_build_with_restart')
compile_cmd = 'cd src; go mod download; CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -o fit .'
local_resource( 'compile-main',
compile_cmd,
deps=['./src'],
)
docker_build_with_restart(
ref="sedflix/fit",
context="./",
entrypoint="./fit",
dockerfile="./Dockerfile.tilt",
live_update=[
sync('./src/fit', '/root/fit'),
sync('./src/web', '/root/web'),
run('cd /root && ./fit', trigger=["./src/fit", './src/web'])
]
)
# TODO: change this to whatever context you want to use
allow_k8s_contexts('zone-aws-default-staging-mumbai')
yaml = helm(
'./charts',
name='fit-tilt',
namespace='test',
values=['charts/values.yaml'],
)
watch_file('./charts')
k8s_yaml(yaml)
k8s_resource(workload="fit-tilt", port_forwards=9080, resource_deps=["compile-main"])