add reason to fialure message
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
This commit is contained in:
parent
752d61ea4f
commit
7f40b2d086
@ -89,7 +89,7 @@ pipeline:
|
|||||||
commands:
|
commands:
|
||||||
- sleep 60
|
- sleep 60
|
||||||
- shoutrrr send
|
- shoutrrr send
|
||||||
--url matrix://$${MATRIX_ACCESS_TOKEN}@$${MATRIX_HOST}:$${MATRIX_PORT}/?rooms=$${MATRIX_ROOM}
|
--url matrix://:$${MATRIX_ACCESS_TOKEN}@$${MATRIX_HOST}:$${MATRIX_PORT}/?rooms=$${MATRIX_ROOM}
|
||||||
--message "New image build of $${ORGANIZATION}/$${REPO}, $${TAG}, has completed and been deployed."
|
--message "New image build of $${ORGANIZATION}/$${REPO}, $${TAG}, has completed and been deployed."
|
||||||
when:
|
when:
|
||||||
status:
|
status:
|
||||||
@ -104,10 +104,11 @@ pipeline:
|
|||||||
- source: MATRIX_ACCESS_TOKEN
|
- source: MATRIX_ACCESS_TOKEN
|
||||||
target: MATRIX_ACCESS_TOKEN
|
target: MATRIX_ACCESS_TOKEN
|
||||||
commands:
|
commands:
|
||||||
- sleep 60
|
- REASON='Reason:'
|
||||||
|
- REASON=$REASON$(cat /git/pipeline/reason)
|
||||||
- shoutrrr send
|
- shoutrrr send
|
||||||
--url matrix://$${MATRIX_ACCESS_TOKEN}@$${MATRIX_HOST}:$${MATRIX_PORT}/?rooms=$${MATRIX_ROOM}
|
--url matrix://:$${MATRIX_ACCESS_TOKEN}@$${MATRIX_HOST}:$${MATRIX_PORT}/?rooms=$${MATRIX_ROOM}
|
||||||
--message "New image build of $${ORGANIZATION}/$${REPO}, $${TAG}, has failed."
|
--message "New image build of $${ORGANIZATION}/$${REPO}, $${TAG}, has failed. $${REASON}"
|
||||||
when:
|
when:
|
||||||
status:
|
status:
|
||||||
- failure
|
- failure
|
@ -1,11 +1,13 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
if [[ $TAG =~ ^v1\...\..rc.$ ]]; then
|
if [[ $TAG =~ ^v1\...\..rc.$ ]]; then
|
||||||
echo "Tag ${TAG} appears to be a release candidate, terminating build."
|
echo "Tag ${TAG} appears to be a release candidate, terminating build."
|
||||||
|
echo " Tag is an RC." > /git/pipeline/reason
|
||||||
exit 1
|
exit 1
|
||||||
elif [[ $TAG =~ ^v1\...\..$ ]]; then
|
elif [[ $TAG =~ ^v1\...\..$ ]]; then
|
||||||
echo "Tag ${TAG} appears to be a release tag, proceeding."
|
echo "Tag ${TAG} appears to be a release tag, proceeding."
|
||||||
exit 0
|
exit 0
|
||||||
else
|
else
|
||||||
echo "Unable to determine nature of tag, terminating build."
|
echo "Unable to determine nature of tag, terminating build."
|
||||||
|
echo " Cannot parse tag." > /git/pipeline/reason
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
Loading…
Reference in New Issue
Block a user