From e7bbdcc91f6fc1383d1b3e6fcdf536e2a6edb536 Mon Sep 17 00:00:00 2001
From: Pierre Smeyers <pierre.smeyers@gmail.com>
Date: Wed, 18 Oct 2023 18:44:28 +0200
Subject: [PATCH] fix(hadolint): Hadolint report file name derives from
 Dockerfile's path (MD5) instead of content

---
 templates/gitlab-ci-docker.yml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/templates/gitlab-ci-docker.yml b/templates/gitlab-ci-docker.yml
index 85daa42..140cbd7 100644
--- a/templates/gitlab-ci-docker.yml
+++ b/templates/gitlab-ci-docker.yml
@@ -549,7 +549,7 @@ docker-hadolint:
   script:
     - autoconfig_hadolint
     - mkdir -p -m 777 reports
-    - dockerfile_hash=$(md5sum "$DOCKER_FILE" | cut -d" " -f1)
+    - dockerfile_hash=$(echo "$DOCKER_FILE" | md5sum | 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/docker-hadolint-${dockerfile_hash}.codeclimate.json"
     # Output in JSON format
-- 
GitLab