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/08 17:51:58 UTC

[couchdb] branch junit-reports-and-jenkins-env updated (9d121f6 -> e4bb0e4)

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

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


 discard 9d121f6  Extend timeout for mrview_purge_docs_fabric
    omit 3a8c780  Merge branch 'master' into junit-reports-and-jenkins-env
    omit e71eafd  Increase default HTTP timeouts
    omit 2a5d0e8  Configure environment for Elixir on ARM
    omit 780f471  Avoid shebang length limits on jenkins
    omit d460c1e  Move couch startup to a fixture
    omit 0533bb2  Add timeout for couch_db_split_tests
    omit d59ab94  Capture EUnit and ExUnit test results for Jenkins
    omit 9bc9d22  Refactor using sequential stages, in workspace
    omit bec80ee  Fix copy/paste errors in platform naming
     new af46ba7  Fix copy/paste errors in platform naming
     new 0fd1ba7  Refactor using sequential stages, in workspace
     new 26f39a9  Capture EUnit and ExUnit test results for Jenkins
     new 45cc06d  Avoid shebang length limits on jenkins
     new e4bb0e4  Configure environment for Elixir on ARM

This update added new revisions after undoing existing revisions.
That is to say, some revisions that were in the old version of the
branch are not in the new version.  This situation occurs
when a user --force pushes a change and generates a repository
containing something like this:

 * -- * -- B -- O -- O -- O   (9d121f6)
            \
             N -- N -- N   refs/heads/junit-reports-and-jenkins-env (e4bb0e4)

You should already have received notification emails for all of the O
revisions, and so the following emails describe only the N revisions
from the common base, B.

Any revisions marked "omit" are not gone; other references still
refer to them.  Any revisions marked "discard" are gone forever.

The 5 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:
 src/couch/test/eunit/couch_db_split_tests.erl      |  3 +-
 .../eunit/couch_mrview_purge_docs_fabric_tests.erl | 10 +--
 .../test/eunit/ddoc_cache_no_cache_test.erl        | 76 +++++++++++-----------
 test/elixir/lib/couch.ex                           |  4 +-
 4 files changed, 47 insertions(+), 46 deletions(-)


[couchdb] 04/05: Avoid shebang length limits on jenkins

Posted by ko...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit 45cc06dbc13f39282cf77023b2847ebd34931fdf
Author: Adam Kocoloski <ko...@apache.org>
AuthorDate: Wed Aug 7 11:18:15 2019 -0400

    Avoid shebang length limits on jenkins
    
    The `pip3` and `nosetest` executables are scripts, and on jenkins
    the specified interpreter can exceed the 128 character length limit
    because of the deeply-nested workspace. Invoking these as modules seems
    the preferred workaround per pypa/pip#1773
---
 Makefile | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/Makefile b/Makefile
index f5d15d4..8f85ab8 100644
--- a/Makefile
+++ b/Makefile
@@ -370,8 +370,8 @@ build-test:
 mango-test: devclean all
 	@cd src/mango && \
 		python3 -m venv .venv && \
-		.venv/bin/pip3 install -r requirements.txt
-	@cd src/mango && ../../dev/run -n 1 --admin=testuser:testpass .venv/bin/nosetests
+		.venv/bin/python3 -m pip install -r requirements.txt
+	@cd src/mango && ../../dev/run -n 1 --admin=testuser:testpass '.venv/bin/python3 -m nose'
 
 ################################################################################
 # Developing


[couchdb] 05/05: Configure environment for Elixir on ARM

Posted by ko...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit e4bb0e4ad507b9ba6d8ed7816fcb22ac1e3d5153
Author: Adam Kocoloski <ko...@apache.org>
AuthorDate: Wed Aug 7 11:37:12 2019 -0400

    Configure environment for Elixir on ARM
    
    These settings are required to prevent Mix & Hex from trying to install
    packages into / on the ARM host.
