From 97551920c6600771222105ed8c6d97d12c6464ab Mon Sep 17 00:00:00 2001 From: Marco Wettstein <maw@panter.ch> Date: Thu, 8 Apr 2021 17:46:22 +0200 Subject: [PATCH] fix: do not compare build id from header if it does not is set --- includes/verify.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/includes/verify.yml b/includes/verify.yml index 60507ec..94c8eab 100644 --- a/includes/verify.yml +++ b/includes/verify.yml @@ -1,6 +1,10 @@ .checkBuildId: &checkBuildId | buildIdMatches () { result=$(curl -sI $CI_ENVIRONMENT_URL | awk -v FS=": " '/^x-build-id/{print $2}') + # if there is no result, its not using our ingress + if [ -z "$result" ] + return 0 + fi if [[ "${result//[$' \t\n\r']/}" == "${BUILD_ID//[$' \t\n\r']/}" ]]; then return 0; fi echo "expected $BUILD_ID, received: $result" return 1 -- GitLab