Fix Gotify notifications with correct API format
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:
Neon Vortex
2025-11-22 23:06:42 -05:00
parent 2c619f86c9
commit 066d6cae67
2 changed files with 13 additions and 27 deletions

View File

@@ -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
---