CircleCI-Public / CircleCI-Public/docker-orb

Regression v2.8.1 to v3.0.1 with Hadolint on multiple images

Open
#214 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Shell
Stars
31
Forks
61
PR merge metrics
No merged PRs in 30d

Description

### Orb version
3.0.1

### What happened
Images key for hadolint job no longer allows usage of matching strings.

### Expected behavior
We have our CI set up on one project to lint all the images contained within, which is used for managing versioned base images for all our projects, with shared libraries etc. installed.

On v2.8.1, we could use a config like so:
```
jobs:
- docker/hadolint:
dockerfiles: "images/*/**"
hadolint-tag: 2.12.0-debian
```
And it succeeds and lints all the images

But when we try to upgrade to v3.0.1 we instead get an error as it fails to find the selection of images. My suspicion is that it is due to the change to the hadolint script [here](https://github.com/CircleCI-Public/docker-orb/compare/v2.8.2...v3.0.0#diff-ba8152a624cbecafaef164289cf27a912fac55d95c946fc96bcd045d20c11c13L63) which by wrapping it as a single string causes the dockerfiles to no longer be parsed correctly

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with the hadolint script change in the linked v2.8.2...v3.0.0 comparison and reproduce the supplied docker/orb configuration using dockerfiles: "images/*/**". Verify the fix by confirming that v3.0.1-era configuration finds and lints all matching images, including the provided hadolint-tag.

Written by the indexing model from the issue text.

Assessment

Tech stack
docker, shell
Domain
ci-cd, devops
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.