Repository navigation
PREQ-8698 Add skip build option to maven build - #348
Conversation
check, tests, docs - Enforce that skip-build:true requires deploy:false, failing loudly at script start instead of silently never deploying if a caller leaves deploy at its true default. - Extract the build/deploy block into build_and_deploy() to isolate the skip-build branching from unrelated reindentation noise. - Add check_build_output_restored(): fails loudly if no target/classes directory is present when skip-build is enabled and scanning, instead of letting the Sonar scanner silently produce a degraded analysis against missing/incomplete restored output. - Document skip-build in README.md's build-maven inputs table. - Add shellspec coverage for the new validation guard, check_build_output_restored(), and the skip-build path through build_maven(). Full suite verified locally: 40 examples, 0 failures.
7bb26d7 to
b2725ea
Compare
tomverin
left a comment
There was a problem hiding this comment.
Looks good — the right shape for a scanner-only Maven consumer. The deploy: false guard, restore check, and existing Sonar orchestration are all in the right places.
Left a few non-blocking nits: harden check_build_output_restored (/usr/bin/find, drop maxdepth 4), fail or warn when skip-build would do nothing, assert the restore check is actually called from build_maven, and add a short producer/consumer example in the README.
Please rebase onto master before merge — the PR is currently behind.
|
@tomverin thanks a lot! I drafted this cause we paused the sprint we are working on. I'll test it more and merge it later (later = during next week). |
9f69020 to
229f1c3
Compare
229f1c3 to
02c4736
Compare
|
Testing follow-up against the current PR commit |
02c4736 to
ab2f6c3
Compare
- Add || exit fallbacks to the new pushd/popd calls in build-maven_spec.sh (shellcheck SC2164). - Shorten and re-pad the skip-build row in README.md's inputs table so its column widths match the rest of the table (markdownlint MD060 table-column-style).
ab2f6c3 to
5df1df1
Compare
|
Code Review ✅ Approved 4 closed / 4 findings🟡 Medium risk · Adds a Maven scanner-only mode that skips compilation, tests, and deployment. Adds ✅ 4 closed✅ Edge Case: skip-build silently no-ops deploy and unanalyzed branches
✅ Quality: New skip-build input missing from README inputs table
✅ Quality: No spec coverage for the SKIP_BUILD branch
✅ Edge Case: skip-build scan job now hard-fails on merge_group and dogfood runs
Verification Repos 6 inspectedFunctional validation No results Rules No rules evaluated Cross-repo 6 repositories inspected 0 open impacts
1 more repository Auto-approval Not enabledOptionsAuto-apply is off → Gitar will not commit updates to this branch. Comment with these commands to change the behavior for this request:
Was this helpful? React with 👍 / 👎 | Gitar |



Part of CLP-466
Summary by Gitar
skip-buildinput option to run Sonar analysis using existingtarget/output without compiling, testing or deployingskip-buildrequiresdeploy: falseand validates restoredtarget/classesoutputThis will update automatically on new commits.