--- /dev/null
+#/bin/bash -ex
+
+echo "BRANCH: $BRANCH"
+cd $WORKSPACE/ice-setup
+
+DEBIAN=0
+
+if [ $Dist = 'trusty' -o $Dist = 'precise' -o $Dist = 'wheezy' ] ; then
+ DEBIAN=1
+fi
+
+if [ $DEBIAN = 1 ] ; then
+ dpkg-buildpackage -us -uc
+else
+ python ./setup.py sdist
+
+ RPMBUILD=$WORKSPACE/rpmbuild
+ mkdir -p $RPMBUILD/{SOURCES,SRPMS,SPECS,RPMS,BUILD}
+ cp -a dist/ice_setup*.tar.gz $RPMBUILD/SOURCES/.
+ cp -a ice_setup.spec $RPMBUILD/SPECS/.
+
+ cd $RPMBUILD
+ rpmbuild -ba --define "_topdir $RPMBUILD" SPECS/ice_setup.spec
+fi
+
+cd $WORKSPACE
+rm -rf $BRANCH
+mkdir $BRANCH
+
+if [ $DEBIAN = 1 ] ; then
+ mv *.deb *.dsc *.changes *.tar.gz $BRANCH
+else
+ find rpmbuild -name '*.rpm' -o -name '*.srpm' | xargs -i mv {} $BRANCH
+fi
+
+exit 0
--- /dev/null
+- job:
+ axes:
+ - axis:
+ name: Arch
+ type: label-expression
+ values:
+ - x86_64
+ - axis:
+ name: Dist
+ type: label-expression
+ values:
+ - trusty
+ - precise
+ - centos
+ block-downstream: false
+ block-upstream: false
+ builders:
+ - shell:
+ !include-raw ../../build/build
+ concurrent: false
+ description: Build ice-setup as a package for Red Hat Ceph, non-Red Hat releases
+ disabled: false
+ execution-strategy:
+ run-sequentially: false
+ keep-dependencies: false
+ name: ice-setup
+ parameters:
+ - string:
+ default: master
+ description: ''
+ name: BRANCH
+ project-type: matrix
+ properties:
+ - github:
+ url: https://github.com/ceph/ice-setup/
+ publishers:
+ - archive:
+ allow-empty: false
+ artifacts: $BRANCH/*
+ default-excludes: true
+ fingerprint: false
+ only-if-success: false
+ - description-setter:
+ regexp: '^BRANCH: (\S+)'
+ regexp-for-failed: null
+ set-for-matrix: false
+ scm:
+ - git:
+ basedir: ice-setup
+ branches: $BRANCH
+ url: https://github.com/ceph/ice-setup
+ wrappers:
+ - inject:
+ global: false
+ mask-password-params: true