This repository has been archived on 2023-11-25. You can view files and clone it, but cannot push or open issues or pull requests.
kreaper/Tiltfile
2022-04-13 21:00:32 +02:00

28 lines
725 B
Plaintext

# -*- mode: Python -*-
local_resource(
'build',
'CGO_ENABLED=0 go build -trimpath -ldflags "-w -s" -installsuffix cgo -o dist/kreaper main.go',
deps=['main.go', './reaper'],
)
debug_dockerfile = """
FROM docker.io/alpine:3.15
COPY kreaper /usr/local/bin/
ENTRYPOINT ["/usr/local/bin/kreaper"]
"""
custom_build(
'kreaper',
'docker build -f deployments/Dockerfile -t $EXPECTED_REF --build-arg BASE="docker.io/alpine:3.15" ./dist/',
entrypoint='/usr/local/bin/kreaper',
deps=['./dist/kreaper'],
live_update=[
sync('./dist/kreaper', '/usr/local/bin/kreaper'),
]
)
k8s_yaml(['testdata/target_pod.yaml', 'testdata/deployment.yaml'])
k8s_resource('kreaper', resource_deps=['build'])