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/17 04:11:42 UTC

[couchdb] branch jenkins-dynamic-matrix updated: Final cleanup for the night

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

kocolosk pushed a commit to branch jenkins-dynamic-matrix
in repository https://gitbox.apache.org/repos/asf/couchdb.git


The following commit(s) were added to refs/heads/jenkins-dynamic-matrix by this push:
     new 5963546  Final cleanup for the night
5963546 is described below

commit 5963546b8e46731f7bcd620aa4224c45a20b7db4
Author: Adam Kocoloski <ko...@apache.org>
AuthorDate: Sun Jan 16 23:11:33 2022 -0500

    Final cleanup for the night
---
 build-aux/Jenkinsfile.full | 74 +++++++---------------------------------------
 1 file changed, 10 insertions(+), 64 deletions(-)

diff --git a/build-aux/Jenkinsfile.full b/build-aux/Jenkinsfile.full
index 93aef41..644ce46 100644
--- a/build-aux/Jenkinsfile.full
+++ b/build-aux/Jenkinsfile.full
@@ -108,12 +108,13 @@ meta = [
 gnu_make = ['freebsd': 'gmake', 'macos': 'make']
 
 // Credit to https://stackoverflow.com/a/69222555 for this technique.
-// We use an initial stage to dynamically generate the list of parallel stages
-// to run afterwards. This keeps our Jenkinsfile DRY and gives us more
-// flexibility and better UX than the matrix pipeline.
+// 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.
+// It's arguably more difficult to follow than a pure declarative pipeline, but
+// the opportunity to keep things DRY seems worthwhile. -APK
 def generateNativeStage(platform) {
   return {
-    stage(meta[platform].name) {
+    stage("${meta[platform].name} - build & test") {
       node(platform) {
         timeout(time: 90, unit: "MINUTES") {
           try {
@@ -140,29 +141,15 @@ def generateNativeStage(platform) {
             }
           }
           catch (exc) {
-              dir( "${platform}/build/couchdb" ) {
-                sh 'make build-report'
-              }
+            dir( "${platform}/build/couchdb" ) {
+              sh 'make build-report'
+            }
           }
           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}/* ${COUCHDB_IO_LOG_DIR} || true'
           }
-          // post {
-          //   always {
-          //     junit '**/.eunit/*.xml, **/_build/*/lib/couchdbtest/*.xml, **/src/mango/nosetests.xml, **/test/javascript/junit.xml'
-          //   }
-          //   failure {
-          //     dir( "${platform}/build/couchdb" ) {
-          //       sh 'make build-report'
-          //     }
-          //   }
-          //   cleanup {
-          //     sh 'killall -9 beam.smp || true'
-          //     sh 'rm -rf ${WORKSPACE}/* ${COUCHDB_IO_LOG_DIR} || true'
-          //   }
-          // }
         }
       }
     }
@@ -171,7 +158,7 @@ def generateNativeStage(platform) {
 
 def generateContainerStage(platform) {
   return {
-    stage(meta[platform].name) {
+    stage(platform) {
       node('docker') {
         docker.withRegistry('https://docker.io/', 'dockerhub_creds') {
           docker.image(meta[platform].image).inside("${DOCKER_ARGS}") {
@@ -219,49 +206,8 @@ def generateContainerStage(platform) {
     }
   }
 }
-      // stages {
-      //   stage('Build from tarball & test') {
-      //     steps {
-      //       sh( script: 'rm -rf apache-couchdb-*', label: 'Clean workspace' )
-      //       unstash 'tarball'
-      //       sh( script: unpack, label: 'Unpack tarball' )
-      //       dir( "${platform}/build/couchdb" ) {
-      //         sh 'pwd'
-      //         sh 'ls -l'
-      //         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'
-      //       }
-      //     }
-      //     post {
-      //       always {
-      //         junit '**/.eunit/*.xml, **/_build/*/lib/couchdbtest/*.xml, **/src/mango/nosetests.xml, **/test/javascript/junit.xml'
-      //       }
-      //       failure {
-      //         dir( "${platform}/build/couchdb" ) {
-      //           sh 'make build-report'
-      //         }
-      //       }
-      //     }
-      //   }
-
-      //   stage('Build CouchDB packages') {
-      //     steps {
-      //       unstash 'tarball'
-      //       sh( script: make_packages, label: 'Build packages' )
-      //       sh( script: cleanup_and_save, label: 'Stage package artifacts for archival' )
-      //     }
-      //     post {
-      //       success {
-      //         archiveArtifacts artifacts: 'pkgs/**', fingerprint: true
-      //       }
-      //     }
-      //   }
-//       }
 
+// Haven't yet included this cleanup action to take place after the combo of container stages
 //       post {
 //         cleanup {
 //           sh 'rm -rf ${WORKSPACE}/*'