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/01/16 00:21:24 UTC

[couchdb] branch jenkins-bump-erlang-and-debian-versions updated (03b9a49 -> c7d4c25)

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

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


    from 03b9a49  Can a matrix exist alongside another stage?
     new cac2cc7  Revert "Can a matrix exist alongside another stage?"
     new c7d4c25  Debug cwd issues

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 build-aux/Jenkinsfile.full | 390 +++++++++++++++++++++++++++++++--------------
 1 file changed, 271 insertions(+), 119 deletions(-)

[couchdb] 02/02: Debug cwd issues

Posted by ko...@apache.org.
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

commit c7d4c2534d939cafd0b156ecd4ebbb13371df5bb
Author: Adam Kocoloski <ko...@apache.org>
AuthorDate: Sat Jan 15 19:20:16 2022 -0500

    Debug cwd issues
---
 build-aux/Jenkinsfile.full | 14 ++++++++------
 1 file changed, 8 insertions(+), 6 deletions(-)

diff --git a/build-aux/Jenkinsfile.full b/build-aux/Jenkinsfile.full
index 323beaa..98d2098 100644
--- a/build-aux/Jenkinsfile.full
+++ b/build-aux/Jenkinsfile.full
@@ -13,15 +13,15 @@
 // License for the specific language governing permissions and limitations under
 // the License.
 
-configure = '''
+unpack = '''
+ls -l
 mkdir -p ${COUCHDB_IO_LOG_DIR} ${platform}
 cd ${platform}
+ls -l
 rm -rf build
 mkdir build
-cd build
-tar -xf ${WORKSPACE}/apache-couchdb-*.tar.gz
-cd apache-couchdb-*
-./configure --spidermonkey-version ${sm_ver}
+tar -xf ${WORKSPACE}/apache-couchdb-*.tar.gz -C build
+mv build/apache-couchdb-* build/couchdb
 '''
 
 make_packages = '''
@@ -265,7 +265,9 @@ pipeline {
               stage('Build from tarball & test') {
                 steps {
                   unstash 'tarball'
-                  sh( script: configure, label: 'unpack tarball and configure' )
+                  sh( script: unpack, label: 'Unpack tarball' )
+                  dir( "${platform}/build/couchdb" )
+                  sh "./configure --spidermonkey-version ${sm_ver}"
                   sh 'make'
                   sh 'make eunit'
                   sh 'make elixir-suite'

[couchdb] 01/02: Revert "Can a matrix exist alongside another stage?"

Posted by ko...@apache.org.
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

commit cac2cc7c1c6abd70de1b5af8375e7b96980738fb
Author: Adam Kocoloski <ko...@apache.org>
AuthorDate: Sat Jan 15 18:58:25 2022 -0500

    Revert "Can a matrix exist alongside another stage?"
    
    This reverts commit 03b9a49e163e30ad658dc010fda942e20ef397f1.
---
 build-aux/Jenkinsfile.full | 376 +++++++++++++++++++++++++++++++--------------
 1 file changed, 263 insertions(+), 113 deletions(-)

diff --git a/build-aux/Jenkinsfile.full b/build-aux/Jenkinsfile.full
index 51c5679..323beaa 100644
--- a/build-aux/Jenkinsfile.full
+++ b/build-aux/Jenkinsfile.full
@@ -137,126 +137,116 @@ pipeline {
         timeout(time: 90, unit: "MINUTES")
       }
 
-      stages {
-        stage('FreeBSD') {
-          agent {
-            label 'freebsd'
+      matrix {
+        axes {
+          axis {
+            name 'platform'
+            values 'macos', 'centos7', 'centos8', 'bionic', 'focal', 'stretch', 'buster', 'bullseye'
           }
-          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'
+            values '1.8.5', '60', '68', '78'
+          } 
+        }
+        excludes {
+          exclude {
+            axis {
+              name 'platform'
+              values 'centos7', 'bionic', 'stretch'
             }
-            cleanup {
-              sh 'killall -9 beam.smp || true'
-              sh 'rm -rf ${WORKSPACE}/* ${COUCHDB_IO_LOG_DIR} || true'
+            axis {
+              name 'sm_ver'
+              notValues '1.8.5'
             }
-          } // post
-        } // stage FreeBSD
-
-        stage('macOS') {
-          agent {
-            label 'macos'
           }
-          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'
+          exclude {
+            axis {
+              name 'platform'
+              values 'centos8', 'buster', 'macos'
             }
-            cleanup {
-              sh 'killall -9 beam.smp || true'
-              sh 'rm -rf ${WORKSPACE}/* ${COUCHDB_IO_LOG_DIR} || true'
+            axis {
+              name 'sm_ver'
+              notValues '60'
             }
-          } // post
-        } // stage macOS
-
-        stage('Linux') {
-          matrix {
-            axes {
-              axis {
-                name 'platform'
-                values 'centos7', 'centos8', 'bionic', 'focal', 'stretch', 'buster', 'bullseye'
-              }
-              axis {
-                name 'sm_ver'
-                values '1.8.5', '60', '68', '78'
-              }
+          }
+          exclude {
+            axis {
+              name 'platform'
+              values 'focal'
             }
-            excludes {
-              exclude {
-                axis {
-                  name 'platform'
-                  values 'centos7', 'bionic', 'stretch'
-                }
-                axis {
-                  name 'sm_ver'
-                  notValues '1.8.5'
-                }
+            axis {
+              name 'sm_ver'
+              notValues '68'
+            }
+          }
+          exclude {
+            axis {
+              name 'platform'
+              values 'bullseye'
+            }
+            axis {
+              name 'sm_ver'
+              notValues '78'
+            }
+          }
+        }
+
+        stages {
+          stage('Non-containerized Platform') {
+            when {
+              beforeAgent true
+              anyOf {
+                environment name: 'platform', value: 'macos'
+                environment name: 'platform', value: 'freebsd'
               }
-              exclude {
-                axis {
-                  name 'platform'
-                  values 'centos8', 'buster'
-                }
-                axis {
-                  name 'sm_ver'
-                  notValues '60'
-                }
+            }
+
+            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 'focal'
-                }
-                axis {
-                  name 'sm_ver'
-                  notValues '68'
-                }
+              cleanup {
+                sh 'killall -9 beam.smp || true'
+                sh 'rm -rf ${WORKSPACE}/* ${COUCHDB_IO_LOG_DIR} || true'
               }
-              exclude {
-                axis {
-                  name 'platform'
-                  values 'bullseye'
-                }
-                axis {
-                  name 'sm_ver'
-                  notValues '78'
+            } // post
+
+          } // non-containerized platform
+
+          stage('Containerized Platform') {
+            when {
+              beforeAgent true
+              not {
+                anyOf {
+                  environment name: 'platform', value: 'macos'
+                  environment name: 'platform', value: 'freebsd'
                 }
               }
             }
@@ -311,11 +301,171 @@ pipeline {
                 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 {
+            }
+          }
+          options {
+            timeout(time: 120, unit: "MINUTES")
+          }
+          environment {
+            platform = 'aarch64-debian-stretch'
+            sm_ver = '60'
+          }
+          stages {
+            stage('Install latest qemu binaries') {
+              steps {
+                sh( script: update_qemu )
+              }
+            }
+            stage('Pull latest docker image') {
+              steps {
+                sh "docker pull apache/couchdbci-debian:arm64v8-buster-erlang-${ERLANG_VERSION}"
+              }
+            }
+            stage('Build from tarball & test & 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 )
+                  }
+                }
+              }
+              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('Publish') {
 
       when {