-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathjustfile
68 lines (61 loc) · 1.96 KB
/
justfile
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
62
63
64
65
66
67
68
# Lists all targets
[private]
default:
@just --list
# Run ansible-lint with the configured profile
[group('lint')]
ansible-lint:
@ansible-lint --offline
# Check `just` syntax
[group('just')]
justcheck:
#!/usr/bin/env bash
set -eou pipefail
find . -type f -name "justfile" -not -path "./external_*" | while read -r file; do
echo -n "Running \`just --fmt --check\` on ${file}..."
just --unstable --fmt --check -f ${file}
echo "{{ BOLD + GREEN }}OK{{ NORMAL }}"
done
# Fixes `just` syntax
[group('just')]
justfix:
#!/usr/bin/env bash
set -eou pipefail
find . -type f -name "justfile" -not -path "./external_*" | while read -r file; do
echo "Running \`just --fmt\` on ${file}..."
just --unstable --fmt -f ${file}
done
# Run `hadolint` on all `Dockerfile`s
[group('lint')]
hadolint:
#!/usr/bin/env bash
set -eou pipefail
find . -type f -name "Dockerfile*" -not -path "./external_*" | while read -r file; do
echo -n "Running \`hadolint\` on ${file}..."
hadolint ${file}
echo "{{ BOLD + GREEN }}OK{{ NORMAL }}"
done
# Build production overlay with `kustomize`
[group('lint')]
kustomize-build:
#!/usr/bin/env bash
set -eou pipefail
find kustomization/overlays/prod -mindepth 1 -maxdepth 1 -type d | while read -r file; do
echo -n "Running \`kustomize build --enable-helm\` on ${file}..."
kustomize build --enable-helm ${file} > /dev/null
echo "{{ BOLD + GREEN }}OK{{ NORMAL }}"
done
# Validate `renovate.json` file
[group('lint')]
renovate-validate:
renovate-config-validator
# Run `shellcheck` on all shell files
[group('lint')]
shellcheck:
#!/usr/bin/env bash
set -eou pipefail
find . -type f -name "*.sh" -not -path "./external_*" -not -path "*/charts/*" | while read -r file; do
echo -n "Running \`shellcheck -x\` on ${file}..."
shellcheck -x ${file}
echo "{{ BOLD + GREEN }}OK{{ NORMAL }}"
done