Merge pull request #233 from groombook/fix/gro-478-auto-link-staff-user
fix(ci): remove dead kubectl steps from promote workflows (GRO-482)
This commit was merged in pull request #233.
This commit is contained in:
@@ -52,7 +52,6 @@ jobs:
|
||||
if [ -f "$MIGRATE_JOB" ]; then
|
||||
yq -i '.metadata.name = "migrate-schema-" + env(SHORT_SHA)' "$MIGRATE_JOB"
|
||||
yq -i '.metadata.annotations."groombook.app/deploy-version" = env(TAG)' "$MIGRATE_JOB"
|
||||
yq -i '.spec.ttlSecondsAfterFinished = (.spec.ttlSecondsAfterFinished // 86400)' "$MIGRATE_JOB"
|
||||
fi
|
||||
|
||||
# Update seed Job name to include short SHA (immutable template fix)
|
||||
@@ -60,7 +59,6 @@ jobs:
|
||||
if [ -f "$SEED_JOB" ]; then
|
||||
yq -i '.metadata.name = "seed-test-data-" + env(SHORT_SHA)' "$SEED_JOB"
|
||||
yq -i '.metadata.annotations."groombook.app/deploy-version" = env(TAG)' "$SEED_JOB"
|
||||
yq -i '.spec.ttlSecondsAfterFinished = (.spec.ttlSecondsAfterFinished // 86400)' "$SEED_JOB"
|
||||
fi
|
||||
|
||||
git -C /tmp/infra diff --stat
|
||||
@@ -84,16 +82,6 @@ jobs:
|
||||
--title "release: promote ${TAG} to production" \
|
||||
--body "Promote image tag ${TAG} to production after UAT sign-off. cc @cpfarhood"
|
||||
|
||||
- name: Delete existing completed Jobs before Flux reconciles
|
||||
env:
|
||||
TAG: ${{ inputs.tag }}
|
||||
run: |
|
||||
SHORT_SHA="${TAG##*-}"
|
||||
echo "Deleting completed Jobs with name suffix: $SHORT_SHA"
|
||||
kubectl delete job "migrate-schema-${SHORT_SHA}" -n groombook --ignore-not-found
|
||||
kubectl delete job "seed-test-data-${SHORT_SHA}" -n groombook --ignore-not-found
|
||||
echo "Jobs deleted, Flux will reconcile with fresh objects"
|
||||
|
||||
- name: Notify on failure
|
||||
if: failure()
|
||||
uses: actions/github-script@v7
|
||||
|
||||
@@ -59,7 +59,6 @@ jobs:
|
||||
if [ -f "$MIGRATE_JOB" ]; then
|
||||
yq -i '.metadata.name = "migrate-schema-" + env(SHORT_SHA)' "$MIGRATE_JOB"
|
||||
yq -i '.metadata.annotations."groombook.app/deploy-version" = env(TAG)' "$MIGRATE_JOB"
|
||||
yq -i '.spec.ttlSecondsAfterFinished = (.spec.ttlSecondsAfterFinished // 86400)' "$MIGRATE_JOB"
|
||||
fi
|
||||
|
||||
# Update seed Job name to include short SHA (immutable template fix)
|
||||
@@ -67,7 +66,6 @@ jobs:
|
||||
if [ -f "$SEED_JOB" ]; then
|
||||
yq -i '.metadata.name = "seed-test-data-" + env(SHORT_SHA)' "$SEED_JOB"
|
||||
yq -i '.metadata.annotations."groombook.app/deploy-version" = env(TAG)' "$SEED_JOB"
|
||||
yq -i '.spec.ttlSecondsAfterFinished = (.spec.ttlSecondsAfterFinished // 86400)' "$SEED_JOB"
|
||||
fi
|
||||
|
||||
git -C /tmp/infra diff --stat
|
||||
@@ -95,16 +93,6 @@ jobs:
|
||||
--body "[GRO-429](/GRO/issues/GRO-429) — UAT promotion triggered by CTO")
|
||||
gh pr merge "$PR_URL" --merge
|
||||
|
||||
- name: Delete existing completed Jobs before Flux reconciles
|
||||
env:
|
||||
TAG: ${{ inputs.image_tag }}
|
||||
run: |
|
||||
SHORT_SHA="${TAG##*-}"
|
||||
echo "Deleting completed Jobs with name suffix: $SHORT_SHA"
|
||||
kubectl delete job "migrate-schema-${SHORT_SHA}" -n groombook-uat --ignore-not-found
|
||||
kubectl delete job "seed-test-data-${SHORT_SHA}" -n groombook-uat --ignore-not-found
|
||||
echo "Jobs deleted, Flux will reconcile with fresh objects"
|
||||
|
||||
- name: Notify on failure
|
||||
if: failure()
|
||||
uses: actions/github-script@v7
|
||||
|
||||
Reference in New Issue
Block a user