This commit is contained in:
@@ -43,16 +43,26 @@ steps:
|
|||||||
- docker push $REGISTRY_REPO:latest
|
- docker push $REGISTRY_REPO:latest
|
||||||
- echo "✓ Images pushed successfully"
|
- echo "✓ Images pushed successfully"
|
||||||
|
|
||||||
- name: Send Deploy Status Notification
|
- name: Send Deploy Status Notification (success)
|
||||||
image: curlimages/curl
|
image: curlimages/curl
|
||||||
environment:
|
environment:
|
||||||
DISCORD_WEBHOOK_URL:
|
DISCORD_WEBHOOK_URL:
|
||||||
from_secret: discord_webhook_url
|
from_secret: discord_webhook_url
|
||||||
commands:
|
commands:
|
||||||
- |
|
- |
|
||||||
EMOJI="💩"
|
BODY=$(printf '{"username":"WoodpeckerBot","content":"[%s - Build #%s] Publish success 🎉"}' "$CI_REPO" "$CI_PIPELINE_NUMBER")
|
||||||
[ "$CI_PIPELINE_STATUS" = "success" ] && EMOJI="🎉"
|
|
||||||
BODY=$(printf '{"username":"WoodpeckerBot","content":"[%s - Build #%s] Publish %s %s"}' "$CI_REPO" "$CI_PIPELINE_NUMBER" "$CI_PIPELINE_STATUS" "$EMOJI")
|
|
||||||
curl -sS -X POST -H "Content-Type: application/json" -d "$BODY" "$DISCORD_WEBHOOK_URL"
|
curl -sS -X POST -H "Content-Type: application/json" -d "$BODY" "$DISCORD_WEBHOOK_URL"
|
||||||
when:
|
when:
|
||||||
- status: [ success, failure ]
|
- status: [ success ]
|
||||||
|
|
||||||
|
- name: Send Deploy Status Notification (failure)
|
||||||
|
image: curlimages/curl
|
||||||
|
environment:
|
||||||
|
DISCORD_WEBHOOK_URL:
|
||||||
|
from_secret: discord_webhook_url
|
||||||
|
commands:
|
||||||
|
- |
|
||||||
|
BODY=$(printf '{"username":"WoodpeckerBot","content":"[%s - Build #%s] Publish failure 💩"}' "$CI_REPO" "$CI_PIPELINE_NUMBER")
|
||||||
|
curl -sS -X POST -H "Content-Type: application/json" -d "$BODY" "$DISCORD_WEBHOOK_URL"
|
||||||
|
when:
|
||||||
|
- status: [ failure ]
|
||||||
|
|||||||
Reference in New Issue
Block a user