Skip to content

Commit 7d4ee25

Browse files
committed
ci: drop slack webhook step and skip last-attempt sleep
Existing org-level Slack notifications already fire on job failure for this repo, so a dedicated SLACK_RELEASE_WEBHOOK_URL step was redundant. Removing it eliminates the unprovisioned secret and the silent no-op fallback. The job still fails non-zero on exhausted retries (no continue-on-error), which is what the existing notifier hooks into. Also guard the retry-loop sleep with `attempt -lt 3` so the loop no longer sleeps 90s after the final failed attempt before exit 1. Ticket: VL-6353 Session-Id: 171773d2-746b-4f79-8b23-5ad8c11f2e5e Task-Id: d6793c61-de39-41c3-80f1-5352025fb58c
1 parent 5e15341 commit 7d4ee25

1 file changed

Lines changed: 8 additions & 25 deletions

File tree

.github/workflows/npmjs-release.yml

Lines changed: 8 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -307,7 +307,8 @@ jobs:
307307
308308
# NPM publish has already happened by this point, so a failure here
309309
# requires manual remediation (see VL-5474). Retry transient failures,
310-
# then surface as a job failure — no continue-on-error.
310+
# then surface as a job failure — no continue-on-error. Existing
311+
# org-level Slack notifications fire on the resulting job failure.
311312
- name: Create GitHub release
312313
if: inputs.dry-run == false && steps.version-bump-summary.outcome == 'success'
313314
id: create-github-release
@@ -322,33 +323,15 @@ jobs:
322323
echo "GitHub release created on attempt $attempt"
323324
exit 0
324325
fi
325-
delay=$((attempt * 30))
326-
echo "Attempt $attempt failed. Retrying in ${delay}s..."
327-
sleep "$delay"
326+
if [ "$attempt" -lt 3 ]; then
327+
delay=$((attempt * 30))
328+
echo "Attempt $attempt failed. Retrying in ${delay}s..."
329+
sleep "$delay"
330+
fi
328331
done
329-
echo "::error::All retry attempts exhausted creating GitHub release v${{ steps.extract-version.outputs.new-version }}."
332+
echo "::error::All retry attempts exhausted creating GitHub release v${{ steps.extract-version.outputs.new-version }}. NPM publish succeeded; manual GitHub release required."
330333
exit 1
331334
332-
- name: Notify on GitHub release failure
333-
if: ${{ always() && steps.create-github-release.outcome == 'failure' }}
334-
env:
335-
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_RELEASE_WEBHOOK_URL }}
336-
VERSION: ${{ steps.extract-version.outputs.new-version }}
337-
RUN_URL: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
338-
run: |
339-
echo "::error::GitHub release creation failed after 3 attempts for v${VERSION}. NPM publish succeeded; create the GitHub release manually. Run: ${RUN_URL}"
340-
if [ -z "$SLACK_WEBHOOK_URL" ]; then
341-
echo "::warning::SLACK_RELEASE_WEBHOOK_URL is not configured; skipping Slack notification."
342-
exit 0
343-
fi
344-
payload=$(jq -nc \
345-
--arg text ":rotating_light: BitGoJS GitHub release creation failed for v${VERSION} after 3 retries. NPM publish already succeeded — manual GitHub release required. Run: ${RUN_URL}" \
346-
'{text: $text}')
347-
curl -sS -X POST -H 'Content-Type: application/json' \
348-
--data "$payload" \
349-
--retry 3 --retry-delay 5 --max-time 30 \
350-
"$SLACK_WEBHOOK_URL" || echo "::warning::Slack notification POST failed."
351-
352335
get-express-release-context:
353336
name: Get Express release context
354337
if: ${{ always() && inputs.dry-run == false && needs.release-bitgojs.result == 'success' }}

0 commit comments

Comments
 (0)