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 2019/08/01 00:32:50 UTC

[couchdb] 01/02: Defer cleanup to post so we can grab test results

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

kocolosk pushed a commit to branch jenkins-junit-reports-and-jenkins-env
in repository https://gitbox.apache.org/repos/asf/couchdb.git

commit 0512f6b02ec18c3185e31c35db72b91c18c4e7f9
Author: Adam Kocoloski <ko...@apache.org>
AuthorDate: Wed Jul 31 20:31:10 2019 -0400

    Defer cleanup to post so we can grab test results
    
    Also temporarily shorten the test suite to improve debug cycle
---
 Jenkinsfile | 63 +++++++++++++++++++++++++++++++++++++++++++------------------
 1 file changed, 45 insertions(+), 18 deletions(-)

diff --git a/Jenkinsfile b/Jenkinsfile
index ecb64ba..937ff8e 100644
--- a/Jenkinsfile
+++ b/Jenkinsfile
@@ -24,7 +24,7 @@ cd ${builddir}
 tar -xf ${WORKSPACE}/apache-couchdb-*.tar.gz
 cd apache-couchdb-*
 ./configure --with-curl
-make check || (build-aux/logfile-uploader.py && false)
+make elixir || (build-aux/logfile-uploader.py && false)
 
 echo
 echo "Build CouchDB packages"
