You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@couchdb.apache.org by wo...@apache.org on 2019/12/11 23:14:36 UTC

[couchdb] branch jenkins-mini-test updated (ed7aff4 -> 89cfbce)

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

wohali pushed a change to branch jenkins-mini-test
in repository https://gitbox.apache.org/repos/asf/couchdb.git.


 discard ed7aff4  Add mini Jenkins build (1 platform only)
     add 4815eeb  Allow all params to be passed via body for POST view
     add 8ac108a  Allow all params to be passed via body for POST _all_docs
     add ff0da20  Add COUCHDB_FAUXTON_DOCROOT comment to couchdb.cmd
     add 71d673f  Remove invalid query server def in local.ini
     add 57fa67f  Port couch_compress_tests to Elixir
     add 4dbd7c1  Big endian support for couch_compress tests
     add 27d4458  Merge pull request #2346 from willholley/couch_compress_tests
     add 63c9da6  Fix timeout case clause in fabric_db_info
     add 897085c  Merge pull request #2351 from apache/2530-all-dbs-timeout
     add cda9430  Fix multidb changes test
     new 89cfbce  Add mini Jenkins build (1 platform only)

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   (ed7aff4)
            \
             N -- N -- N   refs/heads/jenkins-mini-test (89cfbce)

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 1 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:
 rel/files/couchdb.cmd.in                       |   1 +
 rel/overlay/etc/local.ini                      |   3 -
 src/chttpd/src/chttpd_db.erl                   |   2 +-
 src/chttpd/src/chttpd_show.erl                 |   2 +-
 src/chttpd/src/chttpd_view.erl                 |  19 ++--
 src/couch/src/couch_multidb_changes.erl        |   5 +-
 src/couch/test/eunit/couch_compress_tests.erl  |  85 ---------------
 src/couch/test/exunit/couch_compress_tests.exs | 113 +++++++++++++++++++
 src/couch_mrview/src/couch_mrview_http.erl     |  26 ++++-
 src/couch_mrview/src/couch_mrview_show.erl     |   2 +-
 src/couch_mrview/src/couch_mrview_util.erl     |   1 -
 src/fabric/src/fabric_db_info.erl              |   2 +-
 test/elixir/test/all_docs_test.exs             | 110 +++++++++++++++++++
 test/elixir/test/design_docs_test.exs          | 108 +++++++++++++++++++
 test/elixir/test/local_docs_test.exs           | 110 +++++++++++++++++++
 test/elixir/test/view_test.exs                 | 143 +++++++++++++++++++++++++
 16 files changed, 624 insertions(+), 108 deletions(-)
 delete mode 100644 src/couch/test/eunit/couch_compress_tests.erl
 create mode 100644 src/couch/test/exunit/couch_compress_tests.exs
 create mode 100644 test/elixir/test/design_docs_test.exs
 create mode 100644 test/elixir/test/local_docs_test.exs
 create mode 100644 test/elixir/test/view_test.exs


[couchdb] 01/01: Add mini Jenkins build (1 platform only)

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

wohali pushed a commit to branch jenkins-mini-test
in repository https://gitbox.apache.org/repos/asf/couchdb.git

commit 89cfbce7611c1f9909c2e4932ab6f249bf928a0f
Author: Joan Touzet <jo...@atypical.net>
AuthorDate: Wed Dec 4 17:55:37 2019 -0500

    Add mini Jenkins build (1 platform only)
---
 build-aux/Jenkinsfile.mini | 244 +++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 244 insertions(+)

