This is an automated email from the ASF dual-hosted git repository.
eolivelli pushed a commit to branch branch-3.6
in repository https://gitbox.apache.org/repos/asf/zookeeper.git
The following commit(s) were added to refs/heads/branch-3.6 by this push:
new b1e0380 ZOOKEEPER-3896: Added cleanup bits to all ZK builds
b1e0380 is described below
commit b1e0380eee0ecd7f763da318c7a1e2049495bd35
Author: Andor Molnar <[email protected]>
AuthorDate: Fri Aug 14 16:44:01 2020 +0200
ZOOKEEPER-3896: Added cleanup bits to all ZK builds
Recently I noticed some weird null pointer exception issues during compile
in out new builds. I usually resolve this by a full "git clean" locally, so I
added it to the Jenkinsfiles too.
Author: Andor Molnar <[email protected]>
Reviewers: Enrico Olivelli <[email protected]>
Closes #1431 from anmolnar/ZOOKEEPER-3896
---
Jenkinsfile | 11 +++++++++++
Jenkinsfile-PreCommit | 1 +
2 files changed, 12 insertions(+)
diff --git a/Jenkinsfile b/Jenkinsfile
index 436c18a..ab7baed 100644
--- a/Jenkinsfile
+++ b/Jenkinsfile
@@ -52,6 +52,7 @@ pipeline {
stage('BuildAndTest') {
steps {
git 'https://github.com/apache/zookeeper'
+ sh "git clean -fxd"
sh "mvn verify spotbugs:check checkstyle:check
-Pfull-build -Dsurefire-forkcount=4"
}
post {
@@ -59,6 +60,16 @@ pipeline {
junit '**/target/surefire-reports/TEST-*.xml'
archiveArtifacts '**/target/*.jar'
}
+ // Jenkins pipeline jobs fill slaves on PRs
without this :(
+ cleanup() {
+ script {
+ sh label: 'Cleanup workspace', script: '''
+ # See HADOOP-13951
+ chmod -R u+rxw "${WORKSPACE}"
+ '''
+ deleteDir()
+ }
+ }
}
}
}
diff --git a/Jenkinsfile-PreCommit b/Jenkinsfile-PreCommit
index d2a666b..90b3f99 100644
--- a/Jenkinsfile-PreCommit
+++ b/Jenkinsfile-PreCommit
@@ -37,6 +37,7 @@ pipeline {
stage('BuildAndTest') {
steps {
git 'https://github.com/apache/zookeeper'
+ sh "git clean -fxd"
sh "mvn verify spotbugs:check checkstyle:check -Pfull-build
-Dsurefire-forkcount=4"
}
post {