From 64666c0b8ea0f7bb79103040f29b9a2f469e13e2 Mon Sep 17 00:00:00 2001
From: jurgenhaas <juergen.haas@lakedrops.com>
Date: Thu, 18 Jan 2024 10:19:24 +0100
Subject: [PATCH] Allow to ignore composer audit

---
 test-and-deploy.yml | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/test-and-deploy.yml b/test-and-deploy.yml
index 72584c9..dfc97bd 100644
--- a/test-and-deploy.yml
+++ b/test-and-deploy.yml
@@ -717,9 +717,9 @@ Debug:
     - composer audit --no-dev --locked --format=plain >/tmp/test.log 2>&1 || true
     - cat /tmp/test.log
     - EC=0
-    - grep "No security vulnerability advisories found" /tmp/test.log || EC=$?
+    - if [[ "$IGNORE_COMPOSER_AUDIT" == "0" ]]; then grep "No security vulnerability advisories found" /tmp/test.log || EC=$?; fi
     - if [[ $EC -ne 0 ]]; then DOUPDATE=1; fi
-    - if [[ $DOUPDATE -eq 0 ]]; then exit 0; fi
+    - if [[ $DOUPDATE -eq 0 ]]; then cat /tmp/test.log; exit 0; fi
     - git remote rm origin
     - git remote add origin git@${CI_SERVER_HOST}:$CI_PROJECT_PATH.git
     - composer update --no-interaction --no-progress --no-dev
@@ -729,6 +729,7 @@ Debug:
     - EC=0
     - if [[ "$IGNORE_COMPOSER_AUDIT" == "0" ]]; then grep "No security vulnerability advisories found" /tmp/test.log || EC=$?; fi
     - if [[ $EC -ne 0 ]]; then glab issue create --title "Security vulnerability advisories found" --description "$(cat /tmp/test.log)"; exit 1; fi
+    - cat /tmp/test.log
     - rm /tmp/test.log >/dev/null 2>&1 || true
     - git status >/tmp/test.log 2>&1
     - EC=0
@@ -774,7 +775,7 @@ Debug:
     - composer audit --no-dev --locked --format=plain >/tmp/test.log 2>&1 || true
     - EC=0
     - if [[ "$IGNORE_COMPOSER_AUDIT" == "0" ]]; then grep "No security vulnerability advisories found" /tmp/test.log || EC=$?; fi
-    - if [[ $EC -eq 0 ]]; then exit 0; fi
+    - if [[ $EC -eq 0 ]]; then cat /tmp/test.log; exit 0; fi
     - glab issue create --title "Security vulnerability advisories found" --description "$(cat /tmp/test.log)"
     - rm /tmp/test.log >/dev/null 2>&1 || true
     - exit 1
-- 
GitLab