feat : upa
This commit is contained in:
@@ -188,25 +188,3 @@ jobs:
|
||||
kubectl --kubeconfig "$KUBECONFIG" --namespace "$DEPLOY_NAMESPACE" rollout status \
|
||||
deployment/buzz-sheet-discord-worker \
|
||||
--timeout=10m
|
||||
|
||||
- name: Publish deployment result
|
||||
if: always()
|
||||
continue-on-error: true
|
||||
env:
|
||||
DEPLOYMENT_WEBHOOK_SECRET: ${{ secrets.DEPLOYMENT_WEBHOOK_SECRET }}
|
||||
DEPLOYMENT_JOB_STATUS: ${{ job.status }}
|
||||
REVISION: ${{ gitea.sha }}
|
||||
run: |
|
||||
if [ -z "$DEPLOYMENT_WEBHOOK_SECRET" ]; then
|
||||
echo "DEPLOYMENT_WEBHOOK_SECRET is not configured; skipping notification"
|
||||
exit 0
|
||||
fi
|
||||
status=failed
|
||||
if [ "$DEPLOYMENT_JOB_STATUS" = "success" ]; then
|
||||
status=ready
|
||||
fi
|
||||
curl --fail-with-body --silent --show-error --retry 3 \
|
||||
--header "Authorization: Bearer $DEPLOYMENT_WEBHOOK_SECRET" \
|
||||
--header "Content-Type: application/json" \
|
||||
--data "{\"deploymentId\":\"$REVISION\",\"status\":\"$status\"}" \
|
||||
"$BASE_URL/api/deployments/status"
|
||||
|
||||
Reference in New Issue
Block a user