45 lines
1.5 KiB
Bash
Executable File
45 lines
1.5 KiB
Bash
Executable File
#!/bin/bash
|
|
# Debug script to check Drone configuration files
|
|
|
|
echo "🔍 DRONE CONFIGURATION DEBUG"
|
|
echo "============================"
|
|
echo ""
|
|
|
|
echo "1. Current commit hash:"
|
|
git rev-parse HEAD
|
|
echo ""
|
|
|
|
echo "2. Files in repository root:"
|
|
ls -la .drone*
|
|
echo ""
|
|
|
|
echo "3. Testing .drone.jsonnet compilation:"
|
|
if jsonnet .drone.jsonnet >/dev/null 2>&1; then
|
|
echo "✅ .drone.jsonnet compiles successfully"
|
|
echo "Generated output (first 10 lines):"
|
|
jsonnet .drone.jsonnet | head -10
|
|
else
|
|
echo "❌ .drone.jsonnet compilation failed"
|
|
jsonnet .drone.jsonnet
|
|
fi
|
|
echo ""
|
|
|
|
echo "4. Checking Drone server configuration:"
|
|
echo "DRONE_JSONNET_ENABLED: $(kubectl get configmap drone -n apps--droneio--prd -o jsonpath='{.data.DRONE_JSONNET_ENABLED}')"
|
|
echo "DRONE_JSONNET_IMPORT_PATHS: $(kubectl get configmap drone -n apps--droneio--prd -o jsonpath='{.data.DRONE_JSONNET_IMPORT_PATHS}')"
|
|
echo ""
|
|
|
|
echo "5. Recent Drone logs (last 5):"
|
|
kubectl logs droneio-7686bf675f-scdvh -n apps--droneio--prd --tail=5
|
|
echo ""
|
|
|
|
echo "6. Testing webhook connectivity from Gitea to Drone:"
|
|
kubectl exec gitea-app-dep-6db56f9d88-g7qlb -n cluster-infra--gitea--prd -c gitea -- curl -k -s -o /dev/null -w "HTTP Status: %{http_code}" https://drone.aipice.local/hook --connect-timeout 5
|
|
echo ""
|
|
echo ""
|
|
|
|
echo "🎯 NEXT STEPS:"
|
|
echo "If webhook connectivity works but Drone can't find YAML:"
|
|
echo "- Check if repository is ACTIVATED in Drone UI"
|
|
echo "- Verify .drone.jsonnet is committed to git"
|
|
echo "- Try manual build trigger in Drone UI" |