From: Alfredo Deza Date: Fri, 6 Feb 2015 15:57:30 +0000 (-0500) Subject: initial take on radosgw-agent task X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=8340db9303ee8c0d7a6c2b854e9b39da544b1ecc;p=ceph-build.git initial take on radosgw-agent task Signed-off-by: Alfredo Deza --- diff --git a/radosgw-agent/build/build b/radosgw-agent/build/build new file mode 100644 index 00000000..05c252be --- /dev/null +++ b/radosgw-agent/build/build @@ -0,0 +1,68 @@ +#!/bin/bash + +set -ex + +date +#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)" + +case $HOST in +*rpm*) + cd build + rm -rf ./dist # Remove any previous artifacts + mkdir -p $WORKSPACE/dist/noarch + mkdir -p $WORKSPACE/dist/SRPMS + mkdir -p $WORKSPACE/dist/SPECS + mkdir -p $WORKSPACE/dist/SOURCES + suse=$(uname -n | grep -ic -e suse -e sles || true) + if [ $suse -gt 0 ] + then + python setup.py clean + python setup.py bdist_rpm + if [ $? -eq 0 ] + then + mv dist/*.noarch.rpm $WORKSPACE/dist/noarch/. + mv dist/*.src.rpm $WORKSPACE/dist/SRPMS + fi + else + python setup.py clean + python setup.py sdist --formats=gztar + rpmdev-setuptree + rpmdev-wipetree + cp -avf ./dist/*.gz $HOME/rpmbuild/SOURCES + cp -avf radosgw-agent.spec $WORKSPACE/dist/SPECS + rpmbuild -ba $WORKSPACE/dist/SPECS/radosgw-agent.spec --target noarch + if [ $? -ne 0 ] ; then + rm -Rvf $WORKSPACE/dist/${DIST}/ + else + cp -avf $HOME/rpmbuild/* $WORKSPACE/dist/ + fi + fi + ;; +*deb* | tala*) + cd build + DEB_VERSION=$(dpkg-parsechangelog | sed -rne 's,^Version: (.*),\1, p') + BP_VERSION=${DEB_VERSION}${BPTAG} + DEBEMAIL="sandon@inktank.com" dch -D $DIST --force-distribution -b -v "$BP_VERSION" "$comment" + ( cd $WORKSPACE ; dpkg-source -b ./build ) # squeeze uses current directory for tarball + dpkg-buildpackage -b -k17ED316D + RC=$? + if [ $RC -eq 0 ] ; then + cd $WORKSPACE + mkdir -p dist + mv *.changes *.dsc *.deb *.tar.gz dist/. + fi + ;; +*) + echo "Can't determine build host type" + exit 4 + ;; +esac diff --git a/radosgw-agent/config/definitions/radosgw-agent.yml b/radosgw-agent/config/definitions/radosgw-agent.yml new file mode 100644 index 00000000..8a6eb0ba --- /dev/null +++ b/radosgw-agent/config/definitions/radosgw-agent.yml @@ -0,0 +1,71 @@ +- job: + name: radosgw-agent + node: gitbuilder-cdep-deb-cloud-precise-amd64-basic + project-type: matrix + defaults: global + disabled: false + display-name: 'radosgw-agent-wip' + concurrent: true + quiet-period: 5 + block-downstream: false + block-upstream: false + retry-count: 3 + + parameters: + - string: + name: BRANCH + description: "The git branch or tag to build" + + - bool: + name: RELEASE + description: "If checked, it will use the key for releases, otherwise it will use the autosign one." + + scm: + - git: + url: https://github.com/ceph/radosgw-agent.git + branches: + - $BRANCH + browser: githubweb + browser-url: http://github.com/ceph/radosgw-agent.git + timeout: 20 + + execution-strategy: + combination-filter: | + (Arch=="x86_64") || (Arch=="armhf" && (Dist=="quantal")) + + axes: + - axis: + type: label-expression + name: Arch + values: + - x86_64 + - axis: + type: label-expression + name: Dist + values: + - squeeze + - wheezy + - precise + - trusty + - centos6.3 + - centos6.4 + - centos6.5 + - centos7 + - rhel6.3 + - rhel6.4 + - rhel6.5 + - fedora20 + - opensuse12.2 + - sles11sp2 + - rhel7 + + builders: + - shell: "pwd" + - shell: + !include-raw ../../build/build + + publishers: + - archive: + artifacts: '*-repo/**, dist/**' + allow-empty: 'true' + latest-only: 'false'