From 94642edf3beaf682283bb92027e6a1a467ccc87f Mon Sep 17 00:00:00 2001 From: Ronny Berndt Date: Thu, 12 Jan 2023 11:00:43 +0100 Subject: [PATCH] Add Windows Jenkins pipeline --- build-aux/Jenkinsfile.full | 418 ++++++++++++++++++++----------------- build-aux/Jenkinsfile.pr | 376 ++++++++++++++++----------------- 2 files changed, 415 insertions(+), 379 deletions(-) diff --git a/build-aux/Jenkinsfile.full b/build-aux/Jenkinsfile.full index efbf1db5af3..3139389062b 100644 --- a/build-aux/Jenkinsfile.full +++ b/build-aux/Jenkinsfile.full @@ -23,61 +23,68 @@ MINIMUM_ERLANG_VERSION = '23.3.4.18' // We create parallel build / test / package stages for each OS using the metadata // in this map. Adding a new OS should ideally only involve adding a new entry here. meta = [ - 'centos7': [ - name: 'CentOS 7', - spidermonkey_vsn: '1.8.5', - image: "apache/couchdbci-centos:7-erlang-${ERLANG_VERSION}" - ], - - 'centos8': [ - name: 'CentOS 8', - spidermonkey_vsn: '60', - image: "apache/couchdbci-centos:8-erlang-${ERLANG_VERSION}" - ], - - 'bionic': [ - name: 'Ubuntu 18.04', - spidermonkey_vsn: '1.8.5', - image: "apache/couchdbci-ubuntu:bionic-erlang-${ERLANG_VERSION}" - ], - - 'focal': [ - name: 'Ubuntu 20.04', - spidermonkey_vsn: '68', - image: "apache/couchdbci-ubuntu:focal-erlang-${ERLANG_VERSION}" - ], - - 'jammy': [ - name: 'Ubuntu 22.04', - spidermonkey_vsn: '91', - image: "apache/couchdbci-ubuntu:jammy-erlang-${ERLANG_VERSION}" - ], - - 'buster': [ - name: 'Debian 10', - spidermonkey_vsn: '60', - image: "apache/couchdbci-debian:buster-erlang-${ERLANG_VERSION}" - ], - - 'bullseye-arm64': [ - name: 'Debian 11 ARM', - spidermonkey_vsn: '78', - image: "apache/couchdbci-debian:bullseye-erlang-${ERLANG_VERSION}", - node_label: 'arm64v8' - ], - - 'bullseye-ppc64': [ - name: 'Debian 11 POWER', - spidermonkey_vsn: '78', - image: "apache/couchdbci-debian:bullseye-erlang-${ERLANG_VERSION}", - node_label: 'ppc64le' - ], + // 'centos7': [ + // name: 'CentOS 7', + // spidermonkey_vsn: '1.8.5', + // image: "apache/couchdbci-centos:7-erlang-${ERLANG_VERSION}" + // ], + // + // 'centos8': [ + // name: 'CentOS 8', + // spidermonkey_vsn: '60', + // image: "apache/couchdbci-centos:8-erlang-${ERLANG_VERSION}" + // ], + // + // 'bionic': [ + // name: 'Ubuntu 18.04', + // spidermonkey_vsn: '1.8.5', + // image: "apache/couchdbci-ubuntu:bionic-erlang-${ERLANG_VERSION}" + // ], + // + // 'focal': [ + // name: 'Ubuntu 20.04', + // spidermonkey_vsn: '68', + // image: "apache/couchdbci-ubuntu:focal-erlang-${ERLANG_VERSION}" + // ], + // + // 'jammy': [ + // name: 'Ubuntu 22.04', + // spidermonkey_vsn: '91', + // image: "apache/couchdbci-ubuntu:jammy-erlang-${ERLANG_VERSION}" + // ], + // + // 'buster': [ + // name: 'Debian 10', + // spidermonkey_vsn: '60', + // image: "apache/couchdbci-debian:buster-erlang-${ERLANG_VERSION}" + // ], + // + // 'bullseye-arm64': [ + // name: 'Debian 11 ARM', + // spidermonkey_vsn: '78', + // image: "apache/couchdbci-debian:bullseye-erlang-${ERLANG_VERSION}", + // node_label: 'arm64v8' + // ], + // + // 'bullseye-ppc64': [ + // name: 'Debian 11 POWER', + // spidermonkey_vsn: '78', + // image: "apache/couchdbci-debian:bullseye-erlang-${ERLANG_VERSION}", + // node_label: 'ppc64le' + // ], + // + // 'bullseye': [ + // name: 'Debian 11', + // spidermonkey_vsn: '78', + // image: "apache/couchdbci-debian:bullseye-erlang-${ERLANG_VERSION}" + // ], - 'bullseye': [ - name: 'Debian 11', - spidermonkey_vsn: '78', - image: "apache/couchdbci-debian:bullseye-erlang-${ERLANG_VERSION}" - ], + 'windows': [ + name: 'Windows 2022', + spidermonkey_vsn: '91', + gnu_make: 'make', + node_label: 'win' + ] // Skip freebsd builds for now as adviced by node owner // 'freebsd': [ @@ -94,6 +101,28 @@ meta = [ // ] ] +def generateNativeUnixSteps(platform) { + return { + withEnv([ + 'HOME='+pwd(), + 'PATH+USRLOCAL=/usr/local/bin', + 'MAKE='+meta[platform].gnu_make + ]) { + sh( script: "mkdir -p ${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' + sh '$MAKE weatherreport-test' + } + } + } +} + // Credit to https://stackoverflow.com/a/69222555 for this technique. // We can use the scripted pipeline syntax to dynamically generate stages, // and inject them into a map that we pass to the `parallel` step in a script. @@ -114,44 +143,46 @@ def generateNativeStage(platform) { timeout(time: 90, unit: "MINUTES") { try { // deleteDir is OK here because we're not inside of a Docker container! - deleteDir() - unstash 'tarball' - withEnv([ - 'HOME='+pwd(), - 'PATH+USRLOCAL=/usr/local/bin', - 'MAKE='+meta[platform].gnu_make - ]) { - sh( script: "mkdir -p ${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' - sh '$MAKE weatherreport-test' - } + //deleteDir() + //unstash 'tarball' + if (isUnix()) { + generateNativeUnixSteps(platform) + } else { + //powershell( script: "git clone https://github.com/apache/couchdb-glazier", label: 'Cloning couchdb-glazier repository' ) + powershell( script: "New-Item -ItemType Directory -Path ${platform}/build -Force", label: 'Create build directories' ) + powershell( script: "tar -xf (Get-Item apache-couchdb-*.tar.gz) -C ${platform}/build --strip-components=1", label: 'Unpack release' ) + dir( "${platform}/build" ) { + powershell """ + ls + & ..\\..\\couchdb-glazier\\bin\\shell.ps1 + cl.exe + & .\\configure.ps1 -SkipDeps -SpiderMonkeyVersion "${meta[platform].spidermonkey_vsn}" + """ + } } } catch (err) { - sh 'ls -l ${WORKSPACE}' - withEnv([ - 'HOME='+pwd(), - 'PATH+USRLOCAL=/usr/local/bin', - 'MAKE='+meta[platform].gnu_make - ]) { - dir( "${platform}/build" ) { - sh 'ls -l' - sh '${MAKE} build-report' + if (isUnix()) { + sh 'ls -l ${WORKSPACE}' + withEnv([ + 'HOME='+pwd(), + 'PATH+USRLOCAL=/usr/local/bin', + 'MAKE='+meta[platform].gnu_make + ]) { + dir( "${platform}/build" ) { + sh 'ls -l' + sh '${MAKE} build-report' + } } + error("Build step failed with error: ${err.getMessage()}") } - 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 'killall -9 beam.smp || true' - sh 'rm -rf ${WORKSPACE}/*' + if (isUnix()) { + 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}/*' + } } } } @@ -261,37 +292,37 @@ pipeline { } stages { - stage('Build Release Tarball') { - agent { - docker { - label 'docker' - image "apache/couchdbci-debian:bullseye-erlang-${MINIMUM_ERLANG_VERSION}" - args "${DOCKER_ARGS}" - registryUrl 'https://docker.io/' - registryCredentialsId 'dockerhub_creds' - } - } - steps { - timeout(time: 15, unit: "MINUTES") { - sh (script: 'rm -rf apache-couchdb-*', label: 'Clean workspace of any previous release artifacts' ) - sh "./configure --spidermonkey-version 78" - sh 'make dist' - } - } - post { - success { - stash includes: 'apache-couchdb-*.tar.gz', name: 'tarball' - archiveArtifacts artifacts: 'apache-couchdb-*.tar.gz', fingerprint: true - } - failure { - sh 'ls -l ${WORKSPACE}' - } - cleanup { - // UGH see https://issues.jenkins-ci.org/browse/JENKINS-41894 - sh 'rm -rf ${WORKSPACE}/*' - } - } - } // stage Build Release Tarball + // stage('Build Release Tarball') { + // agent { + // docker { + // label 'docker' + // image "apache/couchdbci-debian:bullseye-erlang-${MINIMUM_ERLANG_VERSION}" + // args "${DOCKER_ARGS}" + // registryUrl 'https://docker.io/' + // registryCredentialsId 'dockerhub_creds' + // } + // } + // steps { + // timeout(time: 15, unit: "MINUTES") { + // sh (script: 'rm -rf apache-couchdb-*', label: 'Clean workspace of any previous release artifacts' ) + // sh "./configure --spidermonkey-version 78" + // sh 'make dist' + // } + // } + // post { + // success { + // stash includes: 'apache-couchdb-*.tar.gz', name: 'tarball' + // archiveArtifacts artifacts: 'apache-couchdb-*.tar.gz', fingerprint: true + // } + // failure { + // sh 'ls -l ${WORKSPACE}' + // } + // cleanup { + // // UGH see https://issues.jenkins-ci.org/browse/JENKINS-41894 + // sh 'rm -rf ${WORKSPACE}/*' + // } + // } + // } // stage Build Release Tarball stage('Test and Package') { steps { @@ -302,7 +333,12 @@ pipeline { ["${key}": generateContainerStage(key)] } else { - ["${key}": generateNativeStage(key)] + if (key != "windows") { + ["${key}": generateNativeStage(key)] + } + else { + ["${key}": generateNativeStage(values.node_label)] + } } } parallel parallelStagesMap @@ -310,80 +346,80 @@ pipeline { } } - stage('Publish') { - - when { - expression { return env.BRANCH_NAME ==~ /main|2.*.x|3.*.x|4.*.x|jenkins-.*/ } - } - - agent { - docker { - image "apache/couchdbci-debian:bullseye-erlang-${ERLANG_VERSION}" - label 'docker' - args "${DOCKER_ARGS}" - registryUrl 'https://docker.io/' - registryCredentialsId 'dockerhub_creds' - } - } - options { - skipDefaultCheckout() - timeout(time: 90, unit: "MINUTES") - } - - steps { - sh 'rm -rf ${WORKSPACE}/*' - unstash 'tarball' - unarchive mapping: ['pkgs/' : '.'] - - sh( label: 'Build Debian repo', script: ''' - mkdir -p $BRANCH_NAME/debian $BRANCH_NAME/el7 $BRANCH_NAME/el8 $BRANCH_NAME/source - git clone https://github.com/apache/couchdb-pkg - for plat in buster bullseye focal - do - reprepro -b couchdb-pkg/repo includedeb $plat pkgs/$plat/*.deb - done - ''' ) - - sh( label: 'Build CentOS repos', script: ''' - #cp js/centos-7/*rpm pkgs/centos7 - #cp js/centos-8/*rpm pkgs/centos8 - cd pkgs/centos7 && createrepo_c --database . - cd ../centos8 && createrepo_c --database . - ''' ) - - sh( label: 'Build unified repo', script: ''' - mv couchdb-pkg/repo/pool $BRANCH_NAME/debian - mv couchdb-pkg/repo/dists $BRANCH_NAME/debian - mv pkgs/centos7/* $BRANCH_NAME/el7 - mv pkgs/centos8/* $BRANCH_NAME/el8 - mv apache-couchdb-*.tar.gz $BRANCH_NAME/source - cd $BRANCH_NAME/source - ls -1tr | head -n -10 | xargs -d '\n' rm -f -- - cd ../.. - ''' ) - } // steps - } // stage - } // stages - - post { - success { - mail to: 'notifications@couchdb.apache.org', - replyTo: 'notifications@couchdb.apache.org', - subject: "[Jenkins] SUCCESS: ${currentBuild.fullDisplayName}", - body: "Yay, we passed. ${env.RUN_DISPLAY_URL}" - } - unstable { - mail to: 'notifications@couchdb.apache.org', - replyTo: 'notifications@couchdb.apache.org', - subject: "[Jenkins] SUCCESS: ${currentBuild.fullDisplayName}", - body: "Eep! Build is unstable... ${env.RUN_DISPLAY_URL}" - } - failure { - mail to: 'notifications@couchdb.apache.org', - replyTo: 'notifications@couchdb.apache.org', - subject: "[Jenkins] FAILURE: ${currentBuild.fullDisplayName}", - body: "Boo, we failed. ${env.RUN_DISPLAY_URL}" - } + // stage('Publish') { + // + // when { + // expression { return env.BRANCH_NAME ==~ /main|2.*.x|3.*.x|4.*.x|jenkins-.*/ } + // } + // + // agent { + // docker { + // image "apache/couchdbci-debian:bullseye-erlang-${ERLANG_VERSION}" + // label 'docker' + // args "${DOCKER_ARGS}" + // registryUrl 'https://docker.io/' + // registryCredentialsId 'dockerhub_creds' + // } + // } + // options { + // skipDefaultCheckout() + // timeout(time: 90, unit: "MINUTES") + // } + // + // steps { + // sh 'rm -rf ${WORKSPACE}/*' + // unstash 'tarball' + // unarchive mapping: ['pkgs/' : '.'] + // + // sh( label: 'Build Debian repo', script: ''' + // mkdir -p $BRANCH_NAME/debian $BRANCH_NAME/el7 $BRANCH_NAME/el8 $BRANCH_NAME/source + // git clone https://github.com/apache/couchdb-pkg + // for plat in buster bullseye focal + // do + // reprepro -b couchdb-pkg/repo includedeb $plat pkgs/$plat/*.deb + // done + // ''' ) + // + // sh( label: 'Build CentOS repos', script: ''' + // #cp js/centos-7/*rpm pkgs/centos7 + // #cp js/centos-8/*rpm pkgs/centos8 + // cd pkgs/centos7 && createrepo_c --database . + // cd ../centos8 && createrepo_c --database . + // ''' ) + // + // sh( label: 'Build unified repo', script: ''' + // mv couchdb-pkg/repo/pool $BRANCH_NAME/debian + // mv couchdb-pkg/repo/dists $BRANCH_NAME/debian + // mv pkgs/centos7/* $BRANCH_NAME/el7 + // mv pkgs/centos8/* $BRANCH_NAME/el8 + // mv apache-couchdb-*.tar.gz $BRANCH_NAME/source + // cd $BRANCH_NAME/source + // ls -1tr | head -n -10 | xargs -d '\n' rm -f -- + // cd ../.. + // ''' ) + // } // steps + // } // stage + //} // stages + // + //post { + // success { + // mail to: 'notifications@couchdb.apache.org', + // replyTo: 'notifications@couchdb.apache.org', + // subject: "[Jenkins] SUCCESS: ${currentBuild.fullDisplayName}", + // body: "Yay, we passed. ${env.RUN_DISPLAY_URL}" + // } + // unstable { + // mail to: 'notifications@couchdb.apache.org', + // replyTo: 'notifications@couchdb.apache.org', + // subject: "[Jenkins] SUCCESS: ${currentBuild.fullDisplayName}", + // body: "Eep! Build is unstable... ${env.RUN_DISPLAY_URL}" + // } + // failure { + // mail to: 'notifications@couchdb.apache.org', + // replyTo: 'notifications@couchdb.apache.org', + // subject: "[Jenkins] FAILURE: ${currentBuild.fullDisplayName}", + // body: "Boo, we failed. ${env.RUN_DISPLAY_URL}" + // } } } // pipeline diff --git a/build-aux/Jenkinsfile.pr b/build-aux/Jenkinsfile.pr index bcb8b69ad7f..17536b0fec5 100644 --- a/build-aux/Jenkinsfile.pr +++ b/build-aux/Jenkinsfile.pr @@ -96,193 +96,193 @@ pipeline { } } } // stage 'Setup Environment' - - stage('Docs Check') { - // Run docs `make check` stage if any docs changed - when { - beforeOptions true - expression { DOCS_CHANGED == '1' } - } - agent { - docker { - image "${DOCKER_IMAGE_BASE}-${LOW_ERLANG_VER}" - label 'docker' - args "${DOCKER_ARGS}" - registryUrl 'https://docker.io/' - registryCredentialsId 'dockerhub_creds' - } - } - options { - timeout(time: 15, unit: 'MINUTES') - } - steps { - sh ''' - make python-black - ''' - sh ''' - (cd src/docs && make check) - ''' - } - post { - cleanup { - // UGH see https://issues.jenkins-ci.org/browse/JENKINS-41894 - sh 'rm -rf ${WORKSPACE}/*' - } - } - } // stage Docs Check - - stage('Build Docs') { - // Build docs separately if only docs changed. If there are other changes, docs are - // already built as part of `make dist` - when { - beforeOptions true - expression { ONLY_DOCS_CHANGED == '1' } - } - agent { - docker { - image "${DOCKER_IMAGE_BASE}-${LOW_ERLANG_VER}" - label 'docker' - args "${DOCKER_ARGS}" - registryUrl 'https://docker.io/' - registryCredentialsId 'dockerhub_creds' - } - } - options { - timeout(time: 30, unit: 'MINUTES') - } - steps { - sh ''' - (cd src/docs && ./setup.sh ; make html) - ''' - } - post { - cleanup { - // UGH see https://issues.jenkins-ci.org/browse/JENKINS-41894 - sh 'rm -rf ${WORKSPACE}/*' - } - } - } // stage Build Docs - - stage('Source Format Checks') { - when { - beforeOptions true - expression { ONLY_DOCS_CHANGED == '0' } - } - agent { - docker { - image "${DOCKER_IMAGE_BASE}-${LOW_ERLANG_VER}" - label 'docker' - args "${DOCKER_ARGS}" - registryUrl 'https://docker.io/' - registryCredentialsId 'dockerhub_creds' - } - } - options { - timeout(time: 15, unit: "MINUTES") - } - steps { - sh ''' - rm -rf apache-couchdb-* - ./configure --skip-deps - make erlfmt-check - make elixir-source-checks - make python-black - ''' - } - post { - cleanup { - // UGH see https://issues.jenkins-ci.org/browse/JENKINS-41894 - sh 'rm -rf ${WORKSPACE}/*' - } - } - } // stage Erlfmt - - - stage('Make Dist') { - when { - beforeOptions true - expression { ONLY_DOCS_CHANGED == '0' } - } - agent { - docker { - image "${DOCKER_IMAGE_BASE}-${LOW_ERLANG_VER}" - label 'docker' - args "${DOCKER_ARGS}" - registryUrl 'https://docker.io/' - registryCredentialsId 'dockerhub_creds' - } - } - options { - timeout(time: 15, unit: "MINUTES") - } - steps { - sh ''' - rm -rf apache-couchdb-* - ./configure --spidermonkey-version 78 - make dist - chmod -R a+w * . - ''' - } - post { - success { - stash includes: 'apache-couchdb-*.tar.gz', name: 'tarball' - } - cleanup { - // UGH see https://issues.jenkins-ci.org/browse/JENKINS-41894 - sh 'rm -rf ${WORKSPACE}/*' - } - } - } // stage Make Dist - - // TODO Rework once Improved Docker Pipeline Engine is released - // https://issues.jenkins-ci.org/browse/JENKINS-47962 - // https://issues.jenkins-ci.org/browse/JENKINS-48050 - - stage('Make Check') { - when { - beforeOptions true - expression { ONLY_DOCS_CHANGED == '0' } - } - matrix { - axes { - axis { - name 'ERLANG_VERSION' - values '23.3.4.18', '24.3.4.7', '25.2' - } - axis { - name 'SM_VSN' - values '78' - } - } - - stages { - stage('Build and Test') { - agent { - docker { - image "${DOCKER_IMAGE_BASE}-${ERLANG_VERSION}" - label 'docker' - args "${DOCKER_ARGS}" - } - } - options { - skipDefaultCheckout() - timeout(time: 90, unit: "MINUTES") - } - 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' - } - cleanup { - sh 'rm -rf ${WORKSPACE}/*' - } - } - } // stage - } // stages - } // matrix - } // stage "Make Check" + // + // stage('Docs Check') { + // // Run docs `make check` stage if any docs changed + // when { + // beforeOptions true + // expression { DOCS_CHANGED == '1' } + // } + // agent { + // docker { + // image "${DOCKER_IMAGE_BASE}-${LOW_ERLANG_VER}" + // label 'docker' + // args "${DOCKER_ARGS}" + // registryUrl 'https://docker.io/' + // registryCredentialsId 'dockerhub_creds' + // } + // } + // options { + // timeout(time: 15, unit: 'MINUTES') + // } + // steps { + // sh ''' + // make python-black + // ''' + // sh ''' + // (cd src/docs && make check) + // ''' + // } + // post { + // cleanup { + // // UGH see https://issues.jenkins-ci.org/browse/JENKINS-41894 + // sh 'rm -rf ${WORKSPACE}/*' + // } + // } + // } // stage Docs Check + // + // stage('Build Docs') { + // // Build docs separately if only docs changed. If there are other changes, docs are + // // already built as part of `make dist` + // when { + // beforeOptions true + // expression { ONLY_DOCS_CHANGED == '1' } + // } + // agent { + // docker { + // image "${DOCKER_IMAGE_BASE}-${LOW_ERLANG_VER}" + // label 'docker' + // args "${DOCKER_ARGS}" + // registryUrl 'https://docker.io/' + // registryCredentialsId 'dockerhub_creds' + // } + // } + // options { + // timeout(time: 30, unit: 'MINUTES') + // } + // steps { + // sh ''' + // (cd src/docs && ./setup.sh ; make html) + // ''' + // } + // post { + // cleanup { + // // UGH see https://issues.jenkins-ci.org/browse/JENKINS-41894 + // sh 'rm -rf ${WORKSPACE}/*' + // } + // } + // } // stage Build Docs + // + // stage('Source Format Checks') { + // when { + // beforeOptions true + // expression { ONLY_DOCS_CHANGED == '0' } + // } + // agent { + // docker { + // image "${DOCKER_IMAGE_BASE}-${LOW_ERLANG_VER}" + // label 'docker' + // args "${DOCKER_ARGS}" + // registryUrl 'https://docker.io/' + // registryCredentialsId 'dockerhub_creds' + // } + // } + // options { + // timeout(time: 15, unit: "MINUTES") + // } + // steps { + // sh ''' + // rm -rf apache-couchdb-* + // ./configure --skip-deps + // make erlfmt-check + // make elixir-source-checks + // make python-black + // ''' + // } + // post { + // cleanup { + // // UGH see https://issues.jenkins-ci.org/browse/JENKINS-41894 + // sh 'rm -rf ${WORKSPACE}/*' + // } + // } + // } // stage Erlfmt + // + // + // stage('Make Dist') { + // when { + // beforeOptions true + // expression { ONLY_DOCS_CHANGED == '0' } + // } + // agent { + // docker { + // image "${DOCKER_IMAGE_BASE}-${LOW_ERLANG_VER}" + // label 'docker' + // args "${DOCKER_ARGS}" + // registryUrl 'https://docker.io/' + // registryCredentialsId 'dockerhub_creds' + // } + // } + // options { + // timeout(time: 15, unit: "MINUTES") + // } + // steps { + // sh ''' + // rm -rf apache-couchdb-* + // ./configure --spidermonkey-version 78 + // make dist + // chmod -R a+w * . + // ''' + // } + // post { + // success { + // stash includes: 'apache-couchdb-*.tar.gz', name: 'tarball' + // } + // cleanup { + // // UGH see https://issues.jenkins-ci.org/browse/JENKINS-41894 + // sh 'rm -rf ${WORKSPACE}/*' + // } + // } + // } // stage Make Dist + // + // // TODO Rework once Improved Docker Pipeline Engine is released + // // https://issues.jenkins-ci.org/browse/JENKINS-47962 + // // https://issues.jenkins-ci.org/browse/JENKINS-48050 + // + // stage('Make Check') { + // when { + // beforeOptions true + // expression { ONLY_DOCS_CHANGED == '0' } + // } + // matrix { + // axes { + // axis { + // name 'ERLANG_VERSION' + // values '23.3.4.18', '24.3.4.7', '25.2' + // } + // axis { + // name 'SM_VSN' + // values '78' + // } + // } + // + // stages { + // stage('Build and Test') { + // agent { + // docker { + // image "${DOCKER_IMAGE_BASE}-${ERLANG_VERSION}" + // label 'docker' + // args "${DOCKER_ARGS}" + // } + // } + // options { + // skipDefaultCheckout() + // timeout(time: 90, unit: "MINUTES") + // } + // 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' + // } + // cleanup { + // sh 'rm -rf ${WORKSPACE}/*' + // } + // } + // } // stage + // } // stages + // } // matrix + // } // stage "Make Check" } // stages } // pipeline