The solved with this docker image can actually be solved without it. There are pre-steps
which can be specified for jobs when they are referenced in worflows:
- shellcheck/check:
filters:
tags:
only:
- /.*/
pre-steps:
- run:
name: "Install git and SSH client"
command: |
apk add \
--update \
--no-progress \
git \
openssh-client
Docker image for running shellcheck on CircleCI.
This image is not maintained by CircleCI.
This image can be used for running shellcheck in CircleCI. In contrast to the official image, this image also includes git and ssh, tools needed for CircleCI to run smoothly.
The docker images are available in the repository at quay.
The current released version is tagged 0.6.0
.
The latest development version is tagged as latest
.
The releases will follow the upstream version, with an optional dash and number appended, if there are multiple releases per upstream version.
So for example, the first release for upstream version 1.16.4
will be tagged 1.16.4
. If there
is a second release for this upstream version, it will be tagged 1.16.4-1
.
The easiest way to make use of it is to use the official CircleCI shellcheck-orb and override its executor:
version: 2.1
orbs:
shellcheck: circleci/shellcheck@1.3.3
executors:
shellcheck-circleci:
docker:
- image: quay.io/cfra/shellcheck-circleci
workflows:
version: 2
build:
jobs:
- shellcheck/check:
executor: shellcheck-circleci
For development, you can build the image locally using:
$ ./build.sh
This will build the image and tag it as shellcheck-circleci:latest
.
To validate the generated image, you can run:
$ ./test
This will perform some basic tests on the image to see if shellcheck and git are working.