--- /dev/null
+#!/bin/sh
+
+#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"
+
+if [ -x "$BRANCH" ] ; then
+ echo "No git branch was supplied"
+ exit 1
+fi
+
+echo "Building version $(git describe) Branch $Branch"
+
+if [ ! -d /srv/ceph-build ] ; then
+ echo "Build tools are not installed"
+ exit 1
+fi
+bindir=/srv/ceph-build
+rm -rf dist
+rm -rf release
+
+# fix version/release. Hack needed only for the spec
+# file for rc candidates.
+#export force=force
+#sed -i 's/^Version:.*/Version: 0.80/' ceph.spec.in
+#sed -i 's/^Release:.*/Release: rc1%{?dist}/' ceph.spec.in
+#sed -i 's/^Source0:.*/Source0: http:\/\/ceph.com\/download\/%{name}-%{version}-rc1.tar.bz2/' ceph.spec.in
+#sed -i 's/^%setup.*/%setup -q -n %{name}-%{version}-rc1/' ceph.spec.in
+
+# run submodule updates regardless
+echo "Running submodule update ..."
+git submodule update --init
+
+echo "Running configure ..."
+# because this is running in a Debian-based distro we need to pass -L
+# to disable lttng
+./do_autogen.sh -L
+
+if [ $? -ne 0 ] ; then
+ echo "autogen failed"
+ exit 1
+fi
+
+mkdir -p release
+$bindir/release_tarball.sh release release/version
+if [ $? -ne 0] ; then
+ echo "make tarballs failed"
+ exit 2
+fi
+vers=`cat release/version`
+
+(
+ cd release/$vers
+ #mv debian ceph-$vers/.
+ dpkg-source -b ceph-$vers
+)
+
+mkdir -p dist
+# Debian Source Files
+mv release/$vers/*.dsc dist/.
+mv release/$vers/*.diff.gz dist/.
+mv release/$vers/*.orig.tar.gz dist/.
+# RPM Source Files
+mkdir -p dist/rpm/
+mv release/$vers/rpm/*.patch dist/rpm/ || true
+mv release/$vers/ceph.spec dist/.
+mv release/$vers/*.tar.* dist/.
+# Parameters
+mv release/version dist/.
+exit 0
--- /dev/null
+- job:
+ name: ceph-setup
+ description: "This job step checks out the branch and builds the tarballs, diffs, and dsc that are passed to the ceph-build step.\r\n\r\nNotes:\r\nJob needs to run on a releatively recent debian system. The Restrict where run feature is used to specifiy an appropriate label.\r\nThe clear workspace before checkout box for the git plugin is used."
+ node: gitbuilder-cdep-deb-cloud-precise-amd64-basic
+ disabled: false
+ display-name: 'ceph-setup'
+ concurrent: false
+ logrotate:
+ daysToKeep: -1
+ numToKeep: 25
+ artifactDaysToKeep: -1
+ artifactNumToKeep: -1
+ block-downstream: false
+ block-upstream: false
+ properties:
+ - github:
+ url: https://github.com/ceph/ceph
+
+ parameters:
+ - string:
+ name: BRANCH
+ description: "The git branch (or tag) to build"
+
+ scm:
+ - git:
+ url: git://jenkins.front.sepia.ceph.com/ceph/ceph.git
+ branches:
+ - $BRANCH
+
+ builders:
+ - shell: "pwd"
+ - shell:
+ !include-raw ../../build/build
+
+ publishers:
+ - archive:
+ artifacts: 'dist/**'
+ allow-empty: false
+ latest-only: false