-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathjustfile
More file actions
61 lines (49 loc) · 1.39 KB
/
justfile
File metadata and controls
61 lines (49 loc) · 1.39 KB
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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
set positional-arguments
set shell := ["bash", "-cue"]
root_dir := `git rev-parse --show-toplevel`
# Default recipe to list all recipes.
[private]
default:
just --list
# Format the whole repository.
format *args:
treefmt --excludes 'src/chart/templates/*' {{args}}
# Clean up external and generated manifests.
clean:
@echo "Cleaning up..."
rm -rf external/{helm,ytt}/**
rm -rf build/
# Render Helm charts [intermediate step before rendering ytt manifests]
[private]
render-helm:
# render external helm charts with our values into src/<service>/helm/out
helm template dev src/chart -f src/chart/values.yaml --output-dir build
# Render manifests
render:
just render-helm && \
just format
# Apply manifests in dir to the cluster.
deploy dir="src":
# decrypts+sources the .env file and injects values into the manifests
cd {{root_dir}} && \
just secrets::exec-env \
"kubectl kustomize {{dir}} | kubectl apply -f -"
# Enter development shell
dev:
just nix::develop
# Fetch external dependencies
fetch:
just external::fetch
# Test deploy on minikube instance
test:
bash ./tests/minikube_deploy
minikube stop
# Manage OCI images.
[group('modules')]
mod image 'tools/just/image.just'
# Manage nix development environment.
[group('modules')]
mod nix 'tools/just/nix.just'
# Manage external dependencies.
[group('modules')]
mod external 'tools/just/external.just'