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/18 15:24:25 UTC
[couchdb] 05/05: Remove use of withEnv
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
commit 9ddcdb48e8bd899be2b5f72739505b50e202acce
Author: Adam Kocoloski <ko...@apache.org>
AuthorDate: Tue Jan 18 10:24:07 2022 -0500
Remove use of withEnv
---
build-aux/Jenkinsfile.full | 105 ++++++++++++++++++++++-----------------------
1 file changed, 51 insertions(+), 54 deletions(-)
diff --git a/build-aux/Jenkinsfile.full b/build-aux/Jenkinsfile.full
index 01714d0..c5fce04 100644
--- a/build-aux/Jenkinsfile.full
+++ b/build-aux/Jenkinsfile.full
@@ -181,65 +181,62 @@ def generateContainerStage(platform) {
docker.withRegistry('https://docker.io/', 'dockerhub_creds') {
docker.image(meta[platform].image).inside("${DOCKER_ARGS}") {
timeout(time: 90, unit: "MINUTES") {
- withEnv(['PLATFORM='+platform]) {
- stage("${meta[platform].name} - build & test") {
- try {
- sh( script: "rm -rf ${platform} apache-couchdb-*", label: 'Clean workspace' )
- unstash 'tarball'
- sh( script: "mkdir -p ${COUCHDB_IO_LOG_DIR} ${platform}/build", label: 'Create build directories' )
- sh "tar -xf apache-couchdb-*.tar.gz -C ${platform}/build --strip-components=1"
- dir( "${platform}/build" ) {
- sh "./configure --skip-deps --spidermonkey-version ${meta[platform].spidermonkey_vsn}"
- sh 'make'
- sh 'make eunit'
- sh 'make elixir-suite'
- sh 'make exunit'
- sh 'make mango-test'
- }
- }
- catch (err) {
- echo "Build failed: {$err}"
- currentBuild.result = 'FAILURE'
- sh 'ls -l ${WORKSPACE}'
- dir( "${platform}/build" ) {
- sh 'ls -l'
- sh 'make build-report'
- }
+ stage("${meta[platform].name} - build & test") {
+ try {
+ sh( script: "rm -rf ${platform} apache-couchdb-*", label: 'Clean workspace' )
+ unstash 'tarball'
+ sh( script: "mkdir -p ${COUCHDB_IO_LOG_DIR} ${platform}/build", label: 'Create build directories' )
+ sh( script: "tar -xf apache-couchdb-*.tar.gz -C ${platform}/build --strip-components=1", label: 'Unpack release' )
+ dir( "${platform}/build" ) {
+ sh "./configure --skip-deps --spidermonkey-version ${meta[platform].spidermonkey_vsn}"
+ sh 'make'
+ sh 'make eunit'
+ sh 'make elixir-suite'
+ sh 'make exunit'
+ sh 'make mango-test'
}
- finally {
- junit '**/.eunit/*.xml, **/_build/*/lib/couchdbtest/*.xml, **/src/mango/nosetests.xml, **/test/javascript/junit.xml'
- // Do we actually want to unconditionally destroy the contents of the workspace here?
- sh 'rm -rf ${WORKSPACE}/* ${COUCHDB_IO_LOG_DIR}'
+ }
+ catch (err) {
+ echo "Build failed: {$err}"
+ currentBuild.result = 'FAILURE'
+ sh 'ls -l ${WORKSPACE}'
+ dir( "${platform}/build" ) {
+ sh 'ls -l'
+ sh 'make build-report'
}
}
+ finally {
+ junit '**/.eunit/*.xml, **/_build/*/lib/couchdbtest/*.xml, **/src/mango/nosetests.xml, **/test/javascript/junit.xml'
+ // Do we actually want to unconditionally destroy the contents of the workspace here?
+ sh 'rm -rf ${WORKSPACE}/* ${COUCHDB_IO_LOG_DIR}'
+ }
+ }
- stage("${meta[platform].name} - package") {
- try {
- unstash 'tarball'
- sh( label: 'Build packages', script='''
- mkdir -p ${PLATFORM}/couchdb
- tar -xf apache-couchdb-*.tar.gz -C ${PLATFORM}/couchdb
- cd ${PLATFORM}
- git clone https://github.com/apache/couchdb-pkg
- cd couchdb-pkg
- make
- ''' )
- sh( label: 'Stage package artifacts for archival', script='''
- rm -rf pkgs/${PLATFORM}
- mkdir -p pkgs/${PLATFORM}
- mv ${PLATFORM}/rpmbuild/RPMS/$(arch)/*rpm pkgs/${PLATFORM} || true
- mv ${PLATFORM}/couchdb/*.deb pkgs/${PLATFORM} || true
- ''' )
- archiveArtifacts artifacts: 'pkgs/**', fingerprint: true, onlyIfSuccessful: true
- }
- catch (err) {
- echo "Packaging failed: {$err}"
- currentBuild.result = 'FAILURE'
- sh 'ls -l ${WORKSPACE}'
- }
- finally {
- sh 'rm -rf ${WORKSPACE}/*'
+ stage("${meta[platform].name} - package") {
+ try {
+ unstash 'tarball'
+ // sh( label: 'Build packages', script='''
+ sh( script: "mkdir -p ${platform}/couchdb", label: 'Create build directory' )
+ sh( script: "tar -xf apache-couchdb-*.tar.gz -C ${platform}/couchdb", label: 'Unpack release' )
+ sh( script: "cd ${platform} && git clone https://github.com/apache/couchdb-pkg", label: 'Clone packaging helper repo' )
+ dir( "${platform}/couchdb-pkg" ) {
+ sh( script: 'make', label: 'Build packages' )
}
+ sh( label: 'Stage package artifacts for archival', script="""
+ rm -rf pkgs/${platform}
+ mkdir -p pkgs/${platform}
+ mv ${platform}/rpmbuild/RPMS/$(arch)/*rpm pkgs/${platform} || true
+ mv ${platform}/couchdb/*.deb pkgs/${platform} || true
+ """ )
+ archiveArtifacts artifacts: 'pkgs/**', fingerprint: true, onlyIfSuccessful: true
+ }
+ catch (err) {
+ echo "Packaging failed: {$err}"
+ currentBuild.result = 'FAILURE'
+ sh 'ls -l ${WORKSPACE}'
+ }
+ finally {
+ sh 'rm -rf ${WORKSPACE}/*'
}
}
}