@@ -6,7 +6,7 @@ set -euo pipefail
6
6
cd " $( dirname " $0 " ) "
7
7
source " ./lib.sh"
8
8
9
- TMPDIR=" $( mktemp -d) "
9
+ TMPDIR=$( mktemp -d)
10
10
BINDIR=" /usr/local/bin"
11
11
12
12
curl_flags=(
@@ -18,22 +18,40 @@ curl_flags=(
18
18
run_trace false sudo apt-get install --no-install-recommends --yes \
19
19
shellcheck
20
20
21
- run_trace false curl " ${curl_flags[@]} " " https://get.helm.sh/helm-v3.7.1-linux-amd64.tar.gz" \| \
22
- tar -C " $TMPDIR " --strip-components=1 -zxf - linux-amd64/helm
21
+ # gotestsum makes test output more readable
22
+ GOTESTSUM_VERSION=1.7.0
23
+ run_trace false curl " ${curl_flags[@]} " " https://github.com/gotestyourself/gotestsum/releases/download/v${GOTESTSUM_VERSION} /gotestsum_${GOTESTSUM_VERSION} _linux_amd64.tar.gz" \| \
24
+ tar --extract --gzip --directory=" $TMPDIR " --file=- gotestsum
23
25
24
- run_trace false curl " ${curl_flags[@]} " " https://github.com/norwoodj/helm-docs/releases/download/v1.5.0/helm-docs_1.5.0_Linux_x86_64.tar.gz" \| \
25
- tar -C " $TMPDIR " -zxf - helm-docs
26
+ # golangci-lint to lint Go code with multiple tools
27
+ GOLANGCI_LINT_VERSION=1.43.0
28
+ run_trace false curl " ${curl_flags[@]} " " https://github.com/golangci/golangci-lint/releases/download/v${GOLANGCI_LINT_VERSION} /golangci-lint-${GOLANGCI_LINT_VERSION} -linux-amd64.tar.gz" \| \
29
+ tar --extract --gzip --directory=" $TMPDIR " --file=- --strip-components=1 " golangci-lint-${GOLANGCI_LINT_VERSION} -linux-amd64/golangci-lint"
26
30
27
- run_trace false curl " ${curl_flags[@]} " " https://github.com/stackrox/kube-linter/releases/download/0.2.2/kube-linter-linux.tar.gz" \| \
28
- tar -C " $TMPDIR " -zxf - kube-linter
31
+ # Helm for packaging and validating chart
32
+ HELM_VERSION=3.7.1
33
+ run_trace false curl " ${curl_flags[@]} " " https://get.helm.sh/helm-v${HELM_VERSION} -linux-amd64.tar.gz" \| \
34
+ tar --extract --gzip --directory=" $TMPDIR " --file=- --strip-components=1 linux-amd64/helm
35
+
36
+ # helm-docs for generating README.md
37
+ HELM_DOCS_VERSION=1.5.0
38
+ run_trace false curl " ${curl_flags[@]} " " https://github.com/norwoodj/helm-docs/releases/download/v${HELM_DOCS_VERSION} /helm-docs_${HELM_DOCS_VERSION} _Linux_x86_64.tar.gz" \| \
39
+ tar --extract --gzip --directory=" $TMPDIR " --file=- helm-docs
40
+
41
+ # kube-linter for checking generated YAML output
42
+ KUBE_LINTER_VERSION=0.2.5
43
+ run_trace false curl " ${curl_flags[@]} " " https://github.com/stackrox/kube-linter/releases/download/${KUBE_LINTER_VERSION} /kube-linter-linux.tar.gz" \| \
44
+ tar --extract --gzip --directory=" $TMPDIR " --file=- kube-linter
29
45
30
46
run_trace false sudo install --mode=0755 --target-directory=" $BINDIR " " $TMPDIR /*"
31
47
32
- run_trace false which \
48
+ run_trace false command -v \
49
+ gotestsum \
50
+ golangci-lint \
33
51
helm \
34
52
helm-docs \
35
53
kube-linter
36
54
37
55
run_trace false helm version --short
38
56
39
- run_trace false rm -vrf " $TMPDIR "
57
+ run_trace false rm --verbose --recursive --force " $TMPDIR "
0 commit comments