-
Task
-
Resolution: Unresolved
-
Undefined
-
None
-
None
-
None
-
Quality / Stability / Reliability
-
0.42
-
False
-
-
False
-
None
-
-
None
Issue
infraUtils.stageWrapper uses a long if/else chain on env.STAGE_NAME to decide behavior. This is hard to extend and not data-driven.
Steps to reproduce
1. Review stageWrapper() in vars/infraUtils.groovy.
2. Observe repeated stage name comparisons and body() calls.
Expected result
Stage handling is data-driven using a set/map of special stage names or a strategy map.
Actual result
Hard-coded if/else chain controls stage behavior.
Plan
- Introduce a Set of stage names that skip labels or require special handling.
- Replace if/else chain with membership checks and a default path.
- Document the list and provide a single place to add new stage rules.