---
 Jenkinsfile | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/Jenkinsfile b/Jenkinsfile
index f37e9bf..f8f6a2f 100644
--- a/Jenkinsfile
+++ b/Jenkinsfile
@@ -457,7 +457,9 @@ pipeline {
             stage('Build from tarball & test') {
               steps {
                 unstash 'tarball'
-                sh( script: build_and_test )
+                withEnv(['MIX_HOME='+pwd(), 'HEX_HOME='+pwd()]) {
+                  sh( script: build_and_test )
+                }
               }
               post {
                 always {


[couchdb] 03/05: Capture EUnit and ExUnit test results for Jenkins

Posted by ko...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit 26f39a997c20b926f56f63fc44a30289280012b7
Author: Adam Kocoloski <ko...@apache.org>
AuthorDate: Tue Aug 6 21:12:18 2019 -0400

    Capture EUnit and ExUnit test results for Jenkins
---
 Jenkinsfile         | 38 ++++++++++++++++++++++++++++++++++++++
 mix.exs             |  1 +
 rebar.config.script |  2 +-
 3 files changed, 40 insertions(+), 1 deletion(-)

diff --git a/Jenkinsfile b/Jenkinsfile
index b2deb8e..f37e9bf 100644
--- a/Jenkinsfile
+++ b/Jenkinsfile
@@ -144,6 +144,9 @@ pipeline {
             } // withEnv
           } // steps
           post {
+            always {
+              junit '**/.eunit/*.xml, **/_build/*/lib/couchdbtest/*.xml'
+            }
             cleanup {
               sh 'rm -rf $COUCHDB_IO_LOG_DIR'
             }
@@ -173,6 +176,11 @@ pipeline {
                 unstash 'tarball'
                 sh( script: build_and_test )
               }
+              post {
+                always {
+                  junit '**/.eunit/*.xml, **/_build/*/lib/couchdbtest/*.xml'
+                }
+              }
             }
             stage('Build CouchDB packages') {
               steps {
@@ -215,6 +223,11 @@ pipeline {
                 unstash 'tarball'
                 sh( script: build_and_test )
               }
+              post {
+                always {
+                  junit '**/.eunit/*.xml, **/_build/*/lib/couchdbtest/*.xml'
+                }
+              }
             }
             stage('Build CouchDB packages') {
               steps {
@@ -258,6 +271,11 @@ pipeline {
                 unstash 'tarball'
                 sh( script: build_and_test )
               }
+              post {
+                always {
+                  junit '**/.eunit/*.xml, **/_build/*/lib/couchdbtest/*.xml'
+                }
+              }
             }
             stage('Build CouchDB packages') {
               steps {
@@ -300,6 +318,11 @@ pipeline {
                 unstash 'tarball'
                 sh( script: build_and_test )
               }
+              post {
+                always {
+                  junit '**/.eunit/*.xml, **/_build/*/lib/couchdbtest/*.xml'
+                }
+              }
             }
             stage('Build CouchDB packages') {
               steps {
@@ -342,6 +365,11 @@ pipeline {
                 unstash 'tarball'
                 sh( script: build_and_test )
               }
+              post {
+                always {
+                  junit '**/.eunit/*.xml, **/_build/*/lib/couchdbtest/*.xml'
+                }
+              }
             }
             stage('Build CouchDB packages') {
               steps {
@@ -384,6 +412,11 @@ pipeline {
                 unstash 'tarball'
                 sh( script: build_and_test )
               }
+              post {
+                always {
+                  junit '**/.eunit/*.xml, **/_build/*/lib/couchdbtest/*.xml'
+                }
+              }
             }
             stage('Build CouchDB packages') {
               steps {
@@ -426,6 +459,11 @@ pipeline {
                 unstash 'tarball'
                 sh( script: build_and_test )
               }
+              post {
+                always {
+                  junit '**/.eunit/*.xml, **/_build/*/lib/couchdbtest/*.xml'
+                }
+              }
             }
             stage('Build CouchDB packages') {
               steps {
diff --git a/mix.exs b/mix.exs
index 2e213ae..43c8b6d 100644
--- a/mix.exs
+++ b/mix.exs
@@ -35,6 +35,7 @@ defmodule CouchDBTest.Mixfile do
   # Run "mix help deps" to learn about dependencies.
   defp deps() do
     [
+      {:junit_formatter, "~> 3.0", only: [:dev, :test, :integration]},
       {:httpotion, "~> 3.0", only: [:dev, :test, :integration], runtime: false},
       {:jiffy, path: Path.expand("src/jiffy", __DIR__)},
       {:ibrowse,
diff --git a/rebar.config.script b/rebar.config.script
index 6445057..c38b6e2 100644
--- a/rebar.config.script
+++ b/rebar.config.script
@@ -156,7 +156,7 @@ AddConfig = [
     {sub_dirs, SubDirs},
     {lib_dirs, ["src"]},
     {erl_opts, [{i, "../"} | ErlOpts]},
-    {eunit_opts, [verbose]},
+    {eunit_opts, [verbose, {report,{eunit_surefire,[{dir,"."}]}}]},
     {plugins, [eunit_plugin]},
     {dialyzer, [
         {plt_location, local},


[couchdb] 02/05: Refactor using sequential stages, in workspace

Posted by ko...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit 0fd1ba7345a861351a1addce301b701af5292bb7
Author: Adam Kocoloski <ko...@apache.org>
AuthorDate: Tue Aug 6 16:49:52 2019 -0400

    Refactor using sequential stages, in workspace
    
    This work moves the builds back into the workspace, using a separate
    sub-directory per platform to avoid clashes between builds caused by
    JENKINS-57454. It also breaks out the steps into a pair of sequential
    stages within each each parallel stage of the build, which gives us
    better visibility into the progress of the build, and also sets us up
    to capture test results and expose them directly via Jenkins UI for
    faster problem determination.
---
 Jenkinsfile | 249 ++++++++++++++++++++++++++++++++++++++++++------------------
 1 file changed, 177 insertions(+), 72 deletions(-)

diff --git a/Jenkinsfile b/Jenkinsfile
index 3c49b76..b2deb8e 100644
--- a/Jenkinsfile
+++ b/Jenkinsfile
@@ -14,35 +14,33 @@
 // the License.
 
 // DRYing out the Jenkinsfile...
-build_script = '''
-mkdir -p ${COUCHDB_IO_LOG_DIR}
 
-echo
-echo "Build CouchDB from tarball & test"
-builddir=$(mktemp -d)
-cd ${builddir}
+build_and_test = '''
+mkdir -p ${COUCHDB_IO_LOG_DIR}
+rm -rf build
+mkdir build
+cd build
 tar -xf ${WORKSPACE}/apache-couchdb-*.tar.gz
 cd apache-couchdb-*
 ./configure --with-curl
 make check || (build-aux/logfile-uploader.py && false)
+'''
 
-echo
-echo "Build CouchDB packages"
-cd ${builddir}
+make_packages = '''
 git clone https://github.com/apache/couchdb-pkg
+rm -rf couchdb
 mkdir couchdb
 cp ${WORKSPACE}/apache-couchdb-*.tar.gz couchdb
 tar -xf ${WORKSPACE}/apache-couchdb-*.tar.gz -C couchdb
 cd couchdb-pkg
 make ${platform} PLATFORM=${platform}
+'''
 
-echo
-echo "Cleanup & save for posterity"
+cleanup_and_save = '''
 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
-rm -rf ${builddir} ${COUCHDB_IO_LOG_DIR}
+mv ${WORKSPACE}/rpmbuild/RPMS/$(arch)/*rpm ${WORKSPACE}/pkgs/${platform} || true
+mv ${WORKSPACE}/couchdb/*.deb ${WORKSPACE}/pkgs/${platform} || true
 '''
 
 pipeline {
@@ -113,11 +111,7 @@ pipeline {
     // https://issues.jenkins-ci.org/browse/JENKINS-47962
     // https://issues.jenkins-ci.org/browse/JENKINS-48050
 
-    // The builddir stuff is to prevent all the builds from live syncing
-    // their build results to each other during the build, which ACTUALLY
-    // HAPPENS. Ugh.
-
-    stage('make check') {
+    stage('Test and Package') {
 
       parallel {
 
@@ -138,18 +132,22 @@ pipeline {
                 mkdir -p $COUCHDB_IO_LOG_DIR
 
                 # Build CouchDB from tarball & test
-                builddir=$(mktemp -d)
-                cd $builddir
+                mkdir build
+                cd build
                 tar -xf $WORKSPACE/apache-couchdb-*.tar.gz
                 cd apache-couchdb-*
                 ./configure --with-curl
                 gmake check || (build-aux/logfile-uploader.py && false)
 
                 # No package build for FreeBSD at this time
-                rm -rf $builddir $COUCHDB_IO_LOG_DIR
               '''
             } // withEnv
           } // steps
+          post {
+            cleanup {
+              sh 'rm -rf $COUCHDB_IO_LOG_DIR'
+            }
+          } // post
         } // stage FreeBSD
 
         stage('CentOS 6') {
@@ -158,6 +156,8 @@ pipeline {
               image 'couchdbdev/centos-6-erlang-19.3.6:latest'
               alwaysPull true
               label 'ubuntu'
+              // this keeps builds landing on the same host from clashing with each other
+              customWorkspace pwd() + '/centos6'
             }
           }
           options {
@@ -167,14 +167,28 @@ pipeline {
           environment {
             platform = 'centos6'
           }
-          steps {
-            sh 'rm -f apache-couchdb-*.tar.gz'
-            unstash 'tarball'
-            sh( script: build_script )
-          } // steps
+          stages {
+            stage('Build from tarball & test') {
+              steps {
+                unstash 'tarball'
+                sh( script: build_and_test )
+              }
+            }
+            stage('Build CouchDB packages') {
+              steps {
+                sh( script: make_packages )
+                sh( script: cleanup_and_save )
+              }
+              post {
+                success {
+                  archiveArtifacts artifacts: 'pkgs/**', fingerprint: true
+                }
+              }
+            }
+          } // stages
           post {
-            success {
-              archiveArtifacts artifacts: 'pkgs/**', fingerprint: true
+            cleanup {
+              sh 'rm -rf ${WORKSPACE}/*'
             }
           } // post
         } // stage
@@ -185,6 +199,7 @@ pipeline {
               image 'couchdbdev/centos-7-erlang-19.3.6:latest'
               alwaysPull true
               label 'ubuntu'
+              customWorkspace pwd() + '/centos7'
             }
           }
           options {
@@ -194,14 +209,29 @@ pipeline {
           environment {
             platform = 'centos7'
           }
-          steps {
-            sh 'rm -f apache-couchdb-*.tar.gz'
-            unstash 'tarball'
-            sh( script: build_script )
-          } // steps
+          stages {
+            stage('Build from tarball & test') {
+              steps {
+                unstash 'tarball'
+                sh( script: build_and_test )
+              }
+            }
+            stage('Build CouchDB packages') {
+              steps {
+                unstash 'tarball'
+                sh( script: make_packages )
+                sh( script: cleanup_and_save )
+              }
+              post {
+                success {
+                  archiveArtifacts artifacts: 'pkgs/**', fingerprint: true
+                }
+              }
+            }
+          } // stages
           post {
-            success {
-              archiveArtifacts artifacts: 'pkgs/**', fingerprint: true
+            cleanup {
+              sh 'rm -rf ${WORKSPACE}/*'
             }
           } // post
         } // stage
@@ -212,6 +242,7 @@ pipeline {
               image 'couchdbdev/ubuntu-xenial-erlang-19.3.6:latest'
               alwaysPull true
               label 'ubuntu'
+              customWorkspace pwd() + '/xenial'
             }
           }
           options {
@@ -221,14 +252,28 @@ pipeline {
           environment {
             platform = 'xenial'
           }
-          steps {
-            sh 'rm -f apache-couchdb-*.tar.gz'
-            unstash 'tarball'
-            sh( script: build_script )
-          } // steps
+          stages {
+            stage('Build from tarball & test') {
+              steps {
+                unstash 'tarball'
+                sh( script: build_and_test )
+              }
+            }
+            stage('Build CouchDB packages') {
+              steps {
+                sh( script: make_packages )
+                sh( script: cleanup_and_save )
+              }
+              post {
+                success {
+                  archiveArtifacts artifacts: 'pkgs/**', fingerprint: true
+                }
+              }
+            }
+          } // stages
           post {
-            success {
-              archiveArtifacts artifacts: 'pkgs/**', fingerprint: true
+            cleanup {
+              sh 'rm -rf ${WORKSPACE}/*'
             }
           } // post
         } // stage
@@ -239,6 +284,7 @@ pipeline {
               image 'couchdbdev/ubuntu-bionic-erlang-19.3.6:latest'
               alwaysPull true
               label 'ubuntu'
+              customWorkspace pwd() + '/bionic'
             }
           }
           options {
@@ -248,14 +294,28 @@ pipeline {
           environment {
             platform = 'bionic'
           }
-          steps {
-            sh 'rm -f apache-couchdb-*.tar.gz'
-            unstash 'tarball'
-            sh( script: build_script )
-          } // steps
+          stages {
+            stage('Build from tarball & test') {
+              steps {
+                unstash 'tarball'
+                sh( script: build_and_test )
+              }
+            }
+            stage('Build CouchDB packages') {
+              steps {
+                sh( script: make_packages )
+                sh( script: cleanup_and_save )
+              }
+              post {
+                success {
+                  archiveArtifacts artifacts: 'pkgs/**', fingerprint: true
+                }
+              }
+            }
+          } // stages
           post {
-            success {
-              archiveArtifacts artifacts: 'pkgs/**', fingerprint: true
+            cleanup {
+              sh 'rm -rf ${WORKSPACE}/*'
             }
           } // post
         } // stage
@@ -266,6 +326,7 @@ pipeline {
               image 'couchdbdev/debian-jessie-erlang-19.3.6:latest'
               alwaysPull true
               label 'ubuntu'
+              customWorkspace pwd() + '/jessie'
             }
           }
           options {
@@ -275,14 +336,28 @@ pipeline {
           environment {
             platform = 'jessie'
           }
-          steps {
-            sh 'rm -f apache-couchdb-*.tar.gz'
-            unstash 'tarball'
-            sh( script: build_script )
-          } // steps
+          stages {
+            stage('Build from tarball & test') {
+              steps {
+                unstash 'tarball'
+                sh( script: build_and_test )
+              }
+            }
+            stage('Build CouchDB packages') {
+              steps {
+                sh( script: make_packages )
+                sh( script: cleanup_and_save )
+              }
+              post {
+                success {
+                  archiveArtifacts artifacts: 'pkgs/**', fingerprint: true
+                }
+              }
+            }
+          } // stages
           post {
-            success {
-              archiveArtifacts artifacts: 'pkgs/**', fingerprint: true
+            cleanup {
+              sh 'rm -rf ${WORKSPACE}/*'
             }
           } // post
         } // stage
@@ -293,6 +368,7 @@ pipeline {
               image 'couchdbdev/debian-stretch-erlang-19.3.6:latest'
               alwaysPull true
               label 'ubuntu'
+              customWorkspace pwd() + '/stretch'
             }
           }
           options {
@@ -302,14 +378,28 @@ pipeline {
           environment {
             platform = 'stretch'
           }
-          steps {
-            sh 'rm -f apache-couchdb-*.tar.gz'
-            unstash 'tarball'
-            sh( script: build_script )
-          } // steps
+          stages {
+            stage('Build from tarball & test') {
+              steps {
+                unstash 'tarball'
+                sh( script: build_and_test )
+              }
+            }
+            stage('Build CouchDB packages') {
+              steps {
+                sh( script: make_packages )
+                sh( script: cleanup_and_save )
+              }
+              post {
+                success {
+                  archiveArtifacts artifacts: 'pkgs/**', fingerprint: true
+                }
+              }
+            }
+          } // stages
           post {
-            success {
-              archiveArtifacts artifacts: 'pkgs/**', fingerprint: true
+            cleanup {
+              sh 'rm -rf ${WORKSPACE}/*'
             }
           } // post
         } // stage
@@ -320,6 +410,7 @@ pipeline {
               image 'couchdbdev/aarch64-debian-stretch-erlang-20.3.8.20:latest'
               alwaysPull true
               label 'arm'
+              customWorkspace pwd() + '/arm'
             }
           }
           options {
@@ -329,14 +420,28 @@ pipeline {
           environment {
             platform = 'aarch64-debian-stretch'
           }
-          steps {
-            sh 'rm -f apache-couchdb-*.tar.gz'
-            unstash 'tarball'
-            sh( script: build_script )
-          } // steps
+          stages {
+            stage('Build from tarball & test') {
+              steps {
+                unstash 'tarball'
+                sh( script: build_and_test )
+              }
+            }
+            stage('Build CouchDB packages') {
+              steps {
+                sh( script: make_packages )
+                sh( script: cleanup_and_save )
+              }
+              post {
+                success {
+                  archiveArtifacts artifacts: 'pkgs/**', fingerprint: true
+                }
+              }
+            }
+          } // stages
           post {
-            success {
-              archiveArtifacts artifacts: 'pkgs/**', fingerprint: true
+            cleanup {
+              sh 'rm -rf ${WORKSPACE}/*'
             }
           } // post
         } // stage
@@ -442,7 +547,7 @@ pipeline {
         body: "Boo, we failed. ${env.RUN_DISPLAY_URL}"
     }
     cleanup {
-      sh 'rm -rf ${WORKSPACE}/*'
+      sh 'rm -rf ${COUCHDB_IO_LOG_DIR}'
     }
   }
 


[couchdb] 01/05: Fix copy/paste errors in platform naming

Posted by ko...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit af46ba779e0ef9112a5c5ae39264301e0bde91f5
Author: Adam Kocoloski <ko...@apache.org>
AuthorDate: Tue Aug 6 16:48:24 2019 -0400

    Fix copy/paste errors in platform naming
---
 Jenkinsfile | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/Jenkinsfile b/Jenkinsfile
index c575748..3c49b76 100644
--- a/Jenkinsfile
+++ b/Jenkinsfile
@@ -246,7 +246,7 @@ pipeline {
             timeout(time: 90, unit: "MINUTES")
           }
           environment {
-            platform = 'xenial'
+            platform = 'bionic'
           }
           steps {
             sh 'rm -f apache-couchdb-*.tar.gz'
@@ -300,7 +300,7 @@ pipeline {
             timeout(time: 90, unit: "MINUTES")
           }
           environment {
-            platform = 'jessie'
+            platform = 'stretch'
           }
           steps {
             sh 'rm -f apache-couchdb-*.tar.gz'
@@ -327,7 +327,7 @@ pipeline {
             timeout(time: 90, unit: "MINUTES")
           }
           environment {
-            platform = 'jessie'
+            platform = 'aarch64-debian-stretch'
           }
           steps {
             sh 'rm -f apache-couchdb-*.tar.gz'