Merge pull request #517 from github/fixdocker

Fix Hadolint
This commit is contained in:
Lukas Gravley 2020-08-04 16:25:46 -05:00 committed by GitHub
commit 059d4d35d6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -265,7 +265,6 @@ FILE_ARRAY_COFFEESCRIPT=() # Array of files to check
FILE_ARRAY_CSS=() # Array of files to check
FILE_ARRAY_DART=() # Array of files to check
FILE_ARRAY_DOCKERFILE=() # Array of files to check
FILE_ARRAY_DOCKERFILE_HADOLINT=() # Array of files to check
FILE_ARRAY_ENV=() # Array of files to check
FILE_ARRAY_GO=() # Array of files to check
FILE_ARRAY_GROOVY=() # Array of files to check
@ -1327,7 +1326,7 @@ if [ "${VALIDATE_DOCKER}" == "true" ]; then
#########################
# LintCodebase "FILE_TYPE" "LINTER_NAME" "LINTER_CMD" "FILE_TYPES_REGEX" "FILE_ARRAY"
# NOTE: dockerfilelint's "-c" option expects the folder *containing* the DOCKER_LINTER_RULES file
LintCodebase "DOCKERFILE" "dockerfilelint" "dockerfilelint -c $(dirname ${DOCKERFILE_LINTER_RULES})" ".*\(Dockerfile\)\$" "${FILE_ARRAY_DOCKER[@]}"
LintCodebase "DOCKERFILE" "dockerfilelint" "dockerfilelint -c $(dirname ${DOCKERFILE_LINTER_RULES})" ".*\(Dockerfile\)\$" "${FILE_ARRAY_DOCKERFILE[@]}"
fi
###########################
@ -1338,7 +1337,7 @@ if [ "${VALIDATE_DOCKER_HADOLINT}" == "true" ]; then
# Lint the docker files #
#########################
# LintCodebase "FILE_TYPE" "LINTER_NAME" "LINTER_CMD" "FILE_TYPES_REGEX" "FILE_ARRAY"
LintCodebase "DOCKERFILE_HADOLINT" "hadolint" "hadolint -c ${DOCKERFILE_HADOLINT_LINTER_RULES}" ".*\(Dockerfile\)\$" "${FILE_ARRAY_DOCKER[@]}"
LintCodebase "DOCKERFILE_HADOLINT" "hadolint" "hadolint -c ${DOCKERFILE_HADOLINT_LINTER_RULES}" ".*\(Dockerfile\)\$" "${FILE_ARRAY_DOCKERFILE[@]}"
fi
########################