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/02/27 22:39:21 UTC
[couchdb] branch merge-devcontainer-jenkins updated: Experiment with linking an FDB sidecar container
This is an automated email from the ASF dual-hosted git repository.
kocolosk pushed a commit to branch merge-devcontainer-jenkins
in repository https://gitbox.apache.org/repos/asf/couchdb.git
The following commit(s) were added to refs/heads/merge-devcontainer-jenkins by this push:
new 130bad7 Experiment with linking an FDB sidecar container
130bad7 is described below
commit 130bad7f200ac28c036507beb47c7dc5b518bb20
Author: Adam Kocoloski <ko...@apache.org>
AuthorDate: Sun Feb 27 17:38:43 2022 -0500
Experiment with linking an FDB sidecar container
---
build-aux/Jenkinsfile.pr | 109 +++++++++++++++++++++++++----------------------
1 file changed, 57 insertions(+), 52 deletions(-)
diff --git a/build-aux/Jenkinsfile.pr b/build-aux/Jenkinsfile.pr
index be352d1..031a0c2 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('foundation/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