Fix Gotify notifications with correct API format
Some checks failed
Build and Push to Harbor / build-and-push (push) Has been cancelled
Some checks failed
Build and Push to Harbor / build-and-push (push) Has been cancelled
- Use /message endpoint with form data instead of JSON - Update notification provider to use correct Gotify URL - Fix priority levels for different notification types - Test notifications should now work properly 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -34,14 +34,10 @@ data:
|
||||
echo "Creating build job: $JOB_NAME"
|
||||
|
||||
# Send start notification
|
||||
curl -s -X POST "https://notify.caffeinetux.com?token=APMvTuncQJmm6vd" \
|
||||
-H "Content-Type: application/json" \
|
||||
-d "{
|
||||
\"title\": \"🔨 Neon Vortex Build Started\",
|
||||
\"message\": \"Commit: ${GIT_SHORT} by ${GIT_AUTHOR}\\n${GIT_MSG}\",
|
||||
\"priority\": 3,
|
||||
\"tags\": [\"building\"]
|
||||
}" || echo "Notification failed"
|
||||
curl -s -X POST "https://notify.caffeinetux.com/message?token=APMvTuncQJmm6vd" \
|
||||
-F "title=🔨 Neon Vortex Build Started" \
|
||||
-F "message=Commit: ${GIT_SHORT} by ${GIT_AUTHOR} - ${GIT_MSG}" \
|
||||
-F "priority=5" || echo "Notification failed"
|
||||
|
||||
# Create the build job
|
||||
kubectl apply -f - <<EOF
|
||||
@@ -119,14 +115,10 @@ data:
|
||||
sleep 10
|
||||
|
||||
# Send completion notification
|
||||
curl -s -X POST "https://notify.caffeinetux.com?token=APMvTuncQJmm6vd" \
|
||||
-H "Content-Type: application/json" \
|
||||
-d "{
|
||||
\"title\": \"✅ Neon Vortex Build Complete\",
|
||||
\"message\": \"Image built successfully for commit ${GIT_SHORT}\\nDeployment will update automatically\",
|
||||
\"priority\": 3,
|
||||
\"tags\": [\"success\",\"deployed\"]
|
||||
}"
|
||||
curl -s -X POST "https://notify.caffeinetux.com/message?token=APMvTuncQJmm6vd" \
|
||||
-F "title=✅ Neon Vortex Build Complete" \
|
||||
-F "message=Image built successfully for commit ${GIT_SHORT}. Deployment will update automatically." \
|
||||
-F "priority=5"
|
||||
|
||||
echo "Completion notification sent"
|
||||
env:
|
||||
@@ -147,14 +139,10 @@ data:
|
||||
echo "✅ Build job $JOB_NAME created successfully"
|
||||
else
|
||||
echo "❌ Failed to create build job"
|
||||
curl -s -X POST "https://notify.caffeinetux.com?token=APMvTuncQJmm6vd" \
|
||||
-H "Content-Type: application/json" \
|
||||
-d "{
|
||||
\"title\": \"❌ Neon Vortex Build Failed\",
|
||||
\"message\": \"Failed to create build job for commit ${GIT_SHORT}\",
|
||||
\"priority\": 5,
|
||||
\"tags\": [\"error\"]
|
||||
}"
|
||||
curl -s -X POST "https://notify.caffeinetux.com/message?token=APMvTuncQJmm6vd" \
|
||||
-F "title=❌ Neon Vortex Build Failed" \
|
||||
-F "message=Failed to create build job for commit ${GIT_SHORT}" \
|
||||
-F "priority=8"
|
||||
exit 1
|
||||
fi
|
||||
---
|
||||
|
||||
Reference in New Issue
Block a user