Skip to content

Commit a8e1af2

Browse files
committed
enable image configuration
1 parent db163c2 commit a8e1af2

3 files changed

Lines changed: 10 additions & 1 deletion

File tree

README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,12 @@ Version of docker image to use.
4949

5050
Default: `latest`
5151

52+
## `image` (string)
53+
54+
Which shell check image to use.
55+
56+
Default: `koalaman/shellcheck`
57+
5258
## License
5359

5460
MIT (see [LICENSE](LICENSE))

hooks/command

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,9 +102,10 @@ while IFS=$'\n' read -r option; do
102102
done < <(plugin_read_list OPTIONS)
103103

104104
BUILDKITE_PLUGIN_SHELLCHECK_VERSION="${BUILDKITE_PLUGIN_SHELLCHECK_VERSION:-stable}"
105+
BUILDKITE_PLUGIN_SHELLCHECK_IMAGE="${BUILDKITE_PLUGIN_SHELLCHECK_IMAGE:-koalaman/shellcheck}"
105106

106107
echo "+++ Running shellcheck on ${#files[@]} files"
107-
if docker run --rm -v "$PWD:/mnt" --workdir "/mnt" "koalaman/shellcheck:$BUILDKITE_PLUGIN_SHELLCHECK_VERSION" "${options[@]+${options[@]}}" "${files[@]}"; then
108+
if docker run --rm -v "$PWD:/mnt" --workdir "/mnt" "$BUILDKITE_PLUGIN_SHELLCHECK_IMAGE:$BUILDKITE_PLUGIN_SHELLCHECK_VERSION" "${options[@]+${options[@]}}" "${files[@]}"; then
108109
echo "Files are ok ✅"
109110
else
110111
exit 1

plugin.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,5 +20,7 @@ configuration:
2020
minItems: 1
2121
version:
2222
type: [string]
23+
image:
24+
type: [string]
2325
required:
2426
- files

0 commit comments

Comments
 (0)