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/18 02:25:53 UTC

[couchdb] 02/02: Try to get back to good working state

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

commit 6e11dffccc354a5b3826041a7a5658523b455403
Author: Adam Kocoloski <ko...@apache.org>
AuthorDate: Mon Jan 17 21:25:40 2022 -0500

    Try to get back to good working state
---
 build-aux/Jenkinsfile.full | 54 ++++++++++++++++++++++------------------------
 1 file changed, 26 insertions(+), 28 deletions(-)

diff --git a/build-aux/Jenkinsfile.full b/build-aux/Jenkinsfile.full
index 7355d6c..e7e00af 100644
--- a/build-aux/Jenkinsfile.full
+++ b/build-aux/Jenkinsfile.full
@@ -133,7 +133,7 @@ def generateNativeStage(platform) {
     stage("${meta[platform].name} - build & test") {
       node(platform) {
         timeout(time: 90, unit: "MINUTES") {
-          // try {
+          try {
             // deleteDir is OK here because we're not inside of a Docker container!
             deleteDir()
             unstash 'tarball'
@@ -155,19 +155,18 @@ def generateNativeStage(platform) {
                 sh '$MAKE mango-test'
               }
             }
-          // }
-          // catch (err) {
-          //   echo "Build failed: {$err}"
-          //   dir( "${platform}/build/couchdb" ) {
-          //     sh 'make build-report'
-          //   }
-          // }
-          // finally {
+          }
+          catch (err) {
+            echo "Build failed: {$err}"
+            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'
-            dir( "${COUCHDB_IO_LOG_DIR}" ) { deleteDir() }
-            deleteDir()
-          // }
+            sh 'rm -rf ${WORKSPACE}/* ${COUCHDB_IO_LOG_DIR}'
+          }
         }
       }
     }
@@ -184,8 +183,8 @@ def generateContainerStage(platform) {
             timeout(time: 90, unit: "MINUTES") {
               withEnv(['PLATFORM='+platform]) {
                 stage("${meta[platform].name} - build & test") {
-                  sh( script: 'rm -rf apache-couchdb-*', label: 'Clean workspace' )
-                  // try {
+                  try {
+                    sh( script: 'rm -rf apache-couchdb-*', label: 'Clean workspace' )
                     unstash 'tarball'
                     sh( script: unpack, label: 'Unpack tarball' )
                     dir( "${platform}/build/couchdb" ) {
@@ -196,20 +195,19 @@ def generateContainerStage(platform) {
                       sh 'make exunit'
                       sh 'make mango-test'
                     }
-                  // }
-                  // catch (err) {
-                  //   echo "Build failed: {$err}"
-                  //   sh 'ls -l ${WORKSPACE}'
-                  //   dir( "${platform}/build/couchdb" ) {
-                  //     sh 'pwd; ls -l'
-                  //     sh 'make build-report'
-                  //   }
-                  // }
-                  // finally {
+                  }
+                  catch (err) {
+                    echo "Build failed: {$err}"
+                    sh 'ls -l ${WORKSPACE}'
+                    dir( "${platform}/build/couchdb" ) {
+                      sh 'pwd; ls -l'
+                      sh 'make build-report'
+                    }
+                  }
+                  finally {
                     junit '**/.eunit/*.xml, **/_build/*/lib/couchdbtest/*.xml, **/src/mango/nosetests.xml, **/test/javascript/junit.xml'
-                    dir( "${COUCHDB_IO_LOG_DIR}" ) { deleteDir() }
-                    deleteDir()
-                  // }
+                    sh 'rm -rf ${WORKSPACE}/* ${COUCHDB_IO_LOG_DIR}'
+                  }
                 }
 
                 stage("${meta[platform].name} - package") {
@@ -225,7 +223,7 @@ def generateContainerStage(platform) {
                   //   sh 'ls -l ${WORKSPACE}'
                   // }
                   // finally {
-                    deleteDir()
+                    // deleteDir()
                   // }
                 }
               }