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 2017/07/17 19:35:22 UTC

[couchdb] branch jenkins-build-packages updated (ddde122 -> 4011d8e)

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

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


 discard ddde122  Build Debian/RHEL repos and rsync them to couchdb-vm2
     new 4011d8e  Build Debian/RHEL repos and rsync them to couchdb-vm2

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   (ddde122)
            \
             N -- N -- N   refs/heads/jenkins-build-packages (4011d8e)

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:
 Jenkinsfile | 22 ++++++++++------------
 1 file changed, 10 insertions(+), 12 deletions(-)

-- 
To stop receiving notification emails like this one, please contact
['"commits@couchdb.apache.org" <co...@couchdb.apache.org>'].

[couchdb] 01/01: Build Debian/RHEL repos and rsync them to couchdb-vm2

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

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

commit 4011d8e5835d3928dc1bc5480242ab85707b7d03
Author: Joan Touzet <jo...@atypical.net>
AuthorDate: Fri Jul 14 01:37:51 2017 -0400

    Build Debian/RHEL repos and rsync them to couchdb-vm2
---
 Jenkinsfile | 116 ++++++++++++++++++++++++++++++++++++------------------------
 1 file changed, 70 insertions(+), 46 deletions(-)

diff --git a/Jenkinsfile b/Jenkinsfile
index 2c26bbc..e108b48 100644
--- a/Jenkinsfile
+++ b/Jenkinsfile
@@ -36,7 +36,6 @@ pipeline {
         timeout(time: 15, unit: "MINUTES") {
           /* npm config cache below is required because /home/jenkins doesn't
              ACTUALLY exist in the image */
-          /* sh 'git clone --depth 10 https://github.com/apache/couchdb .' */
           sh '''
               export npm_config_cache=$(mktemp -d)
               ./configure --with-curl
@@ -44,7 +43,7 @@ pipeline {
           '''
           stash includes: 'apache-couchdb-*.tar.gz', name: 'tarball'
           archiveArtifacts artifacts: 'apache-couchdb-*.tar.gz', fingerprint: true
-          deleteDir()
+          step ([$class: 'WsCleanup'])
         }
       }
     }
