-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcd.nix
36 lines (33 loc) · 964 Bytes
/
cd.nix
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
{ config, pkgs, ...}:
{
config = {
pre-commit.hooks = {
kustomize-build-staging = {
enable = false;
name = "Ensure staging kustomization output is up to date";
pass_filenames = false;
raw.always_run = true;
entry = "kustomize build staging/ --output output/staging/manifest.yaml";
};
kustomize-build-prod = {
enable = false;
name = "Ensure prod kustomization output is up to date";
pass_filenames = false;
raw.always_run = true;
entry = "kustomize build prod/ --output output/prod/manifest.yaml";
};
};
scripts.kustomize-build-staging.exec = ''
set -xe
pushd $DEVENV_ROOT
kustomize build staging/ --output output/staging/manifest.yaml
popd
'';
scripts.kustomize-build-prod.exec = ''
set -xe
pushd $DEVENV_ROOT
kustomize build prod/ --output output/prod/manifest.yaml
popd
'';
};
}