BUILD-8735 refactor: modularize build functions and remove dead code#35
Conversation
- Extract complex branch logic into get_build_config() helper functions in npm/yarn - Add handle_maintenance_branch_version() helper for npm maintenance branch logic - Remove unreachable dead code in sonar scanner calls - Improve documentation with missing environment variable descriptions - Add proper validation for GITHUB_SHA and GITHUB_OUTPUT where used - Update tests to work with new modular function signatures - Fix README formatting issue with artifactory-deployer-role description All build functions now follow the maven/gradle pattern of simple high-level calls rather than embedding complex logic, improving readability and customization.
🤖 Pull Request summaryUpdates build system documentation and environment variable handling. • Documentation improvements: Restructured environment variable comments in all build scripts with clearer categorization (required inputs, GitHub auto-provided, optional customization) Review focus: The refactoring of NPM/Yarn buil
|



BUILD-8735
Summary
This PR refactors the npm and yarn build scripts to follow the same modular pattern as maven and gradle builds, making them more readable, testable, and customizable.
Key Changes
get_build_config()helper functionsBenefits
get_build_config()with custom logic while keeping the same pipelineBefore/After Comparison
Before (complex embedded logic):
After (modular design):
Test Results
✅ All 136 tests pass with 0 failures across all build scripts
Backward Compatibility
🔒 100% backward compatible - no breaking changes: