summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdam Kocoloski <kocolosk@apache.org>2022-01-15 18:12:17 -0500
committerAdam Kocoloski <kocolosk@apache.org>2022-01-15 18:17:07 -0500
commit03b9a49e163e30ad658dc010fda942e20ef397f1 (patch)
tree6e44baa64155796584d9ae4a3d6ad717d120bc12
parent2a9758dff5a44f8b0a6e5021489ab4de7c1325d7 (diff)
downloadcouchdb-03b9a49e163e30ad658dc010fda942e20ef397f1.tar.gz
Can a matrix exist alongside another stage?
-rw-r--r--build-aux/Jenkinsfile.full376
1 files changed, 113 insertions, 263 deletions
diff --git a/build-aux/Jenkinsfile.full b/build-aux/Jenkinsfile.full
index 323beaabd..51c567927 100644
--- a/build-aux/Jenkinsfile.full
+++ b/build-aux/Jenkinsfile.full
@@ -137,116 +137,126 @@ pipeline {
timeout(time: 90, unit: "MINUTES")
}
- matrix {
- axes {
- axis {
- name 'platform'
- values 'macos', 'centos7', 'centos8', 'bionic', 'focal', 'stretch', 'buster', 'bullseye'
- }
- axis {
- name 'sm_ver'
- values '1.8.5', '60', '68', '78'
- }
- }
- excludes {
- exclude {
- axis {
- name 'platform'
- values 'centos7', 'bionic', 'stretch'
- }
- axis {
- name 'sm_ver'
- notValues '1.8.5'
- }
- }
- exclude {
- axis {
- name 'platform'
- values 'centos8', 'buster', 'macos'
- }
- axis {
- name 'sm_ver'
- notValues '60'
- }
+ stages {
+ stage('FreeBSD') {
+ agent {
+ label 'freebsd'
}
- exclude {
- axis {
- name 'platform'
- values 'focal'
+ steps {
+ // deleteDir is OK here because we're not inside of a Docker container!
+ deleteDir()
+ unstash 'tarball'
+ withEnv(['HOME='+pwd()]) {
+ sh '''
+ mkdir -p $COUCHDB_IO_LOG_DIR
+ # Build CouchDB from tarball & test
+ mkdir build
+ cd build
+ tar -xf $WORKSPACE/apache-couchdb-*.tar.gz
+ cd apache-couchdb-*
+ ./configure
+ gmake check || (build-aux/logfile-uploader.py && false)
+ # No package build for FreeBSD at this time
+ '''
+ } // withEnv
+ } // steps
+ post {
+ always {
+ junit '**/.eunit/*.xml, **/_build/*/lib/couchdbtest/*.xml, **/src/mango/nosetests.xml, **/test/javascript/junit.xml'
}
- axis {
- name 'sm_ver'
- notValues '68'
+ cleanup {
+ sh 'killall -9 beam.smp || true'
+ sh 'rm -rf ${WORKSPACE}/* ${COUCHDB_IO_LOG_DIR} || true'
}
+ } // post
+ } // stage FreeBSD
+
+ stage('macOS') {
+ agent {
+ label 'macos'
}
- exclude {
- axis {
- name 'platform'
- values 'bullseye'
+ steps {
+ // deleteDir is OK here because we're not inside of a Docker container!
+ deleteDir()
+ unstash 'tarball'
+ withEnv(['HOME='+pwd()]) {
+ sh '''
+ PATH=/usr/local/bin:$PATH
+ export PATH
+ mkdir -p $COUCHDB_IO_LOG_DIR
+ # Build CouchDB from tarball & test
+ mkdir build
+ cd build
+ tar -xzf $WORKSPACE/apache-couchdb-*.tar.gz
+ cd apache-couchdb-*
+ ./configure --spidermonkey-version 60
+ make check || (build-aux/logfile-uploader.py && false)
+ # No package build for macOS at this time
+ '''
+ } // withEnv
+ } // steps
+ post {
+ always {
+ junit '**/.eunit/*.xml, **/_build/*/lib/couchdbtest/*.xml, **/src/mango/nosetests.xml, **/test/javascript/junit.xml'
}
- axis {
- name 'sm_ver'
- notValues '78'
+ cleanup {
+ sh 'killall -9 beam.smp || true'
+ sh 'rm -rf ${WORKSPACE}/* ${COUCHDB_IO_LOG_DIR} || true'
}
- }
- }
-
- stages {
- stage('Non-containerized Platform') {
- when {
- beforeAgent true
- anyOf {
- environment name: 'platform', value: 'macos'
- environment name: 'platform', value: 'freebsd'
+ } // post
+ } // stage macOS
+
+ stage('Linux') {
+ matrix {
+ axes {
+ axis {
+ name 'platform'
+ values 'centos7', 'centos8', 'bionic', 'focal', 'stretch', 'buster', 'bullseye'
+ }
+ axis {
+ name 'sm_ver'
+ values '1.8.5', '60', '68', '78'
}
}
-
- agent {
- label env.platform
- }
-
- steps {
- // deleteDir is OK here because we're not inside of a Docker container!
- deleteDir()
- unstash 'tarball'
- withEnv(['HOME='+pwd()]) {
- sh '''
- PATH=/usr/local/bin:$PATH
- export PATH
- mkdir -p $COUCHDB_IO_LOG_DIR
-
- # Build CouchDB from tarball & test
- mkdir build
- cd build
- tar -xzf $WORKSPACE/apache-couchdb-*.tar.gz
- cd apache-couchdb-*
- ./configure --spidermonkey-version ${sm_ver}
- make check || (build-aux/logfile-uploader.py && false)
-
- # No package build for non-containerized platforms at this time
- '''
- } // withEnv
- } // steps
-
- post {
- always {
- junit '**/.eunit/*.xml, **/_build/*/lib/couchdbtest/*.xml, **/src/mango/nosetests.xml, **/test/javascript/junit.xml'
+ excludes {
+ exclude {
+ axis {
+ name 'platform'
+ values 'centos7', 'bionic', 'stretch'
+ }
+ axis {
+ name 'sm_ver'
+ notValues '1.8.5'
+ }
}
- cleanup {
- sh 'killall -9 beam.smp || true'
- sh 'rm -rf ${WORKSPACE}/* ${COUCHDB_IO_LOG_DIR} || true'
+ exclude {
+ axis {
+ name 'platform'
+ values 'centos8', 'buster'
+ }
+ axis {
+ name 'sm_ver'
+ notValues '60'
+ }
}
- } // post
-
- } // non-containerized platform
-
- stage('Containerized Platform') {
- when {
- beforeAgent true
- not {
- anyOf {
- environment name: 'platform', value: 'macos'
- environment name: 'platform', value: 'freebsd'
+ exclude {
+ axis {
+ name 'platform'
+ values 'focal'
+ }
+ axis {
+ name 'sm_ver'
+ notValues '68'
+ }
+ }
+ exclude {
+ axis {
+ name 'platform'
+ values 'bullseye'
+ }
+ axis {
+ name 'sm_ver'
+ notValues '78'
}
}
}
@@ -301,170 +311,10 @@ pipeline {
sh 'rm -rf ${WORKSPACE}/*'
}
} // post
- } // containerized platform
- } // stages
-
- } // matrix
-
- } // stage 'Test and Package'
-
-
-
- // 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
- */
-
-/*
- stage('Debian Buster arm64v8') {
- // the process is convoluted to ensure we have the latest qemu static binaries on the node first
- // before trying to run a foreign docker container type. Alternately ensuring the `update_qemu`
- // container is run on every Jenkins agent *after every restart of the Docker daemon* would work.
- agent {
- any {
- }
- }
- options {
- timeout(time: 120, unit: "MINUTES")
}
- environment {
- platform = 'aarch64-debian-stretch'
- sm_ver = '60'
- }
- stages {
- stage('Install latest qemu binaries') {
- steps {
- sh( script: update_qemu )
- }
- }
- stage('Pull latest docker image') {
- steps {
- sh "docker pull apache/couchdbci-debian:arm64v8-buster-erlang-${ERLANG_VERSION}"
- }
- }
- stage('Build from tarball & test & packages') {
- steps {
- withDockerContainer(image: "apache/couchdbci-debian:arm64v8-buster-erlang-${ERLANG_VERSION}", args: "${DOCKER_ARGS}") {
- unstash 'tarball'
- withEnv(['MIX_HOME='+pwd(), 'HEX_HOME='+pwd()]) {
- sh( script: build_and_test )
- sh( script: make_packages )
- sh( script: cleanup_and_save )
- }
- }
- }
- post {
- always {
-*/
-// junit '**/.eunit/*.xml, **/_build/*/lib/couchdbtest/*.xml, **/src/mango/nosetests.xml, **/test/javascript/junit.xml'
-/*
- }
- success {
- archiveArtifacts artifacts: 'pkgs/**', fingerprint: true
- }
- }
- }
- } // stages
- post {
- cleanup {
- sh 'rm -rf ${WORKSPACE}/*'
- }
- } // post
- } // stage
-*/
+ }
+ }
+ } // stage 'Test and Package'
stage('Publish') {