-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathTiltfile
23 lines (21 loc) · 1019 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
LOCAL_PATH = os.getenv("LOCAL_PATH", default='.')
NAMESPACE = os.getenv("NAMESPACE", default='default')
WAIT_TIMEOUT = os.getenv("WAIT_TIMEOUT", default='10m00s')
TYPE = os.getenv("TYPE", default='web')
k8s_custom_deploy(
'tap-workload-pr-action',
apply_cmd="tanzu apps workload apply -f config/workload.yaml --update-strategy replace --debug --live-update" +
" --local-path " + LOCAL_PATH +
" --namespace " + NAMESPACE +
" --wait-timeout " + WAIT_TIMEOUT +
" --type " + TYPE +
" --yes --output yaml",
delete_cmd="tanzu apps workload delete -f config/workload.yaml --namespace " + NAMESPACE + " --yes",
deps=['pom.xml', './target/classes'],
container_selector='workload',
live_update=[
sync('./target/classes', '/workspace/BOOT-INF/classes')
]
)
k8s_resource('tap-workload-pr-action', port_forwards=["8080:8080"],
extra_pod_selectors=[{'carto.run/workload-name': 'tap-workload-pr-action', 'app.kubernetes.io/component': 'run'}])