Loading templates/gitlab-ci-docker.yml +8 −6 Original line number Diff line number Diff line Loading @@ -451,18 +451,20 @@ docker-hadolint: - autoconfig_hadolint - mkdir -p reports - chmod o+rwx reports - hadolint_report_name="hadolint-$(md5sum "$DOCKER_FILE" | cut -d" " -f1).json" # Force one run with tty format in order to have a nice output without failure - hadolint --no-fail $DOCKER_HADOLINT_ARGS $hadolint_config_opts "$DOCKER_FILE" # Make one run with ad hoc output for gitlab integration - hadolint -f gitlab_codeclimate $DOCKER_HADOLINT_ARGS $hadolint_config_opts "$DOCKER_FILE" > "reports/$hadolint_report_name" - dockerfile_hash=$(md5sum "$DOCKER_FILE" | cut -d" " -f1) # Output in Code Climate format (GitLab integration) - hadolint --no-fail -f gitlab_codeclimate $DOCKER_HADOLINT_ARGS $hadolint_config_opts "$DOCKER_FILE" > "reports/hadolint-cc-${dockerfile_hash}.json" # Output in JSON format - hadolint --no-fail -f json $DOCKER_HADOLINT_ARGS $hadolint_config_opts "$DOCKER_FILE" > "reports/hadolint-json-${dockerfile_hash}.json" # las run with console output (with failure) - hadolint $DOCKER_HADOLINT_ARGS $hadolint_config_opts "$DOCKER_FILE" artifacts: name: "$CI_JOB_NAME artifacts from $CI_PROJECT_NAME on $CI_COMMIT_REF_SLUG" expire_in: 1 day when: always reports: codequality: - "reports/hadolint-*.json" - "reports/hadolint-cc-*.json" paths: - "reports/hadolint-*.json" rules: Loading Loading
templates/gitlab-ci-docker.yml +8 −6 Original line number Diff line number Diff line Loading @@ -451,18 +451,20 @@ docker-hadolint: - autoconfig_hadolint - mkdir -p reports - chmod o+rwx reports - hadolint_report_name="hadolint-$(md5sum "$DOCKER_FILE" | cut -d" " -f1).json" # Force one run with tty format in order to have a nice output without failure - hadolint --no-fail $DOCKER_HADOLINT_ARGS $hadolint_config_opts "$DOCKER_FILE" # Make one run with ad hoc output for gitlab integration - hadolint -f gitlab_codeclimate $DOCKER_HADOLINT_ARGS $hadolint_config_opts "$DOCKER_FILE" > "reports/$hadolint_report_name" - dockerfile_hash=$(md5sum "$DOCKER_FILE" | cut -d" " -f1) # Output in Code Climate format (GitLab integration) - hadolint --no-fail -f gitlab_codeclimate $DOCKER_HADOLINT_ARGS $hadolint_config_opts "$DOCKER_FILE" > "reports/hadolint-cc-${dockerfile_hash}.json" # Output in JSON format - hadolint --no-fail -f json $DOCKER_HADOLINT_ARGS $hadolint_config_opts "$DOCKER_FILE" > "reports/hadolint-json-${dockerfile_hash}.json" # las run with console output (with failure) - hadolint $DOCKER_HADOLINT_ARGS $hadolint_config_opts "$DOCKER_FILE" artifacts: name: "$CI_JOB_NAME artifacts from $CI_PROJECT_NAME on $CI_COMMIT_REF_SLUG" expire_in: 1 day when: always reports: codequality: - "reports/hadolint-*.json" - "reports/hadolint-cc-*.json" paths: - "reports/hadolint-*.json" rules: Loading