You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@zookeeper.apache.org by eo...@apache.org on 2020/08/14 14:49:00 UTC
[zookeeper] branch branch-3.5 updated: ZOOKEEPER-3896: Added
cleanup bits to all ZK builds
This is an automated email from the ASF dual-hosted git repository.
eolivelli pushed a commit to branch branch-3.5
in repository https://gitbox.apache.org/repos/asf/zookeeper.git
The following commit(s) were added to refs/heads/branch-3.5 by this push:
new b59ccd3 ZOOKEEPER-3896: Added cleanup bits to all ZK builds
b59ccd3 is described below
commit b59ccd38de85748e4d686ae3d3fa7b4cb5ea9adc
Author: Andor Molnar <an...@apache.org>
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 <an...@apache.org>
Reviewers: Enrico Olivelli <eo...@apache.org>
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 {