summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdam Kocoloski <kocolosk@apache.org>2022-01-15 12:08:21 -0500
committerAdam Kocoloski <kocolosk@apache.org>2022-01-15 12:08:21 -0500
commite97f0c7abb1ffb28d5b97bce7eea237f658f89a2 (patch)
tree039ad532c9df2f3af72c60608248f953a1fbbf7c
parentd9226e8803f655ed23bc94c2858cdc29a4a5b8cf (diff)
downloadcouchdb-e97f0c7abb1ffb28d5b97bce7eea237f658f89a2.tar.gz
Experiment with DRY matrix build
-rw-r--r--build-aux/Jenkinsfile.full405
1 files changed, 104 insertions, 301 deletions
diff --git a/build-aux/Jenkinsfile.full b/build-aux/Jenkinsfile.full
index a0e12d9b1..a1936446c 100644
--- a/build-aux/Jenkinsfile.full
+++ b/build-aux/Jenkinsfile.full
@@ -47,6 +47,26 @@ update_qemu = '''
docker run --rm --privileged multiarch/qemu-user-static --reset -p yes
'''
+platform_images = [
+ 'centos7': "apache/couchdbci-centos:7-erlang-${ERLANG_VERSION}",
+ 'centos8': "apache/couchdbci-centos:8-erlang-${ERLANG_VERSION}",
+ 'bionic': "apache/couchdbci-ubuntu:bionic-erlang-${ERLANG_VERSION}",
+ 'focal': "apache/couchdbci-ubuntu:focal-erlang-${ERLANG_VERSION}",
+ 'stretch': "apache/couchdbci-debian:stretch-erlang-${ERLANG_VERSION}",
+ 'buster': "apache/couchdbci-debian:buster-erlang-${ERLANG_VERSION}",
+ 'bullseye': "apache/couchdbci-debian:bullseye-erlang-${ERLANG_VERSION}"
+]
+
+spidermonkey_version = [
+ 'centos7': '1.8.5',
+ 'centos8': '60',
+ 'bionic': '1.8.5',
+ 'focal': '68',
+ 'stretch': '1.8.5',
+ 'buster': '60',
+ 'bullseye': '78'
+]
+
pipeline {
// no top-level agent; agents must be declared for each stage
@@ -202,324 +222,107 @@ pipeline {
} // post
} // stage macOS
- stage('CentOS 7') {
- agent {
- docker {
- image "apache/couchdbci-centos:7-erlang-${ERLANG_VERSION}"
- label 'docker'
- args "${DOCKER_ARGS}"
- registryUrl 'https://docker.io/'
- registryCredentialsId 'dockerhub_creds'
- }
- }
- environment {
- platform = 'centos7'
- 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('Linux') {
+ matrix {
+ axes {
+ axis {
+ name 'platform'
+ values 'centos7', 'centos8', 'bionic', 'focal', 'stretch', 'buster', 'bullseye'
}
}
- stage('Build CouchDB packages') {
- steps {
- unstash 'tarball'
- 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
- stage('CentOS 8') {
- agent {
- docker {
- image "apache/couchdbci-centos:8-erlang-${ERLANG_VERSION}"
- label 'docker'
- args "${DOCKER_ARGS}"
- registryUrl 'https://docker.io/'
- registryCredentialsId 'dockerhub_creds'
- }
- }
- environment {
- platform = 'centos8'
- 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'
+ stages {
+ agent {
+ docker {
+ image platform_images["${platform}"]
+ label 'docker'
+ args "${DOCKER_ARGS}"
+ registryUrl 'https://docker.io/'
+ registryCredentialsId 'dockerhub_creds'
}
}
- }
- stage('Build CouchDB packages') {
- steps {
- unstash 'tarball'
- sh( script: make_packages )
- sh( script: cleanup_and_save )
- }
- post {
- success {
- archiveArtifacts artifacts: 'pkgs/**', fingerprint: true
- }
+ environment {
+ sm_ver = spidermonkey_version["${platform}"]
}
- }
- } // stages
- post {
- cleanup {
- sh 'rm -rf ${WORKSPACE}/*'
- }
- } // post
- } // stage
-
- stage('Ubuntu Bionic') {
- agent {
- docker {
- image "apache/couchdbci-ubuntu:bionic-erlang-${ERLANG_VERSION}"
- label 'docker'
- args "${DOCKER_ARGS}"
- registryUrl 'https://docker.io/'
- registryCredentialsId 'dockerhub_creds'
- }
- }
- environment {
- platform = 'bionic'
- 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
+ stage('Build from tarball & test') {
+ steps {
+ unstash 'tarball'
+ sh( script: build_and_test )
}
- }
- }
- } // stages
- post {
- cleanup {
- sh 'rm -rf ${WORKSPACE}/*'
- }
- } // post
- } // stage
-
- stage('Ubuntu Focal') {
- agent {
- docker {
- image "apache/couchdbci-ubuntu:focal-erlang-${ERLANG_VERSION}"
- label 'docker'
- args "${DOCKER_ARGS}"
- registryUrl 'https://docker.io/'
- registryCredentialsId 'dockerhub_creds'
- }
- }
- environment {
- platform = 'focal'
- sm_ver = '68'
- }
- 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'
+ 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
+ stage('Build CouchDB packages') {
+ steps {
+ unstash 'tarball'
+ sh( script: make_packages )
+ sh( script: cleanup_and_save )
}
- }
- }
- } // stages
- post {
- cleanup {
- sh 'rm -rf ${WORKSPACE}/*'
- }
- } // post
- } // stage
-
- stage('Debian Stretch') {
- agent {
- docker {
- image "apache/couchdbci-debian:stretch-erlang-${ERLANG_VERSION}"
- label 'docker'
- args "${DOCKER_ARGS}"
- registryUrl 'https://docker.io/'
- registryCredentialsId 'dockerhub_creds'
- }
- }
- environment {
- platform = 'stretch'
- 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'
+ post {
+ success {
+ archiveArtifacts artifacts: 'pkgs/**', fingerprint: true
+ }
}
}
- }
- 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}/*'
}
- }
- } // stages
- post {
- cleanup {
- sh 'rm -rf ${WORKSPACE}/*'
- }
- } // post
+ } // post
+ } // matrix
} // stage
- stage('Debian Buster amd64') {
- agent {
- docker {
- image "apache/couchdbci-debian:buster-erlang-${ERLANG_VERSION}"
- label 'docker'
- 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
- 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
+ // 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
*/