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 CD001200CD7 for ; Mon, 17 Jul 2017 22:40:29 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id CB724161348; Mon, 17 Jul 2017 20:40:29 +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 C2EBF16126C for ; Mon, 17 Jul 2017 22:40:28 +0200 (CEST) Received: (qmail 67821 invoked by uid 500); 17 Jul 2017 20:40:28 -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 67812 invoked by uid 99); 17 Jul 2017 20:40:27 -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; Mon, 17 Jul 2017 20:40:27 +0000 Received: by gitbox.apache.org (ASF Mail Server at gitbox.apache.org, from userid 33) id D216381644; Mon, 17 Jul 2017 20:40:24 +0000 (UTC) Date: Mon, 17 Jul 2017 20:40:25 +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: <150032402479.16261.3165082106322623481@gitbox.apache.org> References: <150032402479.16261.3165082106322623481@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: 95df069cd9459dc8dec266b06dccfc6cb3848303 X-Git-NotificationType: diff X-Git-Multimail-Version: 1.5.dev Auto-Submitted: auto-generated Message-Id: <20170717204025.D216381644@gitbox.apache.org> archived-at: Mon, 17 Jul 2017 20:40:30 -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 95df069cd9459dc8dec266b06dccfc6cb3848303 Author: Joan Touzet AuthorDate: Fri Jul 14 01:37:51 2017 -0400 Build Debian/RHEL repos and rsync them to couchdb-vm2 --- Jenkinsfile | 153 ++++++++++++++++++++++++++++++++++++------------------------ 1 file changed, 93 insertions(+), 60 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 2c26bbc..0bfb97d 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -26,21 +26,24 @@ pipeline { stage('Build') { agent { docker { - /* This image has the oldest Erlang we support, 16B03 */ + label 'ubuntu' + // This image has the oldest Erlang we support, 16B03 image 'couchdbdev/ubuntu-14.04-erlang-default' - /* We need the jenkins user mapped inside of the image */ - args '-v /etc/passwd:/etc/passwd -v /etc/group:/etc/group' + // run as build user + args '-u 1000:1000' + // We need the jenkins user mapped inside of the image + //args '-v /etc/passwd:/etc/passwd -v /etc/group:/etc/group' } } steps { 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 .' */ + // npm config cache below is required because /home/jenkins doesn't + // ACTUALLY exist in the image sh ''' - export npm_config_cache=$(mktemp -d) - ./configure --with-curl - make dist + #export npm_config_cache=$(mktemp -d) + ./configure --with-curl + make dist + chmod -R a+w * ''' stash includes: 'apache-couchdb-*.tar.gz', name: 'tarball' archiveArtifacts artifacts: 'apache-couchdb-*.tar.gz', fingerprint: true @@ -49,20 +52,20 @@ pipeline { } } - /* TODO rework this once JENKINS-41334 is released - 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 packages on supported platforms using esl's erlang */ -/* SPEED RUN + // TODO rework this once JENKINS-41334 is released + // 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 + // Build packages on supported platforms using esl's erlang +/* stage('Test') { steps { + echo 'test!' 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 +80,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 +92,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 +108,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 +122,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 +131,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 +146,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 +158,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 +174,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 +188,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 +197,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 +211,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 +220,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 +235,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 +248,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 +264,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 +278,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 +287,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 +302,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 +315,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 +331,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 +345,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 +354,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 +369,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 +382,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 +398,7 @@ pipeline { ) // parallel } // steps } // stage -END SPEED RUN */ +*/ stage('Publish') { when { @@ -403,23 +406,53 @@ END SPEED RUN */ } agent { docker { - /* This image has the deb AND rpm repo tools installed in it */ + // This image has the deb AND rpm repo tools installed in it image 'couchdbdev/debian-8-base' - /* We need the jenkins user mapped inside of the image */ + // We need the jenkins user mapped inside of the image args '-v /etc/passwd:/etc/passwd -v /etc/group:/etc/group' + label 'ubuntu' } } 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() - } + echo 'foo!' +// 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" .