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

apupier pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel.git


The following commit(s) were added to refs/heads/main by this push:
     new 9be81816aab INFRA-26918 - Clean often corrupted folder on Jenkins
9be81816aab is described below

commit 9be81816aabd924a1ee17b1c7d549ea5fdfecbf1
Author: AurĂ©lien Pupier <[email protected]>
AuthorDate: Thu Jun 19 09:03:47 2025 +0200

    INFRA-26918 - Clean often corrupted folder on Jenkins
    
    The Jenkins slave is often corrupted failing the build with this error
    message:
    ```
    Caused by: org.eclipse.aether.RepositoryException: Could not parse
    metadata 
/home/jenkins/.m2/repository/org/apache/camel/camel-buildtools/maven-metadata-local.xml:
    in epilog non whitespace content is not allowed but got a (position:
    END_TAG seen ...</metadata>\na... @34:2)
    ```
    
    So when cleaning the workspace, deleting the parent folder. Not deleting
    the whole .m2 as this would slow down too much the build. Deleting the
    whole folder to avoid having data not in phase inside the folder.
    
    Signed-off-by: AurĂ©lien Pupier <[email protected]>
---
 Jenkinsfile | 1 +
 1 file changed, 1 insertion(+)

diff --git a/Jenkinsfile b/Jenkinsfile
index f7a8cf8fc7b..743054c94ee 100644
--- a/Jenkinsfile
+++ b/Jenkinsfile
@@ -97,6 +97,7 @@ pipeline {
                     stage('Clean workspace') {
                         steps {
                             cleanWs()
+                            sh 'rm -rv 
/home/jenkins/.m2/repository/org/apache/camel/camel-buildtools'
                             checkout scm
                         }
                     }

Reply via email to