Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 3FB26200CED for ; Fri, 14 Jul 2017 08:10:34 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 3E77216D4EC; Fri, 14 Jul 2017 06:10:34 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 6013216D4F3 for ; Fri, 14 Jul 2017 08:10:33 +0200 (CEST) Received: (qmail 23555 invoked by uid 500); 14 Jul 2017 06:10:32 -0000 Mailing-List: contact commits-help@couchdb.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@couchdb.apache.org Delivered-To: mailing list commits@couchdb.apache.org Received: (qmail 23545 invoked by uid 99); 14 Jul 2017 06:10:32 -0000 Received: from ec2-52-202-80-70.compute-1.amazonaws.com (HELO gitbox.apache.org) (52.202.80.70) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 14 Jul 2017 06:10:32 +0000 Received: by gitbox.apache.org (ASF Mail Server at gitbox.apache.org, from userid 33) id DAF2787562; Fri, 14 Jul 2017 06:10:31 +0000 (UTC) Date: Fri, 14 Jul 2017 06:10:32 +0000 To: "commits@couchdb.apache.org" Subject: [couchdb] 01/01: Build Debian/RHEL repos and rsync them to couchdb-vm2 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit From: wohali@apache.org Reply-To: "commits@couchdb.apache.org" In-Reply-To: <150001263175.15434.14213446001590018824@gitbox.apache.org> References: <150001263175.15434.14213446001590018824@gitbox.apache.org> X-Git-Host: gitbox.apache.org X-Git-Repo: couchdb X-Git-Refname: refs/heads/jenkins-build-packages X-Git-Reftype: branch X-Git-Rev: bd5cbe6cd632360ba06e813a08f237f2094adf75 X-Git-NotificationType: diff X-Git-Multimail-Version: 1.5.dev Auto-Submitted: auto-generated Message-Id: <20170714061031.DAF2787562@gitbox.apache.org> archived-at: Fri, 14 Jul 2017 06:10:34 -0000 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 bd5cbe6cd632360ba06e813a08f237f2094adf75 Author: Joan Touzet AuthorDate: Fri Jul 14 01:37:51 2017 -0400 Build Debian/RHEL repos and rsync them to couchdb-vm2 --- Jenkinsfile | 63 ++++++++++++++++++++++++++++++++++++++++++------------------- 1 file changed, 44 insertions(+), 19 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 2c26bbc..6d6c87f 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -53,10 +53,8 @@ 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: { @@ -89,7 +87,7 @@ pipeline { cd ../couchdb-pkg # centos only platform=centos6 - make $platform + make $platform PLATFORM=$platform mkdir -p $cwd/pkgs/$platform # CentOS variant mv ~/rpmbuild/RPMS/x86_64/*rpm $cwd/pkgs/$platform || true @@ -155,7 +153,7 @@ pipeline { cd ../couchdb-pkg # centos only platform=centos7 - make $platform + make $platform PLATFORM=$platform mkdir -p $cwd/pkgs/$platform # CentOS variant mv ~/rpmbuild/RPMS/x86_64/*rpm $cwd/pkgs/$platform || true @@ -245,7 +243,7 @@ pipeline { # debian/ubuntu only sudo apt-get install -y libmozjs185-dev platform=$(lsb_release -cs) - make $platform + make $platform PLATFORM=$platform mkdir -p $cwd/pkgs/$platform # Ubuntu/Debian variant mv ../couchdb/*deb $cwd/pkgs/$platform || true @@ -312,7 +310,7 @@ pipeline { # debian/ubuntu only sudo apt-get install -y libmozjs185-dev platform=$(lsb_release -cs) - make $platform + make $platform PLATFORM=$platform mkdir -p $cwd/pkgs/$platform # Ubuntu/Debian variant mv ../couchdb/*deb $cwd/pkgs/$platform || true @@ -379,7 +377,7 @@ pipeline { # debian/ubuntu only sudo apt-get install -y libmozjs185-dev platform=$(lsb_release -cs) - make $platform + make $platform PLATFORM=$platform mkdir -p $cwd/pkgs/$platform # Ubuntu/Debian variant mv ../couchdb/*deb $cwd/pkgs/$platform || true @@ -395,7 +393,6 @@ pipeline { ) // parallel } // steps } // stage -END SPEED RUN */ stage('Publish') { when { @@ -410,16 +407,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-id_rsa', 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" .