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/12 22:51:52 UTC
[couchdb] 01/01: Build packages on supported platforms
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 a22779247182f32543932fe097c02b8ec8284017
Author: Joan Touzet <jo...@atypical.net>
AuthorDate: Wed Jul 12 18:48:10 2017 -0400
Build packages on supported platforms
---
Jenkinsfile | 124 +++++++++++++++++++++++++++++++++++++++++++++++++++++++-----
1 file changed, 114 insertions(+), 10 deletions(-)
diff --git a/Jenkinsfile b/Jenkinsfile
index 6fbb7e7..6db55b8 100644
--- a/Jenkinsfile
+++ b/Jenkinsfile
@@ -55,6 +55,7 @@ pipeline {
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 */
stage('Test') {
steps {
parallel(centos6erlang183: {
@@ -66,8 +67,9 @@ pipeline {
withDockerContainer(image: 'couchdbdev/centos-6-erlang-18.3', args: '-e LD_LIBRARY_PATH=/usr/local/bin --user 0:0') {
sh '''
cwd=$(pwd)
- rm -rf /tmp/couchjslogs
- mkdir -p /tmp/couchjslogs
+ rm -rf /tmp/couchjslogs && mkdir -p /tmp/couchjslogs
+
+ # Build CouchDB from tarball
builddir=$(mktemp -d)
cd $builddir
tar -xf $cwd/apache-couchdb-*.tar.gz
@@ -75,9 +77,28 @@ pipeline {
./configure --with-curl
make all
make check || (build-aux/logfile-uploader.py && false)
+
+ # Build CouchDB packages
+ cd $builddir
+ git clone https://github.com/apache/couchdb-pkg
+ mkdir couchdb
+ cd couchdb
+ cp $cwd/apache-couchdb-*.tar.gz .
+ tar -xf apache-couchdb-*.tar.gz
+ cd ../couchdb-pkg
+ # centos only
+ platform=centos6|centos7
+ make $platform
+ mkdir -p $cwd/pkgs/$platform
+ # CentOS variant
+ mv ~/rpmbuild/RPMS/x86_64/*rpm $cwd/pkgs/$platform || true
+
+ # Cleanup
+ cd $cwd && rm -rf $builddir
'''
} // withDocker
} // timeout
+ archiveArtifacts artifacts: 'pkgs/**', fingerprint: true
} // node
},
centos7erlangdefault: {
@@ -112,8 +133,9 @@ pipeline {
withDockerContainer(image: 'couchdbdev/centos-7-erlang-18.3', args: '-e LD_LIBRARY_PATH=/usr/local/bin --user 0:0') {
sh '''
cwd=$(pwd)
- rm -rf /tmp/couchjslogs
- mkdir -p /tmp/couchjslogs
+ rm -rf /tmp/couchjslogs && mkdir -p /tmp/couchjslogs
+
+ # Build CouchDB from tarball
builddir=$(mktemp -d)
cd $builddir
tar -xf $cwd/apache-couchdb-*.tar.gz
@@ -121,9 +143,28 @@ pipeline {
./configure --with-curl
make all
make check || (build-aux/logfile-uploader.py && false)
+
+ # Build CouchDB packages
+ cd $builddir
+ git clone https://github.com/apache/couchdb-pkg
+ mkdir couchdb
+ cd couchdb
+ cp $cwd/apache-couchdb-*.tar.gz .
+ tar -xf apache-couchdb-*.tar.gz
+ cd ../couchdb-pkg
+ # centos only
+ platform=centos6|centos7
+ make $platform
+ mkdir -p $cwd/pkgs/$platform
+ # CentOS variant
+ mv ~/rpmbuild/RPMS/x86_64/*rpm $cwd/pkgs/$platform || true
+
+ # Cleanup
+ cd $cwd && rm -rf $builddir
'''
} // withDocker
} // timeout
+ archiveArtifacts artifacts: 'pkgs/**', fingerprint: true
} // node
},
ubuntu1204erlang183: {
@@ -181,8 +222,9 @@ pipeline {
withDockerContainer(image: 'couchdbdev/ubuntu-14.04-erlang-18.3', args: '--user 0:0') {
sh '''
cwd=$(pwd)
- rm -rf /tmp/couchjslogs
- mkdir -p /tmp/couchjslogs
+ rm -rf /tmp/couchjslogs && mkdir -p /tmp/couchjslogs
+
+ # Build CouchDB from tarball
builddir=$(mktemp -d)
cd $builddir
tar -xf $cwd/apache-couchdb-*.tar.gz
@@ -190,9 +232,29 @@ pipeline {
./configure --with-curl
make all
make check || (build-aux/logfile-uploader.py && false)
+
+ # Build CouchDB packages
+ cd $builddir
+ git clone https://github.com/apache/couchdb-pkg
+ mkdir couchdb
+ cd couchdb
+ cp $cwd/apache-couchdb-*.tar.gz .
+ tar -xf apache-couchdb-*.tar.gz
+ cd ../couchdb-pkg
+ # debian/ubuntu only
+ sudo apt-get install libmozjs185-dev
+ platform=$(lsb_release -cs)
+ make $platform
+ mkdir -p $cwd/pkgs/$platform
+ # Ubuntu/Debian variant
+ mv ../couchdb/*deb $cwd/pkgs/$platform || true
+
+ # Cleanup
+ cd $cwd && rm -rf $builddir
'''
} // withDocker
} // timeout
+ archiveArtifacts artifacts: 'pkgs/**', fingerprint: true
} // node
},
ubuntu1604erlangdefault: {
@@ -227,8 +289,9 @@ pipeline {
withDockerContainer(image: 'couchdbdev/ubuntu-16.04-erlang-18.3', args: '--user 0:0') {
sh '''
cwd=$(pwd)
- rm -rf /tmp/couchjslogs
- mkdir -p /tmp/couchjslogs
+ rm -rf /tmp/couchjslogs && mkdir -p /tmp/couchjslogs
+
+ # Build CouchDB from tarball
builddir=$(mktemp -d)
cd $builddir
tar -xf $cwd/apache-couchdb-*.tar.gz
@@ -236,9 +299,29 @@ pipeline {
./configure --with-curl
make all
make check || (build-aux/logfile-uploader.py && false)
+
+ # Build CouchDB packages
+ cd $builddir
+ git clone https://github.com/apache/couchdb-pkg
+ mkdir couchdb
+ cd couchdb
+ cp $cwd/apache-couchdb-*.tar.gz .
+ tar -xf apache-couchdb-*.tar.gz
+ cd ../couchdb-pkg
+ # debian/ubuntu only
+ sudo apt-get install libmozjs185-dev
+ platform=$(lsb_release -cs)
+ make $platform
+ mkdir -p $cwd/pkgs/$platform
+ # Ubuntu/Debian variant
+ mv ../couchdb/*deb $cwd/pkgs/$platform || true
+
+ # Cleanup
+ cd $cwd && rm -rf $builddir
'''
} // withDocker
} // timeout
+ archiveArtifacts artifacts: 'pkgs/**', fingerprint: true
} // node
},
debian8erlangdefault: {
@@ -273,8 +356,9 @@ pipeline {
withDockerContainer(image: 'couchdbdev/debian-8-erlang-18.3', args: '--user 0:0') {
sh '''
cwd=$(pwd)
- rm -rf /tmp/couchjslogs
- mkdir -p /tmp/couchjslogs
+ rm -rf /tmp/couchjslogs && mkdir -p /tmp/couchjslogs
+
+ # Build CouchDB from tarball
builddir=$(mktemp -d)
cd $builddir
tar -xf $cwd/apache-couchdb-*.tar.gz
@@ -282,9 +366,29 @@ pipeline {
./configure --with-curl
make all
make check || (build-aux/logfile-uploader.py && false)
+
+ # Build CouchDB packages
+ cd $builddir
+ git clone https://github.com/apache/couchdb-pkg
+ mkdir couchdb
+ cd couchdb
+ cp $cwd/apache-couchdb-*.tar.gz .
+ tar -xf apache-couchdb-*.tar.gz
+ cd ../couchdb-pkg
+ # debian/ubuntu only
+ sudo apt-get install libmozjs185-dev
+ platform=$(lsb_release -cs)
+ make $platform
+ mkdir -p $cwd/pkgs/$platform
+ # Ubuntu/Debian variant
+ mv ../couchdb/*deb $cwd/pkgs/$platform || true
+
+ # Cleanup
+ cd $cwd && rm -rf $builddir
'''
} // withDocker
} // timeout
+ archiveArtifacts artifacts: 'pkgs/**', fingerprint: true
} // node
}
) // parallel
--
To stop receiving notification emails like this one, please contact
"commits@couchdb.apache.org" <co...@couchdb.apache.org>.