This is an automated email from the ASF dual-hosted git repository.
rcordier pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/james-project.git
The following commit(s) were added to refs/heads/master by this push:
new 85f4f6d766 Rework pre cleanup workspace in Jenkinsfile
85f4f6d766 is described below
commit 85f4f6d766e9ad00b279e67cf6f01be46e9b8989
Author: Rene Cordier <[email protected]>
AuthorDate: Wed Jul 27 16:09:40 2022 +0700
Rework pre cleanup workspace in Jenkinsfile
---
Jenkinsfile | 9 +++------
1 file changed, 3 insertions(+), 6 deletions(-)
diff --git a/Jenkinsfile b/Jenkinsfile
index 508e174fd6..ab68ee5a7f 100644
--- a/Jenkinsfile
+++ b/Jenkinsfile
@@ -55,6 +55,8 @@ pipeline {
logRotator(artifactNumToKeepStr: '10', numToKeepStr: '30')
)
disableConcurrentBuilds()
+ // This is better if you want to clean before build
+ skipDefaultCheckout(true)
}
triggers {
@@ -72,9 +74,7 @@ pipeline {
stage('Cleanup') {
steps {
echo 'Cleaning up the workspace'
- deleteDir()
- echo 'Cleaning up James maven repo dependencies'
- sh 'rm -rf /home/jenkins/.m2/repository/org/apache/james'
+ cleanWs()
}
}
@@ -183,9 +183,6 @@ Check console output at "<a
href="${env.BUILD_URL}">${env.JOB_NAME} [${env.BRANC
// Send an email, if the last build was not successful and this one is.
success {
- // Cleanup the build directory if the build was successful
- // (in this cae we probably don't have to do any post-build
analysis)
- deleteDir()
script {
if (env.BRANCH_NAME == "master" && (currentBuild.previousBuild
!= null) && (currentBuild.previousBuild.result != 'SUCCESS')) {
emailext(
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]