--- apiVersion: v1 kind: ConfigMap metadata: name: webhook-build-script namespace: default data: trigger-build.sh: | #!/bin/bash set -e echo "===== Git Push Detected - Triggering Build =====" date # Clone the repository echo "Cloning repository..." git clone http://192.168.1.49:13001/admin/neon-vortex.git /tmp/repo cd /tmp/repo # Get commit info GIT_COMMIT=$(git rev-parse HEAD) GIT_SHORT=$(git rev-parse --short HEAD) GIT_MSG=$(git log -1 --pretty=%B | head -1) GIT_AUTHOR=$(git log -1 --pretty=%an) echo "Commit: $GIT_SHORT ($GIT_COMMIT)" echo "Author: $GIT_AUTHOR" echo "Message: $GIT_MSG" # Generate unique job name TIMESTAMP=$(date +%s) JOB_NAME="build-${GIT_SHORT}-${TIMESTAMP}" 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" # Create the build job kubectl apply -f - <