From 24021213b6be00be5fbc294c12a88a871c80d304 Mon Sep 17 00:00:00 2001 From: Ashwin Kumar Date: Fri, 10 Apr 2026 05:34:44 +0200 Subject: [PATCH] fix(woodpecker): remove deploy step - deployment handled externally - Remove kubectl deploy step from woodpecker pipeline - Keep only build-and-push step - Deployment handled by ArgoCD or other GitOps tool --- .woodpecker.yml | 55 ++----------------------------------------------- 1 file changed, 2 insertions(+), 53 deletions(-) diff --git a/.woodpecker.yml b/.woodpecker.yml index 0d3ac19..4528a5c 100644 --- a/.woodpecker.yml +++ b/.woodpecker.yml @@ -52,19 +52,16 @@ steps: echo "✅ Service ${SERVICE} has code changes" fi - # Create marker file and exit with appropriate code + # Exit with code 78 to skip subsequent steps if no changes if [ "$SHARED_CHANGED" = "true" ] || [ "$SERVICE_CHANGED" = "true" ]; then - echo "SHOULD_BUILD=true" >> ${CI_ENV} echo "🚀 Will build ${SERVICE}" exit 0 else - echo "SHOULD_BUILD=false" >> ${CI_ENV} echo "⏭️ Skipping ${SERVICE} - no changes detected" - # Exit with code 78 to skip subsequent steps for this service exit 78 fi - - name: build + - name: build-and-push image: woodpeckerci/plugin-docker-buildx:5.0.0 settings: registry: ghcr.io @@ -82,51 +79,3 @@ steps: password: from_secret: GHCR_TOKEN platforms: linux/amd64 - - - name: deploy - image: bitnami/kubectl:latest - environment: - KUBE_CONFIG: - from_secret: kube_config - commands: - - | - #!/bin/bash - set -e - - # Setup kubeconfig - mkdir -p ~/.kube - echo "$KUBE_CONFIG" | base64 -d > ~/.kube/config - chmod 600 ~/.kube/config - - # Convert service name to Kubernetes deployment name - DEPLOYMENT_NAME=$(echo "${SERVICE}" | tr '_' '-') - NAMESPACE="nxtgauge" - - echo "🚀 Deploying ${SERVICE} (deployment: nxtgauge-rust-${DEPLOYMENT_NAME})..." - - # Trigger rolling restart to pick up new image - kubectl rollout restart deployment/nxtgauge-rust-${DEPLOYMENT_NAME} -n ${NAMESPACE} - - # Wait for rollout to complete (with timeout) - echo "⏳ Waiting for rollout to complete..." - kubectl rollout status deployment/nxtgauge-rust-${DEPLOYMENT_NAME} -n ${NAMESPACE} --timeout=300s - - echo "✅ ${SERVICE} deployed successfully!" - - # Show deployment status - kubectl get deployment/nxtgauge-rust-${DEPLOYMENT_NAME} -n ${NAMESPACE} - - - name: notify-success - image: alpine:latest - commands: - - echo "✅ Pipeline completed successfully for ${SERVICE}" - when: - status: success - - - name: notify-failure - image: alpine:latest - commands: - - echo "❌ Pipeline failed for ${SERVICE}" - - echo "Check logs for details" - when: - status: failure