You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@couchdb.apache.org by ko...@apache.org on 2022/01/17 23:29:37 UTC
[couchdb] branch jenkins-dynamic-matrix updated: Improve workspace cleanup practices
This is an automated email from the ASF dual-hosted git repository.
kocolosk pushed a commit to branch jenkins-dynamic-matrix
in repository https://gitbox.apache.org/repos/asf/couchdb.git
The following commit(s) were added to refs/heads/jenkins-dynamic-matrix by this push:
new bd1c0e0 Improve workspace cleanup practices
bd1c0e0 is described below
commit bd1c0e0fc2272d6969906e0b7c52058fb4b6d7d6
Author: Adam Kocoloski <ko...@apache.org>
AuthorDate: Mon Jan 17 18:29:18 2022 -0500
Improve workspace cleanup practices
---
build-aux/Jenkinsfile.full | 141 ++++++++++++---------------------------------
1 file changed, 36 insertions(+), 105 deletions(-)
diff --git a/build-aux/Jenkinsfile.full b/build-aux/Jenkinsfile.full
index 644ce46..1c0dc90 100644
--- a/build-aux/Jenkinsfile.full
+++ b/build-aux/Jenkinsfile.full
@@ -86,6 +86,22 @@ meta = [
image: "apache/couchdbci-debian:buster-erlang-${ERLANG_VERSION}"
],
+ // - Removed 2020.09.15 - VMs are offline
+
+ // 'buster-arm64': [
+ // name: 'Debian 10 ARM'
+ // spidermonkey_vsn: '60',
+ // image: "apache/couchdbci-debian:arm64v8-buster-erlang-${ERLANG_VERSION}",
+ // node_label: 'arm64v8'
+ // ],
+
+ // 'buster-ppc64': [
+ // name: 'Debian 10 POWER'
+ // spidermonkey_vsn: '60',
+ // image: "apache/couchdbci-debian:pp64le-buster-erlang-${ERLANG_VERSION}",
+ // node_label: 'ppc64le'
+ // ],
+
'bullseye': [
name: 'Debian 11',
spidermonkey_vsn: '78',
@@ -148,7 +164,8 @@ def generateNativeStage(platform) {
finally {
junit '**/.eunit/*.xml, **/_build/*/lib/couchdbtest/*.xml, **/src/mango/nosetests.xml, **/test/javascript/junit.xml'
sh 'killall -9 beam.smp || true'
- sh 'rm -rf ${WORKSPACE}/* ${COUCHDB_IO_LOG_DIR} || true'
+ deleteDir("${COUCHDB_IO_LOG_DIR}")
+ cleanWs()
}
}
}
@@ -159,6 +176,7 @@ def generateNativeStage(platform) {
def generateContainerStage(platform) {
return {
stage(platform) {
+ // TODO allow for other labels, e.g. arm64v8
node('docker') {
docker.withRegistry('https://docker.io/', 'dockerhub_creds') {
docker.image(meta[platform].image).inside("${DOCKER_ARGS}") {
@@ -170,8 +188,6 @@ def generateContainerStage(platform) {
unstash 'tarball'
sh( script: unpack, label: 'Unpack tarball' )
dir( "${platform}/build/couchdb" ) {
- sh 'pwd'
- sh 'ls -l'
sh "./configure --skip-deps --spidermonkey-version ${meta[platform].spidermonkey_vsn}"
sh 'make'
sh 'make eunit'
@@ -181,22 +197,33 @@ def generateContainerStage(platform) {
}
}
catch (exc) {
+ sh 'ls -l ${WORKSPACE}'
dir( "${platform}/build/couchdb" ) {
+ sh 'pwd; ls -l'
sh 'make build-report'
}
}
finally {
junit '**/.eunit/*.xml, **/_build/*/lib/couchdbtest/*.xml, **/src/mango/nosetests.xml, **/test/javascript/junit.xml'
+ deleteDir("${COUCHDB_IO_LOG_DIR}")
+ cleanWs()
}
}
stage("${meta[platform].name} - package") {
- sh 'pwd'
- sh 'ls -l'
- unstash 'tarball'
- sh( script: make_packages, label: 'Build packages' )
- sh( script: cleanup_and_save, label: 'Stage package artifacts for archival' )
- archiveArtifacts artifacts: 'pkgs/**', fingerprint: true, onlyIfSuccessful: true
+ try {
+ sh 'pwd; ls -l'
+ unstash 'tarball'
+ sh( script: make_packages, label: 'Build packages' )
+ sh( script: cleanup_and_save, label: 'Stage package artifacts for archival' )
+ archiveArtifacts artifacts: 'pkgs/**', fingerprint: true, onlyIfSuccessful: true
+ }
+ catch (exc) {
+ sh 'ls -l ${WORKSPACE}'
+ }
+ finally {
+ cleamWs()
+ }
}
}
}
@@ -300,102 +327,6 @@ pipeline {
}
}
-
-
- // stage('Debian Buster arm64v8') {
- // when { expression { return false } }
- // agent {
- // docker {
- // image "apache/couchdbci-debian:arm64v8-buster-erlang-${ERLANG_VERSION}"
- // label 'arm64v8'
- // args "${DOCKER_ARGS}"
- // registryUrl 'https://docker.io/'
- // registryCredentialsId 'dockerhub_creds'
- // }
- // }
- // environment {
- // platform = 'buster'
- // sm_ver = '1.8.5'
- // }
- // stages {
- // stage('Build from tarball & test') {
- // steps {
- // unstash 'tarball'
- // sh( script: build_and_test )
- // }
- // post {
- // always {
- // junit '**/.eunit/*.xml, **/_build/*/lib/couchdbtest/*.xml, **/src/mango/nosetests.xml, **/test/javascript/junit.xml'
- // }
- // }
- // }
- // stage('Build CouchDB packages') {
- // steps {
- // sh( script: make_packages )
- // sh( script: cleanup_and_save )
- // }
- // post {
- // success {
- // archiveArtifacts artifacts: 'pkgs/**', fingerprint: true
- // }
- // }
- // }
- // } // stages
- // post {
- // cleanup {
- // sh 'rm -rf ${WORKSPACE}/*'
- // }
- // } // post
- // } // stage
-/*
- - Removed 2020.09.15 - VMs are offline
-*/
-
-// stage('Debian Buster ppc64le') {
-// agent {
-// docker {
-// image "apache/couchdbci-debian:ppc64le-buster-erlang-${ERLANG_VERSION}"
-// label 'ppc64le'
-// args "${DOCKER_ARGS}"
-// registryUrl 'https://docker.io/'
-// registryCredentialsId 'dockerhub_creds'
-// }
-// }
-// environment {
-// platform = 'buster'
-// sm_ver = '60'
-// }
-// stages {
-// stage('Build from tarball & test') {
-// steps {
-// unstash 'tarball'
-// sh( script: build_and_test )
-// }
-// post {
-// always {
-// junit '**/.eunit/*.xml, **/_build/*/lib/couchdbtest/*.xml, **/src/mango/nosetests.xml, **/test/javascript/junit.xml'
-// }
-// }
-// }
-// stage('Build CouchDB packages') {
-// steps {
-// sh( script: make_packages )
-// sh( script: cleanup_and_save )
-// }
-// post {
-// success {
-// archiveArtifacts artifacts: 'pkgs/**', fingerprint: true
-// }
-// }
-// }
-// } // stages
-// post {
-// cleanup {
-// sh 'rm -rf ${WORKSPACE}/*'
-// }
-// } // post
-// } // stage
-
/*
* Example of how to do a qemu-based run, please leave here
*/