From abebc99914bbe6a57b4972163327a936aa96ddf7 Mon Sep 17 00:00:00 2001 From: Jordan Ramos Date: Tue, 18 Aug 2026 11:14:45 -0600 Subject: [PATCH] Fix deploy after_script: install git and use grep -E in Alpine Alpine containers lack git and BusyBox grep doesn't support -P (Perl regex). Install git in after_script and use grep -oE for POSIX extended regex instead. --- .gitlab-ci.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 8555114..430df40 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -189,8 +189,8 @@ deploy-staging: - echo "Staging deploy complete." after_script: - | - apk add --no-cache curl > /dev/null 2>&1 - ISSUES=$(git log --format=%B -1 | grep -oP '#\d+' | tr -d '#' | sort -u) + apk add --no-cache curl git > /dev/null 2>&1 + ISSUES=$(git log --format=%B -1 2>/dev/null | grep -oE '#[0-9]+' | tr -d '#' | sort -u) for ISSUE in $ISSUES; do curl --silent --request POST \ --header "PRIVATE-TOKEN: ${GITLAB_PAT}" \ @@ -237,8 +237,8 @@ deploy-production: - echo "Production deploy complete." after_script: - | - apk add --no-cache curl > /dev/null 2>&1 - ISSUES=$(git log --format=%B -1 | grep -oP '#\d+' | tr -d '#' | sort -u) + apk add --no-cache curl git > /dev/null 2>&1 + ISSUES=$(git log --format=%B -1 2>/dev/null | grep -oE '#[0-9]+' | tr -d '#' | sort -u) for ISSUE in $ISSUES; do curl --silent --request POST \ --header "PRIVATE-TOKEN: ${GITLAB_PAT}" \