generated from companieshouse/node-review-web-starter-ts
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Tiltfile.dev
19 lines (18 loc) · 938 Bytes
/
Tiltfile.dev
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
local_resource(
name = 'acsp-web',
cmd = 'npm install && npm run build',
deps = ['src']
)
custom_build(
ref = 'acsp-web:latest',
#the following build-command was updated as specified by https://github.com/companieshouse/docker-chs-development/pull/581
command = 'DOCKER_BUILDKIT=0 docker build --build-arg SSH_PRIVATE_KEY="$(ssh_key_path="$(ssh -G github.com | grep -e \'^identityfile.*\' | head -n1 | sed \'s|^identityfile \\(.*\\)|\\1|\')"; if [ -z "${ssh_key_path}" ]; then echo "Could not find ssh key path for github.com">&2; false; elif [ -f "${ssh_key_path}" ]; then cat "${ssh_key_path}"; else echo "Could not find ssh key for github at ${ssh_key_path}" >&2; false; fi)" --build-arg SSH_PRIVATE_KEY_PASSPHRASE --tag $EXPECTED_REF .',
live_update = [
sync(local_path = './src', remote_path = '/opt/src'),
restart_container()
],
deps = [
'./dist',
'./src'
]
)