From dc1dce2e07789bf310fb067280cb25e7ecf91ae9 Mon Sep 17 00:00:00 2001 From: dvirlabs Date: Fri, 24 Apr 2026 15:21:04 +0300 Subject: [PATCH] test --- .woodpecker.yml | 35 +++++------------------------------ 1 file changed, 5 insertions(+), 30 deletions(-) diff --git a/.woodpecker.yml b/.woodpecker.yml index 89ff39e..1fc6d9f 100644 --- a/.woodpecker.yml +++ b/.woodpecker.yml @@ -133,12 +133,12 @@ steps: # Detects manual changes made directly on the server between pushes. # Generates structured JSON with sync status, drift count, and changed files. # Sends JSON to gitops-status-server for continuous GitOps monitoring. - # Pipeline marked FAILED when drift found so it is visible in the UI. + # Pipeline always succeeds - check Grafana dashboard for drift status. # # ─── Woodpecker Cron UI settings ────────────────────────────────────────── # Name: gitops_sync_check # Branch: master - # Schedule: */2 * * * * + # Schedule: */1 * * * * (every 1 minute for testing, adjust as needed) # --------------------------------------------------------------------------- gitops_sync_check: image: alpine/ansible:latest @@ -170,36 +170,11 @@ steps: echo "==> [cron] Running continuous GitOps drift check..." - # Make script executable and run it + # Make script executable and run it (always succeeds - just updates JSON) chmod +x update-gitops-status.sh - - # Capture exit code to determine if drift was detected - set +e ./update-gitops-status.sh - SCRIPT_RC=$? - set -e - if [ "$SCRIPT_RC" -ne 0 ]; then - echo "==> ERROR: Status update failed" - exit 1 - fi - - # Check sync status to determine pipeline result - # Read the generated JSON or re-run drift check - echo "==> Verifying drift status for pipeline result..." - set +e - ANSIBLE_FORCE_COLOR=false \ - ansible-playbook -i ansible/inventory/hosts.yml ansible/playbooks/drift-check.yml > /dev/null 2>&1 - DRIFT_RC=$? - set -e - - if [ "$DRIFT_RC" -eq 0 ]; then - echo "==> Pipeline SUCCESS: Server is SYNCED with Git" - exit 0 - else - echo "==> Pipeline FAILED: OUT OF SYNC - manual drift detected on server" - echo " Check gitops-status-server for detailed file-level drift information" - exit 1 - fi + echo "==> Cron drift check complete. JSON status updated successfully." + echo " Pipeline always succeeds. Check gitops-status-server for sync status." when: event: cron