Skip to content
Snippets Groups Projects
Commit 0784c4af authored by Pierre Smeyers's avatar Pierre Smeyers
Browse files

Merge branch '29-default-hadolint-config-file-s-name' into 'master'

Resolve "Default hadolint config file's name"

Closes #29

See merge request to-be-continuous/docker!37
parents 9414858b 0cace924
Branches
Tags
No related merge requests found
......@@ -313,10 +313,11 @@ stages:
# autodetects whether there is an hadolint config file
function autoconfig_hadolint() {
# If present, import hadolint config found inside the git repository
if [[ -f "hadolint.yaml" ]]
_cfg=$(ls -1 "hadolint.yaml" 2>/dev/null || ls -1 ".hadolint.yaml" 2>/dev/null || echo "")
if [[ -f "$_cfg" ]]
then
log_info "Using custom Hadolint config (\\e[33;1mhadolint.yaml\\e[0m)"
export hadolint_config_opts="--config ./hadolint.yaml"
log_info "Using custom Hadolint config (\\e[33;1m${_cfg}\\e[0m)"
export hadolint_config_opts="--config $_cfg"
else
log_info "No Hadolint config found: use default"
fi
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment