Migrate to Dockhand
This commit is contained in:
@@ -14,23 +14,23 @@ depends_on:
|
|||||||
- ci
|
- ci
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Trigger Portainer stack redeploy
|
- name: Trigger Dockhand Deploy
|
||||||
image: curlimages/curl:latest
|
image: curlimages/curl:latest
|
||||||
environment:
|
environment:
|
||||||
PORTAINER_WEBHOOK_URL:
|
WEBHOOK_URL:
|
||||||
from_secret: portainer_webhook_url
|
from_secret: dockhand_webhook_url
|
||||||
commands:
|
commands:
|
||||||
- set -e
|
- set -e
|
||||||
- echo "=== Triggering Portainer stack redeploy ==="
|
- echo "=== Triggering Dockhand deploy ==="
|
||||||
- |
|
- |
|
||||||
resp=$(curl -s -w "\n%{http_code}" -X POST "$PORTAINER_WEBHOOK_URL")
|
resp=$(curl -s -w "\n%{http_code}" -X POST "$WEBHOOK_URL")
|
||||||
body=$(echo "$resp" | head -n -1)
|
body=$(echo "$resp" | head -n -1)
|
||||||
code=$(echo "$resp" | tail -n 1)
|
code=$(echo "$resp" | tail -n 1)
|
||||||
if [ "$code" != "200" ] && [ "$code" != "204" ]; then
|
if [ "$code" != "200" ] && [ "$code" != "204" ]; then
|
||||||
echo "Webhook failed (HTTP $code): $body"
|
echo "Webhook failed (HTTP $code): $body"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
echo "✓ Portainer redeploy triggered (HTTP $code)"
|
echo "✓ Dockhand deploy triggered (HTTP $code)"
|
||||||
|
|
||||||
- name: Send Deploy Status Notification (success)
|
- name: Send Deploy Status Notification (success)
|
||||||
image: curlimages/curl
|
image: curlimages/curl
|
||||||
@@ -46,7 +46,7 @@ steps:
|
|||||||
BODY=$(printf '{"channel_id":"%s","message":"[%s - Build #%s] Production Deploy success 🎉"}' "$MATTERMOST_CHANNEL_ID" "$CI_REPO" "$CI_PIPELINE_NUMBER")
|
BODY=$(printf '{"channel_id":"%s","message":"[%s - Build #%s] Production Deploy success 🎉"}' "$MATTERMOST_CHANNEL_ID" "$CI_REPO" "$CI_PIPELINE_NUMBER")
|
||||||
curl -sS -X POST -H "Content-Type: application/json" -d "$BODY" -H "Authorization: Bearer $MATTERMOST_BOT_ACCESS_TOKEN" "$MATTERMOST_POST_API_URL"
|
curl -sS -X POST -H "Content-Type: application/json" -d "$BODY" -H "Authorization: Bearer $MATTERMOST_BOT_ACCESS_TOKEN" "$MATTERMOST_POST_API_URL"
|
||||||
depends_on:
|
depends_on:
|
||||||
- Trigger Portainer stack redeploy
|
- Trigger Dockhand Deploy
|
||||||
when:
|
when:
|
||||||
- status: [success]
|
- status: [success]
|
||||||
|
|
||||||
@@ -64,6 +64,6 @@ steps:
|
|||||||
BODY=$(printf '{"channel_id":"%s","message":"[%s - Build #%s] Production Deploy failure 💩"}' "$MATTERMOST_CHANNEL_ID" "$CI_REPO" "$CI_PIPELINE_NUMBER")
|
BODY=$(printf '{"channel_id":"%s","message":"[%s - Build #%s] Production Deploy failure 💩"}' "$MATTERMOST_CHANNEL_ID" "$CI_REPO" "$CI_PIPELINE_NUMBER")
|
||||||
curl -sS -X POST -H "Content-Type: application/json" -d "$BODY" -H "Authorization: Bearer $MATTERMOST_BOT_ACCESS_TOKEN" "$MATTERMOST_POST_API_URL"
|
curl -sS -X POST -H "Content-Type: application/json" -d "$BODY" -H "Authorization: Bearer $MATTERMOST_BOT_ACCESS_TOKEN" "$MATTERMOST_POST_API_URL"
|
||||||
depends_on:
|
depends_on:
|
||||||
- Trigger Portainer stack redeploy
|
- Trigger Dockhand Deploy
|
||||||
when:
|
when:
|
||||||
- status: [failure]
|
- status: [failure]
|
||||||
|
|||||||
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "umami-stack",
|
"name": "umami-stack",
|
||||||
"version": "1.0.0",
|
"version": "1.0.1",
|
||||||
"private": true,
|
"private": true,
|
||||||
"packageManager": "pnpm@10.29.2",
|
"packageManager": "pnpm@10.29.2",
|
||||||
"engines": {
|
"engines": {
|
||||||
|
|||||||
Reference in New Issue
Block a user