diff --git a/build-aux/Jenkinsfile.mini b/build-aux/Jenkinsfile.mini
new file mode 100644
index 0000000..e7c51ec
--- /dev/null
+++ b/build-aux/Jenkinsfile.mini
@@ -0,0 +1,244 @@
+#!groovy
+//
+//
+// Licensed under the Apache License, Version 2.0 (the "License"); you may not
+// use this file except in compliance with the License. You may obtain a copy of
+// the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+// License for the specific language governing permissions and limitations under
+// the License.
+
+// DRYing out the Jenkinsfile...
+
+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)
+'''
+
+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}
+'''
+
+cleanup_and_save = '''
+rm -rf ${WORKSPACE}/pkgs/${platform}
+mkdir -p ${WORKSPACE}/pkgs/${platform}
+mv ${WORKSPACE}/rpmbuild/RPMS/$(arch)/*rpm ${WORKSPACE}/pkgs/${platform} || true
+mv ${WORKSPACE}/couchdb/*.deb ${WORKSPACE}/pkgs/${platform} || true
+'''
+
+pipeline {
+
+  //agent {
+  //  label 'ubuntu'
+  //}
+  agent any
+
+  environment {
+    COUCHAUTH = credentials('couchdb_vm2_couchdb')
+    recipient = 'notifications@couchdb.apache.org'
+    COUCHDB_IO_LOG_DIR = '/tmp/couchjslogs'
+    // Following fix an issue with git <= 2.6.5 where no committer
+    // name or email are present for reflog, required for git clone
+    GIT_COMMITTER_NAME = 'Jenkins User'
+    GIT_COMMITTER_EMAIL = 'couchdb@apache.org'
+  }
+
+  options {
+    buildDiscarder(logRotator(numToKeepStr: '10', artifactNumToKeepStr: '10'))
+    // This fails the build immediately if any parallel step fails
+    parallelsAlwaysFailFast()
+    preserveStashes(buildCount: 10)
+    timeout(time: 3, unit: 'HOURS')
+  }
+
+  stages {
+    stage('Build Release Tarball') {
+      agent {
+        // https://github.com/jenkins-infra/jenkins.io/blob/master/Jenkinsfile#64
+        // We need the jenkins user mapped inside of the image
+        // npm config cache below is required because /home/jenkins doesn't
+        // ACTUALLY exist in the image
+        docker {
+          image 'couchdbdev/debian-stretch-erlang-19.3.6:latest'
+          alwaysPull true
+          args '-e npm_config_cache=npm-cache -e HOME=. -v=/etc/passwd:/etc/passwd -v /etc/group:/etc/group'
+        }
+      }
+      options {
+        timeout(time: 15, unit: "MINUTES")
+      }
+      steps {
+        sh '''
+          set
+          rm -rf apache-couchdb-*
+          ./configure --with-curl
+          make dist
+          chmod -R a+w * .
+        '''
+      }
+      post {
+        success {
+          stash includes: 'apache-couchdb-*.tar.gz', name: 'tarball'
+          archiveArtifacts artifacts: 'apache-couchdb-*.tar.gz', fingerprint: true
+        }
+        cleanup {
+          // UGH see https://issues.jenkins-ci.org/browse/JENKINS-41894
+          sh 'rm -rf ${WORKSPACE}/*'
+        }
+      }
+    } // stage Build Release Tarball
+
+    // TODO Rework once Improved Docker Pipeline Engine is released
+    // https://issues.jenkins-ci.org/browse/JENKINS-47962
+    // https://issues.jenkins-ci.org/browse/JENKINS-48050
+
+    stage('Test and Package') {
+
+      agent {
+        docker {
+          image 'couchdbdev/debian-stretch-erlang-19.3.6:latest'
+          alwaysPull true
+          //label 'ubuntu'
+          customWorkspace pwd() + '/stretch'
+        }
+      }
+      options {
+        skipDefaultCheckout()
+        timeout(time: 90, unit: "MINUTES")
+      }
+      environment {
+        platform = 'stretch'
+      }
+      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'
+            }
+          }
+        }
+        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 "Test and Package"
+
+    stage('Publish') {
+
+      when {
+        expression { return env.BRANCH_NAME ==~ /master|2.0.x|2.1.x|jenkins-.*/ }
+      }
+
+      agent {
+        docker {
+          image 'couchdbdev/debian-stretch-erlang-19.3.6:latest'
+          alwaysPull true
+          args '-e npm_config_cache=npm-cache -e HOME=. -v=/etc/passwd:/etc/passwd -v /etc/group:/etc/group'
+          //label 'ubuntu'
+        }
+      }
+      options {
+        skipDefaultCheckout()
+        timeout(time: 90, unit: "MINUTES")
+      }
+
+      steps {
+        withCredentials([sshUserPrivateKey(credentialsId: 'jenkins-key', keyFileVariable: 'SSH_KEY')]) {
+          sh 'rm -rf ${WORKSPACE}/*'
+          unstash 'tarball'
+          unarchive mapping: ['pkgs/' : '.']
+  
+          echo 'Retrieving & cleaning current couchdb-vm2 tree...'
+          sh '''
+            rsync -avz -e "ssh -o StrictHostKeyChecking=no -i $SSH_KEY" jenkins@couchdb-vm2.apache.org:/var/www/html/$BRANCH_NAME . || mkdir -p $BRANCH_NAME
+            rm -rf $BRANCH_NAME/debian/* $BRANCH_NAME/el6/* $BRANCH_NAME/el7/*
+            mkdir -p $BRANCH_NAME/debian $BRANCH_NAME/el6 $BRANCH_NAME/el7 $BRANCH_NAME/source
+            rsync -avz -e "ssh -o StrictHostKeyChecking=no -i $SSH_KEY" jenkins@couchdb-vm2.apache.org:/var/www/html/js .
+          '''
+
+          echo 'Building Debian repo...'
+          sh '''
+            git clone https://github.com/apache/couchdb-pkg
+            cp js/debian-stretch/*.deb pkgs/stretch
+            reprepro -b couchdb-pkg/repo includedeb stretch pkgs/stretch/*.deb
+          '''
+
+          echo 'Building tree to upload...'
+          sh '''
+            mv couchdb-pkg/repo/pool $BRANCH_NAME/debian
+            mv couchdb-pkg/repo/dists $BRANCH_NAME/debian
+            mv apache-couchdb-*.tar.gz $BRANCH_NAME/source
+            cd $BRANCH_NAME/source
+            ls -1tr | head -n -10 | xargs -d '\n' rm -f --
+            cd ../..
+          '''
+
+          echo 'rsyncing tree to couchdb-vm2...'
+          sh '''
+            rsync -avz --delete -e "ssh -o StrictHostKeyChecking=no -i $SSH_KEY" $BRANCH_NAME jenkins@couchdb-vm2.apache.org:/var/www/html
+            rm -rf $BRANCH_NAME couchdb-pkg *.tar.gz
+          '''
+        } // withCredentials
+      } // steps
+    } // stage
+  } // stages
+
+  post {
+    success {
+      mail to: "${env.recipient}",
+        replyTo: "${env.recipient}",
+        subject: "[Jenkins] Mini build SUCCESS: ${currentBuild.fullDisplayName}",
+        body: "Yay, we passed. ${env.RUN_DISPLAY_URL}"
+    }
+    unstable {
+      mail to: "${env.recipient}",
+        replyTo: "${env.recipient}",
+        subject: "[Jenkins] Mini build SUCCESS: ${currentBuild.fullDisplayName}",
+        body: "Eep! Build is unstable... ${env.RUN_DISPLAY_URL}"
+    }
+    failure {
+      mail to: "${env.recipient}",
+        replyTo: "${env.recipient}",
+        subject: "[Jenkins] Mini build FAILURE: ${currentBuild.fullDisplayName}",
+        body: "Boo, we failed. ${env.RUN_DISPLAY_URL}"
+    }
+    cleanup {
+      sh 'rm -rf ${COUCHDB_IO_LOG_DIR}'
+    }
+  }
+
+} // pipeline