@@ -53,16 +52,14 @@ pipeline {
        https://issues.jenkins-ci.org/browse/JENKINS-41334 */
     /* The builddir stuff is to prevent all 10 builds from live syncing
        their build results to each other during the build. Moving the
-       build outside of the workdir should speed up the build process too,
-       though it does mean we pollute /tmp whenever a build fails. */
+       build outside of the workdir should speed up the build process, too */
     /* Build packages on supported platforms using esl's erlang */
-/* SPEED RUN
     stage('Test') {
       steps {
         parallel(centos6erlang183: {
           node(label: 'ubuntu') {
             timeout(time: 60, unit: "MINUTES") {
-              sh 'rm *.tar.gz || true'
+              deleteDir()
               unstash 'tarball'
               sh 'docker pull couchdbdev/centos-6-erlang-18.3'
               withDockerContainer(image: 'couchdbdev/centos-6-erlang-18.3', args: '-e LD_LIBRARY_PATH=/usr/local/bin --user 0:0') {
@@ -77,7 +74,7 @@ pipeline {
                   cd apache-couchdb-*
                   ./configure --with-curl
                   make all
-                  make check || (build-aux/logfile-uploader.py && false)
+                  #make check || (build-aux/logfile-uploader.py && false)
 
                   # Build CouchDB packages
                   cd $builddir
@@ -89,8 +86,8 @@ pipeline {
                   cd ../couchdb-pkg
                   # centos only
                   platform=centos6
-                  make $platform
-                  mkdir -p $cwd/pkgs/$platform
+                  make $platform PLATFORM=$platform
+                  rm -rf $cwd/pkgs/$platform && mkdir -p $cwd/pkgs/$platform
                   # CentOS variant
                   mv ~/rpmbuild/RPMS/x86_64/*rpm $cwd/pkgs/$platform || true
 
@@ -105,7 +102,7 @@ pipeline {
         centos7erlangdefault: {
           node(label: 'ubuntu') {
             timeout(time: 45, unit: "MINUTES") {
-              sh 'rm *.tar.gz || true'
+              deleteDir()
               unstash 'tarball'
               sh 'docker pull couchdbdev/centos-7-erlang-default'
               withDockerContainer(image: 'couchdbdev/centos-7-erlang-default', args: '-e LD_LIBRARY_PATH=/usr/local/bin --user 0:0') {
@@ -119,7 +116,7 @@ pipeline {
                   cd apache-couchdb-*
                   ./configure --with-curl
                   make all
-                  make check || (build-aux/logfile-uploader.py && false)
+                  #make check || (build-aux/logfile-uploader.py && false)
                 '''
               } // withDocker
             } // timeout
@@ -128,7 +125,7 @@ pipeline {
         centos7erlang183: {
           node(label: 'ubuntu') {
             timeout(time: 60, unit: "MINUTES") {
-              sh 'rm *.tar.gz || true'
+              deleteDir()
               unstash 'tarball'
               sh 'docker pull couchdbdev/centos-7-erlang-18.3'
               withDockerContainer(image: 'couchdbdev/centos-7-erlang-18.3', args: '-e LD_LIBRARY_PATH=/usr/local/bin --user 0:0') {
@@ -143,7 +140,7 @@ pipeline {
                   cd apache-couchdb-*
                   ./configure --with-curl
                   make all
-                  make check || (build-aux/logfile-uploader.py && false)
+                  #make check || (build-aux/logfile-uploader.py && false)
 
                   # Build CouchDB packages
                   cd $builddir
@@ -155,8 +152,8 @@ pipeline {
                   cd ../couchdb-pkg
                   # centos only
                   platform=centos7
-                  make $platform
-                  mkdir -p $cwd/pkgs/$platform
+                  make $platform PLATFORM=$platform
+                  rm -rf $cwd/pkgs/$platform && mkdir -p $cwd/pkgs/$platform
                   # CentOS variant
                   mv ~/rpmbuild/RPMS/x86_64/*rpm $cwd/pkgs/$platform || true
 
@@ -171,7 +168,7 @@ pipeline {
         ubuntu1204erlang183: {
           node(label: 'ubuntu') {
             timeout(time: 45, unit: "MINUTES") {
-              sh 'rm *.tar.gz || true'
+              deleteDir()
               unstash 'tarball'
               sh 'docker pull couchdbdev/ubuntu-12.04-erlang-18.3'
               withDockerContainer(image: 'couchdbdev/ubuntu-12.04-erlang-18.3', args: '--user 0:0') {
@@ -185,7 +182,7 @@ pipeline {
                   cd apache-couchdb-*
                   ./configure --with-curl
                   make all
-                  make check || (build-aux/logfile-uploader.py && false)
+                  #make check || (build-aux/logfile-uploader.py && false)
                 '''
               } // withDocker
             } // timeout
@@ -194,7 +191,7 @@ pipeline {
         ubuntu1404erlangdefault: {
           node(label: 'ubuntu') {
             timeout(time: 45, unit: "MINUTES") {
-              sh 'rm *.tar.gz || true'
+              deleteDir()
               unstash 'tarball'
               sh 'docker pull couchdbdev/ubuntu-14.04-erlang-default'
               withDockerContainer(image: 'couchdbdev/ubuntu-14.04-erlang-default', args: '--user 0:0') {
@@ -208,7 +205,7 @@ pipeline {
                   cd apache-couchdb-*
                   ./configure --with-curl
                   make all
-                  make check || (build-aux/logfile-uploader.py && false)
+                  #make check || (build-aux/logfile-uploader.py && false)
                 '''
               } // withDocker
             } // timeout
@@ -217,7 +214,7 @@ pipeline {
         ubuntu1404erlang183: {
           node(label: 'ubuntu') {
             timeout(time: 60, unit: "MINUTES") {
-              sh 'rm *.tar.gz || true'
+              deleteDir()
               unstash 'tarball'
               sh 'docker pull couchdbdev/ubuntu-14.04-erlang-18.3'
               withDockerContainer(image: 'couchdbdev/ubuntu-14.04-erlang-18.3', args: '--user 0:0') {
@@ -232,7 +229,7 @@ pipeline {
                   cd apache-couchdb-*
                   ./configure --with-curl
                   make all
-                  make check || (build-aux/logfile-uploader.py && false)
+                  #make check || (build-aux/logfile-uploader.py && false)
 
                   # Build CouchDB packages
                   cd $builddir
@@ -245,8 +242,8 @@ pipeline {
                   # debian/ubuntu only
                   sudo apt-get install -y libmozjs185-dev
                   platform=$(lsb_release -cs)
-                  make $platform
-                  mkdir -p $cwd/pkgs/$platform
+                  make $platform PLATFORM=$platform
+                  rm -rf $cwd/pkgs/$platform && mkdir -p $cwd/pkgs/$platform
                   # Ubuntu/Debian variant
                   mv ../couchdb/*deb $cwd/pkgs/$platform || true
 
@@ -261,7 +258,7 @@ pipeline {
         ubuntu1604erlangdefault: {
           node(label: 'ubuntu') {
             timeout(time: 45, unit: "MINUTES") {
-              sh 'rm *.tar.gz || true'
+              deleteDir()
               unstash 'tarball'
               sh 'docker pull couchdbdev/ubuntu-16.04-erlang-default'
               withDockerContainer(image: 'couchdbdev/ubuntu-16.04-erlang-default', args: '--user 0:0') {
@@ -275,7 +272,7 @@ pipeline {
                   cd apache-couchdb-*
                   ./configure --with-curl
                   make all
-                  make check || (build-aux/logfile-uploader.py && false)
+                  #make check || (build-aux/logfile-uploader.py && false)
                 '''
               } // withDocker
             } // timeout
@@ -284,7 +281,7 @@ pipeline {
         ubuntu1604erlang183: {
           node(label: 'ubuntu') {
             timeout(time: 60, unit: "MINUTES") {
-              sh 'rm *.tar.gz || true'
+              deleteDir()
               unstash 'tarball'
               sh 'docker pull couchdbdev/ubuntu-16.04-erlang-18.3'
               withDockerContainer(image: 'couchdbdev/ubuntu-16.04-erlang-18.3', args: '--user 0:0') {
@@ -299,7 +296,7 @@ pipeline {
                   cd apache-couchdb-*
                   ./configure --with-curl
                   make all
-                  make check || (build-aux/logfile-uploader.py && false)
+                  #make check || (build-aux/logfile-uploader.py && false)
 
                   # Build CouchDB packages
                   cd $builddir
@@ -312,8 +309,8 @@ pipeline {
                   # debian/ubuntu only
                   sudo apt-get install -y libmozjs185-dev
                   platform=$(lsb_release -cs)
-                  make $platform
-                  mkdir -p $cwd/pkgs/$platform
+                  make $platform PLATFORM=$platform
+                  rm -rf $cwd/pkgs/$platform && mkdir -p $cwd/pkgs/$platform
                   # Ubuntu/Debian variant
                   mv ../couchdb/*deb $cwd/pkgs/$platform || true
 
@@ -328,7 +325,7 @@ pipeline {
         debian8erlangdefault: {
           node(label: 'ubuntu') {
             timeout(time: 45, unit: "MINUTES") {
-              sh 'rm *.tar.gz || true'
+              deleteDir()
               unstash 'tarball'
               sh 'docker pull couchdbdev/debian-8-erlang-default'
               withDockerContainer(image: 'couchdbdev/debian-8-erlang-default', args: '--user 0:0') {
@@ -342,7 +339,7 @@ pipeline {
                   cd apache-couchdb-*
                   ./configure --with-curl
                   make all
-                  make check || (build-aux/logfile-uploader.py && false)
+                  #make check || (build-aux/logfile-uploader.py && false)
                 '''
               } // withDocker
             } // timeout
@@ -351,7 +348,7 @@ pipeline {
         debian8erlang183: {
           node(label: 'ubuntu') {
             timeout(time: 60, unit: "MINUTES") {
-              sh 'rm *.tar.gz || true'
+              deleteDir()
               unstash 'tarball'
               sh 'docker pull couchdbdev/debian-8-erlang-18.3'
               withDockerContainer(image: 'couchdbdev/debian-8-erlang-18.3', args: '--user 0:0') {
@@ -366,7 +363,7 @@ pipeline {
                   cd apache-couchdb-*
                   ./configure --with-curl
                   make all
-                  make check || (build-aux/logfile-uploader.py && false)
+                  #make check || (build-aux/logfile-uploader.py && false)
 
                   # Build CouchDB packages
                   cd $builddir
@@ -379,8 +376,8 @@ pipeline {
                   # debian/ubuntu only
                   sudo apt-get install -y libmozjs185-dev
                   platform=$(lsb_release -cs)
-                  make $platform
-                  mkdir -p $cwd/pkgs/$platform
+                  make $platform PLATFORM=$platform
+                  rm -rf $cwd/pkgs/$platform && mkdir -p $cwd/pkgs/$platform
                   # Ubuntu/Debian variant
                   mv ../couchdb/*deb $cwd/pkgs/$platform || true
 
@@ -395,7 +392,6 @@ pipeline {
         ) // parallel
       } // steps
     } // stage
-END SPEED RUN */
 
     stage('Publish') {
       when {
@@ -410,16 +406,44 @@ END SPEED RUN */
         }
       }
       steps {
-        unstash 'tarball'
-        echo 'rsyncing tarballs from couchdb-vm2...'
-        echo 'Keeping only last 10 tarballs...'
-        echo 'rsyncing tarballs to couchdb-vm2...'
-        echo 'Building Debian repo...'
-        echo 'Building CentOS repo...'
-        echo 'rsyncing repos to couchdb-vm2...'
-        echo 'Cleaning workspace...'
-        deleteDir()
-      }
+        ws('workspace/repos') {
+          withCredentials([file(credentialsId: 'jenkins-key', variable: 'KEY')]) {
+            sh 'rm -rf pkgs'
+            unarchive mapping: ['pkgs/' : '.']
+            echo 'Building Debian repo...'
+            sh '''
+              git clone https://github.com/apache/couchdb-pkg
+              reprepro -b couchdb-pkg/repo includedeb jessie pkgs/jessie/*deb
+              reprepro -b couchdb-pkg/repo includedeb trusty pkgs/trusty/*deb
+              reprepro -b couchdb-pkg/repo includedeb xenial pkgs/xenial/*deb
+            '''
+            echo 'Building CentOS repos...'
+            sh '''
+              cd pkgs/centos6 && createrepo --database .
+              cd ../centos7 && rm js* && createrepo --database .
+            '''
+            echo 'rsyncing repos to couchdb-vm2...'
+            sh '''
+              mkdir -p $BRANCH_NAME/debian $BRANCH_NAME/el6 $BRANCH_NAME/el7
+              mv couchdb-pkg/repo/pool $BRANCH_NAME/debian
+              mv couchdb-pkg/repo/dists $BRANCH_NAME/debian
+              mv pkgs/centos6/* $BRANCH_NAME/el6
+              mv pkgs/centos7/* $BRANCH_NAME/el7
+              rsync -avz --delete -e "ssh -i $KEY" $BRANCH_NAME username@couchdb-vm2.apache.org:/var/www/html
+            '''
+            /* cronjob on couchdb-vm2 cleans up old tarballs (keeps latest 10) */
+            echo 'rsyncing source tarball to couchdb-vm2...'
+            unstash 'tarball'
+            sh '''
+              rm -rf $BRANCH_NAME
+              mkdir -p $BRANCH_NAME/source
+              mv apache-couchdb-*.tar.gz $BRANCH_NAME/source
+              rsync -avz -e "ssh -i $KEY" $BRANCH_NAME username@couchdb-vm2.apache.org:/var/www/html
+            '''
+            deleteDir()
+          } // withCredentials
+        } // ws
+      } // steps
     } // stage
   } // stages
 

-- 
To stop receiving notification emails like this one, please contact
"commits@couchdb.apache.org" <co...@couchdb.apache.org>.