[#2571] Added label-driven deployment gate to deploy router.#2575
[#2571] Added label-driven deployment gate to deploy router.#2575AlexSkrypnyk wants to merge 4 commits into
Conversation
WalkthroughThis PR implements a label-driven deployment gate for pull requests. When enabled via ChangesPR Label Deployment Gate
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
2 similar comments
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #2575 +/- ##
==========================================
- Coverage 86.56% 86.11% -0.46%
==========================================
Files 94 87 -7
Lines 4661 4502 -159
Branches 47 3 -44
==========================================
- Hits 4035 3877 -158
+ Misses 626 625 -1 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
fc33c9b to
537a524
Compare
|
Code coverage (threshold: 90%) Per-class coverage |
This comment has been minimized.
This comment has been minimized.
2 similar comments
This comment has been minimized.
This comment has been minimized.
|
Code coverage (threshold: 90%) Per-class coverage |
Closes #2571
Summary
Added an opt-in label gate to the deploy router: when
VORTEX_DEPLOY_ALLOW_LABELis set to a label name, a pull request is deployed only if it carries that label. Without the label, the deployment is skipped cleanly with an informational note. The gate is inactive by default (empty variable) so existing deployments are unaffected. Branch and tag builds are never gated - only PR builds.Changes
.vortex/tooling/src/deploy- Added two new variables (VORTEX_DEPLOY_ALLOW_LABEL,VORTEX_DEPLOY_PR_LABELS) and the gate logic: after the skip-list checks, ifVORTEX_DEPLOY_ALLOW_LABELis set and the build is for a PR, the script checks whether the label is present in the comma-separatedVORTEX_DEPLOY_PR_LABELSlist using an exact-match grep. Deployment is skipped if the label is absent; it proceeds with a confirmation note if present..github/workflows/build-test-deploy.yml- WiredVORTEX_DEPLOY_PR_LABELS(populated fromgithub.event.pull_request.labels.*.nameviajoin) andVORTEX_DEPLOY_ALLOW_LABEL(from repository variablevars.VORTEX_DEPLOY_ALLOW_LABEL) into the deploy job environment..vortex/installer/tests/Fixtures/- Updated both baseline anddeploy_types_none_ghafixtures to reflect the two new environment variables in the workflow..vortex/tooling/tests/unit/deploy.bats- Added 9 new BATS tests covering: gate inactive when variable is unset, PR carries the label (proceeds), PR lacks the label (skipped), non-PR builds unaffected, label among multiple labels, skip-list takes precedence over gate, empty label list, partial-match rejection, and labels containing spaces..vortex/docs/- Added a "Gating deployments on a PR label" section to the deployment README and registeredVORTEX_DEPLOY_ALLOW_LABELin the CI variables reference and the auto-generated variables table.Before / After