@@ -42,11 +42,7 @@ rm -rf ${WORKSPACE}/pkgs/${platform}
 mkdir -p ${WORKSPACE}/pkgs/${platform}
 mv ../rpmbuild/RPMS/$(arch)/*rpm ${WORKSPACE}/pkgs/${platform} || true
 mv ../couchdb/*.deb ${WORKSPACE}/pkgs/${platform} || true
-mkdir -p ${WORKSPACE}/test-results/${platform}-${arch}
 find ../couchdb -name "*.xml"
-mv ../couchdb/src/*/.eunit/*.xml ${WORKSPACE}/test-results/${platform}-${arch}/ || true
-mv ../couchdb/_build/*/lib/couchdbtest/*.xml ${WORKSPACE}/test-results/${platform}-${arch}/ || true
-rm -rf ${builddir} ${COUCHDB_IO_LOG_DIR}
 '''
 
 pipeline {
@@ -147,21 +143,24 @@ pipeline {
                 tar -xf $WORKSPACE/apache-couchdb-*.tar.gz
                 cd apache-couchdb-*
                 ./configure --with-curl
-                gmake check || (build-aux/logfile-uploader.py && false)
+                gmake elixir || (build-aux/logfile-uploader.py && false)
 
-                mkdir -p ${WORKSPACE}/test-results/freebsd
                 find . -name "*.xml"
-                mv src/*/.eunit/*.xml ${WORKSPACE}/test-results/${platform}-${arch}/ || true
-                mv _build/*/lib/couchdbtest/*.xml ${WORKSPACE}/test-results/freebsd/ || true
+
                 # No package build for FreeBSD at this time
-                rm -rf $builddir $COUCHDB_IO_LOG_DIR
               '''
             } // withEnv
           } // steps
           post {
             always {
-              junit '${WORKSPACE}/test-results/freebsd/*.xml'
+              junit '${builddir}/apache-couchdb-*/src/*/.eunit/*.xml'
+              junit '${builddir}/apache-couchdb-*/_build/*/lib/couchdbtest/*.xml'
+            }
+            cleanup {
+              sh 'rm -rf ${builddir} ${COUCHDB_IO_LOG_DIR}'
             }
+        }
+
           } // post
         } // stage FreeBSD
 
@@ -187,11 +186,15 @@ pipeline {
           } // steps
           post {
             always {
-              junit '${WORKSPACE}/test-results/${platform}-${arch}/*.xml'
+              junit '${builddir}/couchdb/src/*/.eunit/*.xml'
+              junit '${builddir}/couchdb/_build/*/lib/couchdbtest/*.xml'
             }
             success {
               archiveArtifacts artifacts: 'pkgs/**', fingerprint: true
             }
+            cleanup {
+              sh 'rm -rf ${builddir} ${COUCHDB_IO_LOG_DIR}'
+            }
           } // post
         } // stage
 
@@ -217,11 +220,15 @@ pipeline {
           } // steps
           post {
             always {
-              junit '${WORKSPACE}/test-results/${platform}-${arch}/*.xml'
+              junit '${builddir}/couchdb/src/*/.eunit/*.xml'
+              junit '${builddir}/couchdb/_build/*/lib/couchdbtest/*.xml'
             }
             success {
               archiveArtifacts artifacts: 'pkgs/**', fingerprint: true
             }
+            cleanup {
+              sh 'rm -rf ${builddir} ${COUCHDB_IO_LOG_DIR}'
+            }
           } // post
         } // stage
 
@@ -247,11 +254,15 @@ pipeline {
           } // steps
           post {
             always {
-              junit '${WORKSPACE}/test-results/${platform}-${arch}/*.xml'
+              junit '${builddir}/couchdb/src/*/.eunit/*.xml'
+              junit '${builddir}/couchdb/_build/*/lib/couchdbtest/*.xml'
             }
             success {
               archiveArtifacts artifacts: 'pkgs/**', fingerprint: true
             }
+            cleanup {
+              sh 'rm -rf ${builddir} ${COUCHDB_IO_LOG_DIR}'
+            }
           } // post
         } // stage
 
@@ -277,11 +288,15 @@ pipeline {
           } // steps
           post {
             always {
-              junit '${WORKSPACE}/test-results/${platform}-${arch}/*.xml'
+              junit '${builddir}/couchdb/src/*/.eunit/*.xml'
+              junit '${builddir}/couchdb/_build/*/lib/couchdbtest/*.xml'
             }
             success {
               archiveArtifacts artifacts: 'pkgs/**', fingerprint: true
             }
+            cleanup {
+              sh 'rm -rf ${builddir} ${COUCHDB_IO_LOG_DIR}'
+            }
           } // post
         } // stage
 
@@ -307,11 +322,15 @@ pipeline {
           } // steps
           post {
             always {
-              junit '${WORKSPACE}/test-results/${platform}-${arch}/*.xml'
+              junit '${builddir}/couchdb/src/*/.eunit/*.xml'
+              junit '${builddir}/couchdb/_build/*/lib/couchdbtest/*.xml'
             }
             success {
               archiveArtifacts artifacts: 'pkgs/**', fingerprint: true
             }
+            cleanup {
+              sh 'rm -rf ${builddir} ${COUCHDB_IO_LOG_DIR}'
+            }
           } // post
         } // stage
 
@@ -337,11 +356,15 @@ pipeline {
           } // steps
           post {
             always {
-              junit '${WORKSPACE}/test-results/${platform}-${arch}/*.xml'
+              junit '${builddir}/couchdb/src/*/.eunit/*.xml'
+              junit '${builddir}/couchdb/_build/*/lib/couchdbtest/*.xml'
             }
             success {
               archiveArtifacts artifacts: 'pkgs/**', fingerprint: true
             }
+            cleanup {
+              sh 'rm -rf ${builddir} ${COUCHDB_IO_LOG_DIR}'
+            }
           } // post
         } // stage
 
@@ -369,11 +392,15 @@ pipeline {
           } // steps
           post {
             always {
-              junit '${WORKSPACE}/test-results/${platform}-${arch}/*.xml'
+              junit '${builddir}/couchdb/src/*/.eunit/*.xml'
+              junit '${builddir}/couchdb/_build/*/lib/couchdbtest/*.xml'
             }
             success {
               archiveArtifacts artifacts: 'pkgs/**', fingerprint: true
             }
+            cleanup {
+              sh 'rm -rf ${builddir} ${COUCHDB_IO_LOG_DIR}'
+            }
           } // post
         } // stage