fix: remove dead kubectl delete step from promote-to-uat workflow
The CTO correctly identified that the delete step was dead code: - gcloud/kubectl silently fail in the runner (no GKE credentials) - Architecturally wrong for GitOps (Flux handles reconciliation) - Unique Job names + ttlSecondsAfterFinished handle lifecycle Co-Authored-By: Paperclip <noreply@paperclip.ing>
This commit is contained in:
@@ -72,25 +72,6 @@ jobs:
|
||||
|
||||
git -C /tmp/infra diff --stat
|
||||
|
||||
- name: Delete existing seed Job in UAT (immutable Job fix)
|
||||
env:
|
||||
TAG: ${{ inputs.image_tag }}
|
||||
GH_TOKEN: ${{ steps.infra-token.outputs.token }}
|
||||
run: |
|
||||
cd /tmp/infra
|
||||
SHORT_SHA="${TAG##*-}"
|
||||
SEED_JOB_NAME="seed-test-data-${SHORT_SHA}"
|
||||
|
||||
echo "Deleting existing seed Job: ${SEED_JOB_NAME} in groombook-uat namespace"
|
||||
|
||||
gcloud container clusters get-credentials groombook-uat --zone us-central1 --project groombook-424212 2>/dev/null || \
|
||||
kubectl config view --minify --raw 2>/dev/null || true
|
||||
|
||||
kubectl delete job/${SEED_JOB_NAME} -n groombook-uat --ignore-not-found=true 2>/dev/null || \
|
||||
echo "Direct kubectl delete skipped (GitOps-only). Flux will reconcile after PR merge."
|
||||
|
||||
echo "Job deletion complete. Flux will reconcile the new manifest after PR merge."
|
||||
|
||||
- name: Create PR on groombook/infra
|
||||
env:
|
||||
TAG: ${{ inputs.image_tag }}
|
||||
|
||||
Reference in New Issue
Block a user