From f62cc9b0420a135f0f850ead0c5103ce32588da8 Mon Sep 17 00:00:00 2001 From: Ken Dreyer Date: Mon, 13 Apr 2015 18:10:45 -0600 Subject: [PATCH] import ceph-setup jjb task This imports the current settings for "ceph-setup" as YAML. This is an import of the job previously defined in Jenkins' own data store (ie /home2/jenkins/jobs/ceph-setup/config.xml) Signed-off-by: Ken Dreyer --- ceph-setup/build/build | 78 ++++++++++++++++++++ ceph-setup/config/definitions/ceph-setup.yml | 39 ++++++++++ 2 files changed, 117 insertions(+) create mode 100644 ceph-setup/build/build create mode 100644 ceph-setup/config/definitions/ceph-setup.yml diff --git a/ceph-setup/build/build b/ceph-setup/build/build new file mode 100644 index 00000000..10f64383 --- /dev/null +++ b/ceph-setup/build/build @@ -0,0 +1,78 @@ +#!/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 diff --git a/ceph-setup/config/definitions/ceph-setup.yml b/ceph-setup/config/definitions/ceph-setup.yml new file mode 100644 index 00000000..475f9864 --- /dev/null +++ b/ceph-setup/config/definitions/ceph-setup.yml @@ -0,0 +1,39 @@ +- 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 -- 2.39.5