This is an automated email from the ASF dual-hosted git repository.

kocolosk pushed a commit to branch jenkins-bump-erlang-and-debian-versions
in repository https://gitbox.apache.org/repos/asf/couchdb.git


The following commit(s) were added to 
refs/heads/jenkins-bump-erlang-and-debian-versions by this push:
     new e4784ad  Can a matrix exist alongside another stage?
e4784ad is described below

commit e4784ad81adf2120db970d1cad91288df45a9613
Author: Adam Kocoloski <[email protected]>
AuthorDate: Sat Jan 15 18:12:17 2022 -0500

    Can a matrix exist alongside another stage?
---
 build-aux/Jenkinsfile.full | 414 ++++++++++++++-------------------------------
 1 file changed, 131 insertions(+), 283 deletions(-)

diff --git a/build-aux/Jenkinsfile.full b/build-aux/Jenkinsfile.full
index 323beaa..52da9a7 100644
--- a/build-aux/Jenkinsfile.full
+++ b/build-aux/Jenkinsfile.full
@@ -137,334 +137,182 @@ 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'
-            }
+      stages {
+        stage('FreeBSD') {
+          agent {
+            label 'freebsd'
           }
-          exclude {
-            axis {
-              name 'platform'
-              values 'centos8', 'buster', 'macos'
+          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 '60'
+            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 'focal'
+          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 '68'
+            cleanup {
+              sh 'killall -9 beam.smp || true'
+              sh 'rm -rf ${WORKSPACE}/* ${COUCHDB_IO_LOG_DIR} || true'
             }
-          }
-          exclude {
+          } // post
+        } // stage macOS
+
+        matrix {
+          axes {
             axis {
               name 'platform'
-              values 'bullseye'
+              values 'centos7', 'centos8', 'bionic', 'focal', 'stretch', 
'buster', 'bullseye'
             }
             axis {
               name 'sm_ver'
-              notValues '78'
+              values '1.8.5', '60', '68', '78'
             }
           }
-        }
-
-        stages {
-          stage('Non-containerized Platform') {
-            when {
-              beforeAgent true
-              anyOf {
-                environment name: 'platform', value: 'macos'
-                environment name: 'platform', value: 'freebsd'
+          excludes {
+            exclude {
+              axis {
+                name 'platform'
+                values 'centos7', 'bionic', 'stretch'
+              }
+              axis {
+                name 'sm_ver'
+                notValues '1.8.5'
               }
             }
-
-            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'
+            exclude {
+              axis {
+                name 'platform'
+                values 'centos8', 'buster'
               }
-              cleanup {
-                sh 'killall -9 beam.smp || true'
-                sh 'rm -rf ${WORKSPACE}/* ${COUCHDB_IO_LOG_DIR} || true'
-              }
-            } // post
-
-          } // non-containerized platform
-
-          stage('Containerized Platform') {
-            when {
-              beforeAgent true
-              not {
-                anyOf {
-                  environment name: 'platform', value: 'macos'
-                  environment name: 'platform', value: 'freebsd'
-                }
+              axis {
+                name 'sm_ver'
+                notValues '60'
               }
             }
-
-            agent {
-              docker {
-                image platform_images["${platform}"]
-                label 'docker'
-                args "${DOCKER_ARGS}"
-                registryUrl 'https://docker.io/'
-                registryCredentialsId 'dockerhub_creds'
+            exclude {
+              axis {
+                name 'platform'
+                values 'focal'
+              }
+              axis {
+                name 'sm_ver'
+                notValues '68'
               }
             }
-
-            stages {
-              stage('Build from tarball & test') {
-                steps {
-                  unstash 'tarball'
-                  sh( script: configure, label: 'unpack tarball and configure' 
)
-                  sh 'make'
-                  sh 'make eunit'
-                  sh 'make elixir-suite'
-                  sh 'make exunit'
-                  sh 'make mango-test'
-                }
-                post {
-                  always {
-                    junit '**/.eunit/*.xml, **/_build/*/lib/couchdbtest/*.xml, 
**/src/mango/nosetests.xml, **/test/javascript/junit.xml'
-                  }
-                  failure {
-                    sh 'make build-report'
-                  }
-                }
+            exclude {
+              axis {
+                name 'platform'
+                values 'bullseye'
               }
-
-              stage('Build CouchDB packages') {
-                steps {
-                  unstash 'tarball'
-                  sh( script: make_packages )
-                  sh( script: cleanup_and_save )
-                }
-                post {
-                  success {
-                    archiveArtifacts artifacts: 'pkgs/**', fingerprint: true
-                  }
-                }
+              axis {
+                name 'sm_ver'
+                notValues '78'
               }
             }
+          }
 
-            post {
-              cleanup {
-                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 {
+            docker {
+              image platform_images["${platform}"]
+              label 'docker'
+              args "${DOCKER_ARGS}"
+              registryUrl 'https://docker.io/'
+              registryCredentialsId 'dockerhub_creds'
             }
           }
-          options {
-            timeout(time: 120, unit: "MINUTES")
-          }
-          environment {
-            platform = 'aarch64-debian-stretch'
-            sm_ver = '60'
-          }
+
           stages {
-            stage('Install latest qemu binaries') {
+            stage('Build from tarball & test') {
               steps {
-                sh( script: update_qemu )
+                unstash 'tarball'
+                sh( script: configure, label: 'unpack tarball and configure' )
+                sh 'make'
+                sh 'make eunit'
+                sh 'make elixir-suite'
+                sh 'make exunit'
+                sh 'make mango-test'
               }
-            }
-            stage('Pull latest docker image') {
-              steps {
-                sh "docker pull 
apache/couchdbci-debian:arm64v8-buster-erlang-${ERLANG_VERSION}"
+              post {
+                always {
+                  junit '**/.eunit/*.xml, **/_build/*/lib/couchdbtest/*.xml, 
**/src/mango/nosetests.xml, **/test/javascript/junit.xml'
+                }
+                failure {
+                  sh 'make build-report'
+                }
               }
             }
-            stage('Build from tarball & test & packages') {
+
+            stage('Build CouchDB 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 )
-                  }
-                }
+                unstash 'tarball'
+                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') {
 

Reply via email to