Skip to content

Commit 81a4bc0

Browse files
committed
chore(tiltfile): add Tiltfile for development and add tilt_modules in gitignore
1 parent 6a5db41 commit 81a4bc0

File tree

2 files changed

+36
-0
lines changed

2 files changed

+36
-0
lines changed

.gitignore

+3
Original file line numberDiff line numberDiff line change
@@ -118,3 +118,6 @@ atlassian-ide-plugin.xml
118118
## File-based project format:
119119
*.ipr
120120
*.iws
121+
122+
# Tilt
123+
tilt_modules*

Tiltfile

+33
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
load("ext://docker_build_sub", "docker_build_sub")
2+
# Allow certain kubernetes contexts to deploy to and avoid the "accidental prod deploy"
3+
allow_k8s_contexts('kind-kind')
4+
5+
docker_build_sub('passbolt-ce', '../passbolt_docker', child_context='.',
6+
extra_cmds=['COPY . /var/www/passbolt',
7+
'RUN apt-get update && apt-get install -y git unzip \
8+
&& EXPECTED_SIGNATURE=$(curl -s https://composer.github.io/installer.sig) \
9+
&& curl -o composer-setup.php https://getcomposer.org/installer \
10+
&& php composer-setup.php --1 \
11+
&& mv composer.phar /usr/local/bin/composer \
12+
&& composer install -n \
13+
&& chown -R www-data:www-data vendor'
14+
],
15+
live_update=[
16+
sync('.', '/var/www/passbolt'),
17+
run('cd /var/www/passbolt && composer install -n && chown -R www-data:www-data vendor', trigger=['./composer.json'])
18+
])
19+
# Helm chart path
20+
path = '../../charts/charts-passbolt'
21+
watch_file(path)
22+
watch_file('../passbolt_docker')
23+
yaml = helm(
24+
path,
25+
name = 'passbolt-ce',
26+
namespace = 'on-prem',
27+
values = ["{}/values-local-ce.yaml".format(path)],
28+
)
29+
k8s_yaml(yaml)
30+
31+
k8s_resource('passbolt-ce-job-enable-selenium', resource_deps=['passbolt-ce-depl-srv'])
32+
k8s_resource('passbolt-ce-depl-srv', resource_deps=['passbolt-ce-job-init-databases'])
33+
k8s_resource('passbolt-ce-job-init-databases', resource_deps=['mariadb'])

0 commit comments

Comments
 (0)