gnodet opened a new pull request, #22524:
URL: https://github.com/apache/camel/pull/22524

   ## Summary
   
   Replace the multi-step CI pipeline with a single Maven invocation using 
[Maveniverse Scalpel](https://github.com/maveniverse/scalpel) 0.2.0's 
`skip-tests` mode. Scalpel builds all modules but only runs tests on affected 
ones, eliminating ~500 lines of grep-based module detection and threshold logic.
   
   **Before** (3+ Maven invocations):
   1. `regen.sh`: `mvn install -Pregen -DskipTests` (build all, no tests)
   2. `incremental-build.sh`: diff parsing + grep-based POM analysis + `mvn 
install -pl <modules>` (detect & test)
   
   **After** (single invocation):
   1. `regen.sh`: `mvn install -Pregen -Dscalpel.mode=skip-tests ...` (build 
all, test only affected)
   2. `incremental-build.sh`: read `target/scalpel-report.json` → generate PR 
comment
   
   ### Changes
   
   - **`.mvn/extensions.xml`**: Update Scalpel `extension3:0.1.0` → 
`extension:0.2.0`
   - **`etc/scripts/regen.sh`**: Add Scalpel skip-tests flags in CI (no-op on 
dev machines), accept `--skip-tests` and `--coverage` args
   - **`incremental-build.sh`**: Rewrite from 750-line module detector + test 
runner to ~200-line post-build comment generator reading Scalpel's JSON report
   - **`action.yaml`**: Simplify to just run the comment generator script
   - **`pr-build-main.yml`**: Move skip-tests label check to workflow step, 
single `regen.sh` call for build+test
   - **`sonar-build.yml`**: Replace hardcoded `-pl` core module list with 
`regen.sh --coverage` (Scalpel detects affected modules dynamically)
   - **`CI-ARCHITECTURE.md`**: Rewrite for new single-invocation architecture
   
   ### Key Scalpel flags
   
   | Flag | Purpose |
   |---|---|
   | `scalpel.mode=skip-tests` | Build all, test only affected |
   | `scalpel.skipTestsForUpstream=true` | Don't test upstream-only modules |
   | `scalpel.fetchBaseBranch=true` | Auto-fetch base branch in CI shallow 
clones |
   | `scalpel.fullBuildTriggers=` | Override `.mvn/**` default |
   | `scalpel.reportFile` | JSON report for PR comment |
   | `scalpel.impactedLog` | Simple module list for debugging |
   
   ### Safety
   
   - **Developer machines**: Scalpel auto-disables without `GITHUB_BASE_REF` — 
zero impact on local builds
   - **Fail-safe**: `failSafe=true` (default) falls back to full build on any 
Scalpel error
   - **`/component-test` unchanged**: Still uses direct `-pl` without Scalpel
   
   ### Follow-up tasks (separate PRs)
   
   - Investigate eliminating the separate `catalog/camel-catalog` build pass
   - Remove `test-dependents` label (Scalpel's `alsoMakeDependents=true` 
handles this natively)
   
   ## Test plan
   
   - [ ] Verify Scalpel 0.2.0 is available on Maven Central
   - [ ] PR build passes — Scalpel detects affected modules and runs only their 
tests
   - [ ] PR comment shows correctly formatted module list from Scalpel report
   - [ ] `/component-test` still works independently
   - [ ] `skip-tests` label causes `--skip-tests` to skip all tests
   - [ ] Monitor a Dependabot version-bump PR to verify managed dependency 
detection


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to