Skip to content

Commit e9b926c

Browse files
authored
chore: lint all examples, including ingress (#167)
Lint all subdirectories under examples automatically. This has the effect of linting the ingress example, in addition to the existing kind and openshift examples.
1 parent 2978f9b commit e9b926c

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

scripts/package.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ check_dependencies \
1010
git \
1111
helm
1212

13-
PROJECT_ROOT="$(git rev-parse --show-toplevel)"
13+
PROJECT_ROOT=$(git rev-parse --show-toplevel)
1414

1515
BUILD="$PROJECT_ROOT/build"
1616
mkdir -p "$BUILD"

scripts/test_helm.sh

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,17 +9,17 @@ source "./lib.sh"
99

1010
check_dependencies \
1111
git \
12-
helm
12+
helm \
13+
kube-linter
1314

14-
PROJECT_ROOT="$(git rev-parse --show-toplevel)"
15+
PROJECT_ROOT=$(git rev-parse --show-toplevel)
1516

16-
EXAMPLES=(
17-
kind
18-
openshift
17+
mapfile -t EXAMPLES < <(
18+
find "$PROJECT_ROOT/examples/" -mindepth 1 -type d -printf "%f\n"
1919
)
2020

2121
BUILD="$PROJECT_ROOT/build"
22-
mkdir -p "$BUILD"
22+
mkdir --parents "$BUILD"
2323

2424
for example in "${EXAMPLES[@]}"; do
2525
run_trace false helm template "$example" "$PROJECT_ROOT" \
@@ -28,7 +28,7 @@ for example in "${EXAMPLES[@]}"; do
2828
--release-name \
2929
--values="$PROJECT_ROOT/examples/images.yaml" \
3030
--values="$PROJECT_ROOT/examples/$example/$example.values.yaml" \
31-
--output-dir="$BUILD" \| indent
31+
--output-dir="$BUILD"
3232
done
3333

3434
run_trace false kube-linter lint --config="$PROJECT_ROOT/kube-linter.yaml" "$BUILD"

0 commit comments

Comments
 (0)