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.
This commit is contained in:
Jordan Ramos
2026-08-18 11:14:45 -06:00
parent d3adc8e1fc
commit abebc99914

View File

@@ -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}" \