ADITYA-KUMAR-2358 opened a new pull request, #1987:
URL: https://github.com/apache/camel-spring-boot/pull/1987

   ## Summary
   Adds a new `Clean workspace` stage to the pipeline that runs before
   `Build & Deploy`, along with a `CLEAN` boolean parameter (default:
   `true`) to control it.
   
   ## Motivation
   Builds could previously pick up stale files from a previous run's
   workspace (e.g. leftover build artifacts, cached files), which risks
   non-reproducible or inconsistent build results. This adds an explicit,
   opt-out cleanup step to guard against that.
   
   ## Changes
   - Added `CLEAN` boolean parameter (defaults to `true`).
   - Added `Clean workspace` stage, gated on `params.CLEAN`, using
     `cleanWs()` from the Workspace Cleanup plugin.
   - Wrapped `cleanWs()` in a try/catch so a cleanup failure logs a
     warning instead of failing the whole pipeline.
   
   ## Testing
   - [ ] Ran pipeline with `CLEAN=true`  confirms workspace is wiped
         before build.
   - [ ] Ran pipeline with `CLEAN=false` confirms cleanup stage is
         skipped and build proceeds as before.
   - [ ] Verified `Build & Deploy` stage behavior is unchanged.
   
   ## Notes
   - `cleanWs()` requires the [Workspace Cleanup
     plugin](https://plugins.jenkins.io/ws-cleanup/) to be installed on
     the Jenkins controller/agents — please confirm it's available in
     the target environment before merging.


-- 
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