forked from tilt-dev/tilt-example-go
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathTiltfile
32 lines (27 loc) · 815 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
# -*- mode: Python -*-
# Records the current time, then kicks off a server update.
# Normally, you would let Tilt do deploys automatically, but this
# shows you how to set up a custom workflow that measures it.
local_resource(
'deploy',
'python record-start-time.py',
)
compile_cmd = 'CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -o build/tilt-example-go ./'
if os.name == 'nt':
compile_cmd = 'build.bat'
local_resource(
'example-go-compile',
compile_cmd,
deps=['./main.go', './start.go'],
resource_deps = ['deploy'])
docker_build(
'example-go-image',
'.',
dockerfile='deployments/Dockerfile',
only=[
'./build',
'./web',
])
k8s_yaml('deployments/kubernetes.yaml')
k8s_resource('example-go', port_forwards=8000,
resource_deps=['deploy', 'example-go-compile'])