summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdam Kocoloski <kocolosk@apache.org>2022-02-27 17:38:43 -0500
committerAdam Kocoloski <kocolosk@apache.org>2022-02-27 17:49:43 -0500
commit9d741e14006b6413bd99af681cbc07a8ef89bedc (patch)
tree404ef4e72f6c0b7d13c6dbeaa9f3ba639c1073ed
parent64638321b7f4b8d99ad3a648a675f7bb9bca7543 (diff)
downloadcouchdb-9d741e14006b6413bd99af681cbc07a8ef89bedc.tar.gz
Experiment with linking an FDB sidecar container
-rw-r--r--build-aux/Jenkinsfile.pr109
1 files changed, 57 insertions, 52 deletions
diff --git a/build-aux/Jenkinsfile.pr b/build-aux/Jenkinsfile.pr
index be352d110..e530f8df8 100644
--- a/build-aux/Jenkinsfile.pr
+++ b/build-aux/Jenkinsfile.pr
@@ -13,6 +13,56 @@
// License for the specific language governing permissions and limitations under
// the License.
+meta = [
+ '21': [],
+ '22': [],
+ '23': [],
+ '24': []
+]
+
+def generateStage(ERLANG_VERSION) {
+ return {
+ stage(ERLANG_VERSION) {
+ node('docker') {
+ docker.image('foundationdb/foundationdb:6.3.23').withRun() { c ->
+ docker.image("${DOCKER_IMAGE_BASE}-${ERLANG_VERSION}").inside("${DOCKER_ARGS} --link ${c.id}:fdb") {
+ timeout(time: 90, unit: "MINUTES") {
+ stage("Erlang ${ERLANG_VERSION}") {
+ try {
+ echo "Building CouchDB PR using Erlang ${ERLANG_VERSION} and SpiderMonkey ${SM_VSN}"
+ sh( script: "rm -rf build-${ERLANG_VERSION} apache-couchdb-*", label: 'Clean out workspace' )
+ unstash 'release-tarball'
+ sh( script: "mkdir -p ${COUCHDB_IO_LOG_DIR} build-${ERLANG_VERSION}" )
+ sh( script: "tar -xf apache-couchdb-*.tar.gz -C build-${ERLANG_VERSION} --strip-components=1", label: 'Unpack release' )
+ dir( "build-${ERLANG_VERSION}" ) {
+ sh( script: './configure --skip-deps', label: 'Configure CouchDB build system' )
+ sh( script: 'make', label: 'Build CouchDB' )
+ sh( script: 'make eunit', label: 'EUnit test suite' )
+ sh( script: 'make elixir-suite', label: 'ExUnit unit test suite' )
+ sh( script: 'make exunit', label: 'ExUnit integration test suite' )
+ sh( script: 'make mango-test', label: 'Python-based Mango query test suite' )
+ }
+ }
+ catch (err) {
+ dir( "build-${ERLANG_VERSION}" ) {
+ sh 'ls -l'
+ sh 'make build-report'
+ }
+ error("Build step failed with error: ${err.getMessage()}")
+ }
+ finally {
+ junit '**/.eunit/*.xml, **/_build/*/lib/couchdbtest/*.xml, **/src/mango/nosetests.xml, **/test/javascript/junit.xml'
+ sh 'rm -rf ${WORKSPACE}/* ${COUCHDB_IO_LOG_DIR}'
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+}
+
pipeline {
// no top-level agent; agents must be declared for each stage
@@ -85,60 +135,15 @@ pipeline {
} // stage Build Release Tarball
stage('Make Check') {
- matrix {
- axes {
- axis {
- name 'ERLANG_VERSION'
- values '21', '22', '23', '24'
+ steps {
+ script {
+ // Including failFast: true in map fails the build immediately if any parallel step fails
+ parallelStagesMap = meta.collectEntries( [failFast: false] ) { key, values ->
+ ["${key}": generateStage(key)]
}
+ parallel parallelStagesMap
}
-
- stages {
- stage('Build and Test') {
- agent {
- docker {
- image "${DOCKER_IMAGE_BASE}-${ERLANG_VERSION}"
- label 'docker'
- args "${DOCKER_ARGS}"
- }
- }
- options {
- skipDefaultCheckout()
- }
- steps {
- timeout(time: 90, unit: "MINUTES") {
- echo "Building CouchDB PR using Erlang ${ERLANG_VERSION} and SpiderMonkey ${SM_VSN}"
- sh( script: "rm -rf build-${ERLANG_VERSION} apache-couchdb-*", label: 'Clean out workspace' )
- unstash 'release-tarball'
- sh( script: "mkdir -p ${COUCHDB_IO_LOG_DIR} build-${ERLANG_VERSION}" )
- sh( script: "tar -xf apache-couchdb-*.tar.gz -C build-${ERLANG_VERSION} --strip-components=1", label: 'Unpack release' )
- dir( "build-${ERLANG_VERSION}" ) {
- sh( script: './configure --skip-deps', label: 'Configure CouchDB build system' )
- sh( script: 'make', label: 'Build CouchDB' )
- sh( script: 'make eunit', label: 'EUnit test suite' )
- sh( script: 'make elixir-suite', label: 'ExUnit unit test suite' )
- sh( script: 'make exunit', label: 'ExUnit integration test suite' )
- sh( script: 'make mango-test', label: 'Python-based Mango query test suite' )
- }
- }
- }
- post {
- always {
- junit '**/.eunit/*.xml, **/_build/*/lib/couchdbtest/*.xml, **/src/mango/nosetests.xml, **/test/javascript/junit.xml'
- }
- failure {
- dir( "build-${ERLANG_VERSION}" ) {
- sh 'ls -l'
- sh 'make build-report'
- }
- }
- cleanup {
- sh 'rm -rf ${WORKSPACE}/* ${COUCHDB_IO_LOG_DIR}'
- }
- }
- } // stage "Build and Test"
- } // stages
- } // matrix
+ }
} // stage "Make Check"
} // stages
} // pipeline