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:
@@ -15,6 +15,4 @@ metadata:
|
|||||||
namespace: flux-system
|
namespace: flux-system
|
||||||
spec:
|
spec:
|
||||||
type: generic
|
type: generic
|
||||||
address: https://notify.caffeinetux.com
|
address: https://notify.caffeinetux.com/message?token=APMvTuncQJmm6vd
|
||||||
secretRef:
|
|
||||||
name: notify-token
|
|
||||||
|
|||||||
@@ -34,14 +34,10 @@ data:
|
|||||||
echo "Creating build job: $JOB_NAME"
|
echo "Creating build job: $JOB_NAME"
|
||||||
|
|
||||||
# Send start notification
|
# Send start notification
|
||||||
curl -s -X POST "https://notify.caffeinetux.com?token=APMvTuncQJmm6vd" \
|
curl -s -X POST "https://notify.caffeinetux.com/message?token=APMvTuncQJmm6vd" \
|
||||||
-H "Content-Type: application/json" \
|
-F "title=🔨 Neon Vortex Build Started" \
|
||||||
-d "{
|
-F "message=Commit: ${GIT_SHORT} by ${GIT_AUTHOR} - ${GIT_MSG}" \
|
||||||
\"title\": \"🔨 Neon Vortex Build Started\",
|
-F "priority=5" || echo "Notification failed"
|
||||||
\"message\": \"Commit: ${GIT_SHORT} by ${GIT_AUTHOR}\\n${GIT_MSG}\",
|
|
||||||
\"priority\": 3,
|
|
||||||
\"tags\": [\"building\"]
|
|
||||||
}" || echo "Notification failed"
|
|
||||||
|
|
||||||
# Create the build job
|
# Create the build job
|
||||||
kubectl apply -f - <<EOF
|
kubectl apply -f - <<EOF
|
||||||
@@ -119,14 +115,10 @@ data:
|
|||||||
sleep 10
|
sleep 10
|
||||||
|
|
||||||
# Send completion notification
|
# Send completion notification
|
||||||
curl -s -X POST "https://notify.caffeinetux.com?token=APMvTuncQJmm6vd" \
|
curl -s -X POST "https://notify.caffeinetux.com/message?token=APMvTuncQJmm6vd" \
|
||||||
-H "Content-Type: application/json" \
|
-F "title=✅ Neon Vortex Build Complete" \
|
||||||
-d "{
|
-F "message=Image built successfully for commit ${GIT_SHORT}. Deployment will update automatically." \
|
||||||
\"title\": \"✅ Neon Vortex Build Complete\",
|
-F "priority=5"
|
||||||
\"message\": \"Image built successfully for commit ${GIT_SHORT}\\nDeployment will update automatically\",
|
|
||||||
\"priority\": 3,
|
|
||||||
\"tags\": [\"success\",\"deployed\"]
|
|
||||||
}"
|
|
||||||
|
|
||||||
echo "Completion notification sent"
|
echo "Completion notification sent"
|
||||||
env:
|
env:
|
||||||
@@ -147,14 +139,10 @@ data:
|
|||||||
echo "✅ Build job $JOB_NAME created successfully"
|
echo "✅ Build job $JOB_NAME created successfully"
|
||||||
else
|
else
|
||||||
echo "❌ Failed to create build job"
|
echo "❌ Failed to create build job"
|
||||||
curl -s -X POST "https://notify.caffeinetux.com?token=APMvTuncQJmm6vd" \
|
curl -s -X POST "https://notify.caffeinetux.com/message?token=APMvTuncQJmm6vd" \
|
||||||
-H "Content-Type: application/json" \
|
-F "title=❌ Neon Vortex Build Failed" \
|
||||||
-d "{
|
-F "message=Failed to create build job for commit ${GIT_SHORT}" \
|
||||||
\"title\": \"❌ Neon Vortex Build Failed\",
|
-F "priority=8"
|
||||||
\"message\": \"Failed to create build job for commit ${GIT_SHORT}\",
|
|
||||||
\"priority\": 5,
|
|
||||||
\"tags\": [\"error\"]
|
|
||||||
}"
|
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
---
|
---
|
||||||
|
|||||||
Reference in New Issue
Block a user