-
Notifications
You must be signed in to change notification settings - Fork 2
/
Tiltfile
39 lines (34 loc) · 927 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
34
35
36
37
38
39
# -*- mode: Python -*-
load('ext://restart_process', 'docker_build_with_restart')
load('ext://helm_resource', 'helm_resource')
compile_opt = 'GO111MODULE=on CGO_ENABLED=0 GOOS=linux GOARCH=amd64 '
# Compile example application
local_resource(
'memory-leak-compile',
compile_opt + 'go build -o bin/memory-leak main.go',
deps=['main.go'],
ignore=['bin', 'helm', 'Dockerfile', 'Tiltfile', 'README.md', 'LICENSE', '.gitignore'],
labels="memory-leak",
)
# Build example docker image
docker_build_with_restart(
'memory-leak-image',
'.',
entrypoint=['/opt/app/bin/memory-leak'],
dockerfile='Dockerfile',
only=[
'./bin',
],
live_update=[
sync('./bin', '/opt/app/bin'),
],
)
# Install example helm chart
helm_resource(
'memory-leak-service',
'helm',
image_deps=['memory-leak-image'],
image_keys=[('image.repository', 'image.tag')],
port_forwards=['8080:8080'],
labels="memory-leak",
)