This is an automated email from the ASF dual-hosted git repository.

jamesbognar pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/juneau.git

commit f09b1674bf3d48c0f7ff4681435a2e8a8d0f65fb
Author: James Bognar <[email protected]>
AuthorDate: Thu Aug 6 11:15:34 2026 -0700

    ci: clean workspace before checkout to stop stale surefire reports marking 
builds UNSTABLE
    
    The Jenkins checkout ran with extensions: [] on a long-lived reused agent 
workspace, so
    target/surefire-reports/*.xml orphaned by module renames (git mv, e.g. the 
juneau-*-mcp-*
    family) lingered on disk -- 'mvn clean' never revisits a path no longer in 
the reactor -- and
    the unscoped junit '**/target/surefire-reports/*.xml' step re-discovered 
them on every build,
    marking otherwise-green builds (BUILD SUCCESS, 0 failures/errors) UNSTABLE 
(e.g. #2564).
    Adding CleanBeforeCheckout ('git clean -fdx') purges that byproduct before 
checkout and
    self-heals on the next build.
    
    Co-authored-by: Cursor <[email protected]>
---
 Jenkinsfile | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/Jenkinsfile b/Jenkinsfile
index 840c67ca51..9278bc3f1f 100644
--- a/Jenkinsfile
+++ b/Jenkinsfile
@@ -16,7 +16,12 @@ timestamps {
        node ('ubuntu') { 
        
                stage ('Juneau-Java-17 - Checkout') {
-                       checkout([$class: 'GitSCM', branches: [[name: 
'*/master']], doGenerateSubmoduleConfigurations: false, extensions: [], 
submoduleCfg: [], userRemoteConfigs: [[credentialsId: '', url: 
'https://github.com/apache/juneau']]]) 
+                       // CleanBeforeCheckout runs 'git clean -fdx' prior to 
checkout so untracked build byproduct left on this
+                       // long-lived reused agent workspace is purged.  
Without it, module directories that were renamed via
+                       // 'git mv' (e.g. the juneau-*-mcp-* family) leave 
orphaned target/surefire-reports/*.xml behind that
+                       // 'mvn clean' never revisits, which the unscoped junit 
'**/target/surefire-reports/*.xml' step below
+                       // then re-discovers on every build -- marking an 
otherwise-green build UNSTABLE indefinitely.
+                       checkout([$class: 'GitSCM', branches: [[name: 
'*/master']], doGenerateSubmoduleConfigurations: false, extensions: [[$class: 
'CleanBeforeCheckout']], submoduleCfg: [], userRemoteConfigs: [[credentialsId: 
'', url: 'https://github.com/apache/juneau']]]) 
                }
                
                stage ('Juneau-Java-17 - Build') {

Reply via email to