From: Ken Dreyer Date: Tue, 7 Jan 2014 02:57:29 +0000 (-0700) Subject: add jenkins-build script X-Git-Tag: v1.3.5~14^2~2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=6f350810c78c4eb27e54e12572442035e2eb9ff0;p=ceph-deploy.git add jenkins-build script Move our Jenkins build script out of Jenkins' database and into Git so that we can have greater visibility on future changes. Going forward, we will modify the ceph-deploy Jenkins task to only run this script. Signed-off-by: Ken Dreyer --- diff --git a/scripts/jenkins-build b/scripts/jenkins-build new file mode 100755 index 0000000..c182491 --- /dev/null +++ b/scripts/jenkins-build @@ -0,0 +1,46 @@ +#!/bin/sh + +# This is the script that runs inside Jenkins. +# http://jenkins.ceph.com/job/ceph-deploy/ + +#export GNUPGHOME=/home/jenkins-build/build/gnupg.autobuild/ +export GNUPGHOME=/home/jenkins-build/build/gnupg.ceph-release/ +export KEYID=17ED316D +HOST=$(hostname --short) +echo "Building on ${HOST}" +echo " DIST=${DIST}" +echo " BPTAG=${BPTAG}" +echo " KEYID=${KEYID}" +echo " WS=$WORKSPACE" +echo " PWD=$(pwd)" +echo " BRANCH=$BRANCH" + +case $HOST in +gitbuilder-cdep-rpm*) + rm -rf rpm-repo dist/* build/rpmbuild + cd build + ./scripts/build-rpm.sh --release + if [ $? -eq 0 ] ; then + mv rpm-repo $WORKSPACE/. + cd $WORKSPACE + mkdir -p dist + fi + ;; +gitbuilder-cdep-deb* | tala* | mira*) + rm -rf debian-repo + rm -rf dist + rm -f *.changes *.dsc *.gz *.diff + cd build + ./scripts/build-debian.sh --release + if [ $? -eq 0 ] ; then + mv debian-repo $WORKSPACE/. + cd $WORKSPACE + mkdir -p dist + mv *.changes *.dsc *.deb *.tar.gz dist/. + fi + ;; +*) + echo "Can't determine build host type" + exit 4 + ;; +esac