Closed cfra closed 5 years ago
I saw that all circleci/
images are based on official docker images. Therefore, I guess that creating a circleci/shellcheck
image is not really a viable option?
Until a better solution is found, I have written a tiny Dockerfile
that adds shellcheck
to the circleci/buildpack-deps
image, which results in an image that is usable for the shellcheck orb, but also has all the necessary tools available to make it work with git tags.
https://github.com/cfra/shellcheck-circleci
By now, I have actually discovered an easier solution for this problem: When specifying workflows, pre-steps
can be specified for a job.
- shellcheck/check:
filters:
tags:
only:
- /.*/
pre-steps:
- run:
name: "Install git and SSH client"
command: |
apk add \
--update \
--no-progress \
git \
openssh-client
@cfra the shellcheck
job provides the option of using a custom executor, so you should be able to use any docker image to run the job
@iynere Yea, this is exactly why I started https://github.com/cfra/shellcheck-circleci
But using pre-steps
to install git and ssh is actually faster during execution and requires less implementation and maintenance effort, so I think it is the better solution.
I have a CircleCI job like the following:
This works fine for regular builds on branches. However, when I do a build on top of a tag, the following happens:
I think this is not really the best possible behavior.
I am not sure what the best way to address this would be.
One thing I could think of would be the creation of a
circleci/shellckeck
docker image instead of the upstreamkoalaman
images, and installing git and ssh into this image.If someone could point me into the right direction for solving this, I would be willing to work on it.