+++ /dev/null
-#!/bin/bash
-set -ex
-
-# Only do actual work when we are a DEB distro
-if test -f /etc/redhat-release ; then
- exit 0
-fi
-
-VENV="$WORKSPACE/venv/bin"
-
-get_bptag() {
- dist=$1
-
- [ "$dist" = "sid" ] && dver=""
- [ "$dist" = "jessie" ] && dver="~bpo80+1"
- [ "$dist" = "wheezy" ] && dver="~bpo70+1"
- [ "$dist" = "squeeze" ] && dver="~bpo60+1"
- [ "$dist" = "lenny" ] && dver="~bpo50+1"
- [ "$dist" = "trusty" ] && dver="$dist"
- [ "$dist" = "saucy" ] && dver="$dist"
- [ "$dist" = "precise" ] && dver="$dist"
- [ "$dist" = "oneiric" ] && dver="$dist"
- [ "$dist" = "natty" ] && dver="$dist"
- [ "$dist" = "maverick" ] && dver="$dist"
- [ "$dist" = "lucid" ] && dver="$dist"
- [ "$dist" = "karmic" ] && dver="$dist"
-
- echo $dver
-}
-
-BPTAG=`get_bptag $DIST`
-
-[ "$TEST" = true ] && chacra_ref="test" || chacra_ref="$BRANCH"
-vers=`cat ./dist/version`
-distro=`python -c "exec 'import platform; print platform.linux_distribution()[0].lower()'"`
-chacra_endpoint="ceph/${chacra_ref}/${distro}/${DIST}/${ARCH}"
-
-$VENV/chacractl exists binaries/${chacra_endpoint} ; exists=$?
-
-# if the binary already exists in chacra, do not rebuild
-if [ $exists -eq 0 ] && [ "$FORCE" = false ] ; then
- echo "The endpoint at ${chacra_endpoint} already exists and FORCE was not set, Exiting..."
- exit 0
-fi
-
-
-HOST=$(hostname --short)
-echo "Building on $(hostname) Date: $(date)"
-echo " DIST=${DIST}"
-echo " BPTAG=${BPTAG}"
-echo " WS=$WORKSPACE"
-echo " PWD=$(pwd)"
-echo " BUILD SOURCE=$COPYARTIFACT_BUILD_NUMBER_CEPH_SETUP"
-echo "*****"
-env
-echo "*****"
-
-# create a release directory for ceph-build tools
-mkdir -p release
-cp -a dist release/${vers}
-echo $DIST > release/${vers}/debian_dists
-echo "${vers}-1" > release/${vers}/debian_version
-
-cd release/$vers
-
-
-# HACK HACK HACK HACK HACK HACK HACK HACK HACK HACK HACK HACK HACK HACK HACK HACK HACK HACK HACK
-# FIXME: I don't think we need this 'hack' anymore
-# Dirty Hack:
-baddist=$(echo $DIST | grep -ic -e squeeze -e wheezy || true)
-if [ $baddist -eq 1 ]
-then
- sed -i 's/ libbabeltrace-ctf-dev, libbabeltrace-dev,//g' ceph_${vers}-1.dsc || true
- sed -i 's/ liblttng-ust-dev//g' ceph_${vers}-1.dsc || true
-
-fi
-# HACK HACK HACK HACK HACK HACK HACK HACK HACK HACK HACK HACK HACK HACK HACK HACK HACK HACK HACK
-
-
-# unpack sources
-dpkg-source -x ceph_${vers}-1.dsc
-
-
-# HACK HACK HACK HACK HACK HACK HACK HACK HACK HACK HACK HACK HACK HACK HACK HACK HACK HACK HACK
-if [ $baddist -eq 1 ]
-then
- rm -vf *.orig.tar.gz || true
- grep -v babeltrace ceph-${vers}/debian/control | grep -v liblttng > ceph-${vers}/debian/control.new
- mv -v ceph-${vers}/debian/control.new ceph-${vers}/debian/control
-fi
-# HACK HACK HACK HACK HACK HACK HACK HACK HACK HACK HACK HACK HACK HACK HACK HACK HACK HACK HACK
-
-
-( cd ceph-${vers}
- DEB_VERSION=$(dpkg-parsechangelog | sed -rne 's,^Version: (.*),\1, p')
- BP_VERSION=${DEB_VERSION}${BPTAG}
- dch -D $DIST --force-distribution -b -v "$BP_VERSION" "$comment"
-)
-dpkg-source -b ceph-${vers}
-
-echo "Building Debian"
-cd "$WORKSPACE"
-# Before, at this point, this script called the below contents that
-# was part of /srv/ceph-buid/build_debs.sh. Now everything is in here, in one
-# place, no need to checkout/clone anything. WYSIWYG::
-#
-# sudo $bindir/build_debs.sh ./release /srv/debian-base $vers
-
-
-releasedir="./release"
-pbuilddir="/srv/debian-base"
-cephver=$vers
-
-start_time=`date`
-echo version $cephver
-
-# This used to live in a *file* on /src/ceph-build. Now it lives here because
-# it doesn't make sense to have a file that lives in /srv/ that we then
-# concatenate to get its contents.
-
-dvers=`cat $releasedir/$cephver/debian_version`
-echo deb vers $dvers
-
-# This function used to live as /srv/gen_debian_version.sh
-gen_debian_version() {
- raw=$1
- dist=$2
-
- [ "$dist" = "sid" ] && dver="$raw"
- [ "$dist" = "jessie" ] && dver="$raw~bpo80+1"
- [ "$dist" = "wheezy" ] && dver="$raw~bpo70+1"
- [ "$dist" = "squeeze" ] && dver="$raw~bpo60+1"
- [ "$dist" = "lenny" ] && dver="$raw~bpo50+1"
- [ "$dist" = "precise" ] && dver="$raw$dist"
- [ "$dist" = "saucy" ] && dver="$raw$dist"
- [ "$dist" = "trusty" ] && dver="$raw$dist"
-
- echo $dver
-}
-
-# FIXME this looks exactly like `setup_pbuilder`, we probably don't need this
-# or we need to refactor.
-sudo pbuilder --clean
-
-bpvers=`gen_debian_version $dvers $DIST`
-echo deb vers $bpvers
-
-
-echo building debs for $DIST
-if [ `dpkg-architecture -qDEB_BUILD_ARCH` = "i386" ] ; then
- # Architecture dependent, independent and source
- sudo pbuilder build \
- --distribution $DIST \
- --basetgz $pbuilddir/$DIST.tgz \
- --buildresult $releasedir/$cephver \
- --debbuildopts "-j`grep -c processor /proc/cpuinfo`" \
- $releasedir/$cephver/ceph_$bpvers.dsc
-else
- # Binary only architecture dependent
- sudo pbuilder build \
- --binary-arch \
- --distribution $DIST \
- --basetgz $pbuilddir/$DIST.tgz \
- --buildresult $releasedir/$cephver \
- --debbuildopts "-j`grep -c processor /proc/cpuinfo`" \
- $releasedir/$cephver/ceph_$bpvers.dsc
-fi
-
-# do lintian checks
-bpvers=`gen_debian_version $dvers $DIST`
-echo lintian checks for $bpvers
-echo lintian --allow-root $releasedir/$cephver/*$bpvers*.deb
-
-echo "Start Time = $start_time"
-echo " End Time = $(date)"
-
-[ "$FORCE" = true ] && chacra_flags="--force" || chacra_flags=""
-
-# push binaries to chacra
-find release/$vers/ | egrep "*\.(changes|deb|dsc|gz)$" | egrep -v "(Packages|Sources|Contents)" | $VENV/chacractl binary ${chacra_flags} create ${chacra_endpoint}
-
-
-echo "End Date: $(date)"
+++ /dev/null
-#!/bin/bash
-set -ex
-
-if [[ ! -f /etc/redhat-release && ! -f /usr/bin/zypper ]] ; then
- exit 0
-fi
-
-VENV="$WORKSPACE/venv/bin"
-
-get_rpm_dist() {
- LSB_RELEASE=/usr/bin/lsb_release
- [ ! -x $LSB_RELEASE ] && echo unknown && exit
-
- ID=`$LSB_RELEASE --short --id`
-
- case $ID in
- RedHatEnterpriseServer)
- RELEASE=`$LSB_RELEASE --short --release | cut -d. -f1`
- DIST=rhel$RELEASE
- DISTRO=rhel
- ;;
- CentOS)
- RELEASE=`$LSB_RELEASE --short --release | cut -d. -f1`
- DIST=el$RELEASE
- DISTRO=centos
- ;;
- Fedora)
- RELEASE=`$LSB_RELEASE --short --release`
- DIST=fc$RELEASE
- DISTRO=fedora
- ;;
- SUSE\ LINUX)
- DESC=`$LSB_RELEASE --short --description`
- RELEASE=`$LSB_RELEASE --short --release`
- case $DESC in
- *openSUSE*)
- DIST=opensuse$RELEASE
- DISTRO=opensuse
- ;;
- *Enterprise*)
- DIST=sles$RELEASE
- DISTRO=sles
- ;;
- esac
- ;;
- *)
- DIST=unknown
- DISTRO=unknown
- ;;
- esac
-
- echo $DIST
-}
-
-get_rpm_dist
-dist=$DIST
-[ -z "$dist" ] && echo no dist && exit 1
-echo dist $dist
-
-vers=`cat ./dist/version`
-[ "$TEST" = true ] && chacra_ref="test" || chacra_ref="$BRANCH"
-chacra_baseurl="ceph/${chacra_ref}/${DISTRO}/${RELEASE}"
-
-$VENV/chacractl exists binaries/${chacra_baseurl}/${ARCH} ; exists=$?
-
-# if the binary already exists in chacra, do not rebuild
-if [ $exists -eq 0 ] && [ "$FORCE" = false ]; then
- echo "The endpoint at ${chacra_baseurl}/${ARCH} already exists and FORCE was not set, Exiting..."
- exit 0
-fi
-
-HOST=$(hostname --short)
-echo "Building on $(hostname) Date: $(date)"
-echo " DIST=${DIST}"
-echo " BPTAG=${BPTAG}"
-echo " WS=$WORKSPACE"
-echo " PWD=$(pwd)"
-echo " BUILD SOURCE=$COPYARTIFACT_BUILD_NUMBER_CEPH_SETUP"
-echo "*****"
-env
-echo "*****"
-
-
-# create a release directory for ceph-build tools
-mkdir -p release
-cp -a dist release/${vers}
-echo $DIST > release/${vers}/debian_dists
-echo "${vers}-1" > release/${vers}/debian_version
-
-echo "Building RPMs"
-
-# The below contents ported from /srv/ceph-build/build_rpms.sh ::
-# $bindir/build_rpms.sh ./release $vers
-#
-
-releasedir="./release"
-cephver=$vers
-
-cd $releasedir/$cephver || exit 1
-
-# Set up build area
-BUILDAREA=./rpm/$dist
-mkdir -p ${BUILDAREA}/{SOURCES,SRPMS,SPECS,RPMS,BUILD}
-cp -a ceph-*.tar.bz2 ${BUILDAREA}/SOURCES/.
-cp -a ceph.spec ${BUILDAREA}/SPECS/.
-cp -a rpm/*.patch ${BUILDAREA}/SOURCES/. || true
-
-# Build RPMs
-BUILDAREA=`readlink -fn ${BUILDAREA}` ### rpm wants absolute path
-cd ${BUILDAREA}/SPECS
-rpmbuild -ba --define "_topdir ${BUILDAREA}" ceph.spec
-
-echo done
-
-# Make sure we execute at the top level directory
-cd "$WORKSPACE"
-
-[ "$FORCE" = true ] && chacra_flags="--force" || chacra_flags=""
-
-# push binaries to chacra
-find release/${vers}/rpm/*/SRPMS | grep rpm | $VENV/chacractl binary ${chacra_flags} create ${chacra_baseurl}/source
-find release/${vers}/rpm/*/RPMS/* | grep rpm | $VENV/chacractl binary ${chacra_flags} create ${chacra_baseurl}/${ARCH}
-
-echo "End Date: $(date)"
+++ /dev/null
-#!/bin/bash
-#
-# Ceph distributed storage system
-#
-# Copyright (C) 2014 Red Hat <contact@redhat.com>
-#
-# Author: Loic Dachary <loic@dachary.org>
-#
-# This library is free software; you can redistribute it and/or
-# modify it under the terms of the GNU Lesser General Public
-# License as published by the Free Software Foundation; either
-# version 2.1 of the License, or (at your option) any later version.
-#
-set -ex
-HOST=$(hostname --short)
-echo "Building on $(hostname) Date: $(date)"
-echo " DIST=${DIST}"
-echo " BPTAG=${BPTAG}"
-echo " KEYID=${KEYID}"
-echo " WS=$WORKSPACE"
-echo " PWD=$(pwd)"
-echo " BUILD SOURCE=$COPYARTIFACT_BUILD_NUMBER_CEPH_SETUP"
-echo "*****"
-env
-echo "*****"
-
-DIR=/tmp/install-deps.$$
-trap "rm -fr $DIR" EXIT
-mkdir -p $DIR
-if test $(id -u) != 0 ; then
- SUDO=sudo
-fi
-export LC_ALL=C # the following is vulnerable to i18n
-
-if test -f /etc/redhat-release ; then
- $SUDO yum install -y redhat-lsb-core
-fi
-
-if which apt-get > /dev/null ; then
- $SUDO apt-get install -y lsb-release
-fi
-
-# unpack the tar.gz that contains the debian dir
-cd dist
-tar xzf *.orig.tar.gz
-cd ceph-*
-pwd
-
-
-
-case $(lsb_release -si) in
-CentOS|Fedora|SUSE*|RedHatEnterpriseServer)
- case $(lsb_release -si) in
- SUSE*)
- $SUDO zypper -y yum-utils
- ;;
- *)
- $SUDO yum install -y yum-utils
- ;;
- esac
- sed -e 's/@//g' < ceph.spec.in > $DIR/ceph.spec
- $SUDO yum-builddep -y $DIR/ceph.spec
- ;;
-*)
- echo "$(lsb_release -si) is unknown, dependencies will have to be installed manually."
- ;;
-esac
-
-# Create the virtualenv
-virtualenv $WORKSPACE/venv
-VENV="$WORKSPACE/venv/bin"
-
-# Define and ensure the PIP cache
-PIP_SDIST_INDEX="$HOME/.cache/pip"
-mkdir -p $PIP_SDIST_INDEX
-
-CHACRACTL_VERSION="chacractl>=0.0.4"
-
-# download packages to the local pip cache
-$VENV/pip install --upgrade --exists-action=i --download="$PIP_SDIST_INDEX" $CHACRACTL_VERSION
-# install packages from the local pip cache, ignoring pypi
-$VENV/pip install --upgrade --exists-action=i --find-links="file://$PIP_SDIST_INDEX" --no-index $CHACRACTL_VERSION
-
-# create the .chacractl config file
-cat > $HOME/.chacractl << EOF
-url = "$CHACRACTL_URL"
-user = "$CHACRACTL_USER"
-key = "$CHACRACTL_KEY"
-EOF
+++ /dev/null
-#!/bin/sh -x
-# This file will set the tgz images needed for pbuilder on a given host. It has
-# some hard-coded values like `/srv/debian-base` because it gets built every
-# time this file is executed - completely ephemeral. If a Debian host will use
-# pbuilder, then it will need this. Since it is not idempotent it makes
-# everything a bit slower. ## FIXME ##
-
-set -e
-
-# Only run when we are a Debian or Debian-based distro
-if test -f /etc/redhat-release ; then
- exit 0
-fi
-
-basedir="/srv/debian-base"
-
-# Ensure that the basedir directory exists
-sudo mkdir -p "$basedir"
-
-# This used to live in a *file* on /srv/ceph-build as
-# /srv/ceph-build/update_pbuilder.sh Now it lives here because it doesn't make
-# sense to have a file that lives in /srv/ that we then concatenate to get its
-# contents. what.
-# By using $DIST we are narrowing down to updating only the distro image we
-# need, unlike before where we updated everything on every server on every
-# build.
-
-os="debian"
-[ "$DIST" = "precise" ] && os="ubuntu"
-[ "$DIST" = "saucy" ] && os="ubuntu"
-[ "$DIST" = "trusty" ] && os="ubuntu"
-
-if [ $os = "debian" ]; then
- # We used to consume from an internal mirror
- # ("http://apt-mirror.sepia.ceph.com/ftp.us.debian.org/debian") but given
- # that it has caused us issues before (e.g. packages out of date) and that
- # it currently does not have Jessie we are going to use a public mirror.
- mirror="http://www.gtlib.gatech.edu/pub/debian"
- othermirror=""
-else
- mirror=""
- othermirror="deb http://apt-mirror.sepia.ceph.com/archive.ubuntu.com/ubuntu $DIST main restricted universe multiverse"
-fi
-
-# ensure that the tgz is valid, otherwise remove it so that it can be recreated
-# again
-pbuild_tar="$basedir/$DIST.tgz"
-is_not_tar=`python -c "exec 'try: import tarfile;print int(not int(tarfile.is_tarfile(\"$pbuild_tar\")))\nexcept IOError: print 1'"`
-file_size_kb=`du -k "$pbuild_tar" | cut -f1`
-
-if $is_not_tar; then
- sudo rm -f "$pbuild_tar"
-fi
-
-if [ $file_size_kb -lt 1 ]; then
- sudo rm -f "$pbuild_tar"
-fi
-
-sudo pbuilder --clean
-
-if [ -e $basedir/$DIST.tgz ]; then
- echo updating $DIST base.tgz
- sudo pbuilder update \
- --basetgz $basedir/$DIST.tgz \
- --distribution $DIST \
- --mirror "$mirror" \
- --othermirror "$othermirror"
-else
- echo building $DIST base.tgz
- sudo pbuilder create \
- --basetgz $basedir/$DIST.tgz \
- --distribution $DIST \
- --mirror "$mirror" \
- --othermirror "$othermirror"
-fi
+++ /dev/null
-- job:
- name: ceph-build-next
- project-type: matrix
- defaults: global
- display-name: 'ceph-build-next'
- block-downstream: false
- block-upstream: false
- properties:
- - github:
- url: https://github.com/ceph/ceph
-
- axes:
- - axis:
- type: label-expression
- name: ARCH
- values:
- - x86_64
- - axis:
- type: label-expression
- name: DIST
- values:
- - jessie
- #- wheezy
- #- precise
- - trusty
- #- centos6
- - centos7
-
- builders:
- - shell: |
- echo "Cleaning up workarea"
- rm -rf dist
- rm -rf release
- - copyartifact:
- project: ceph-setup-next
- filter: 'dist/**'
- which-build: last-successful
- - shell:
- !include-raw ../../build/setup
- - shell:
- !include-raw ../../build/setup_pbuilder
- - shell:
- !include-raw ../../build/build_deb
- - shell:
- !include-raw ../../build/build_rpm
-
- publishers:
- - archive:
- artifacts: 'dist/**'
- allow-empty: false
- latest-only: false
-
- wrappers:
- - inject-passwords:
- global: true
- mask-password-params: true
--- /dev/null
+#!/bin/bash
+set -ex
+
+# Only do actual work when we are a DEB distro
+if test -f /etc/redhat-release ; then
+ exit 0
+fi
+
+VENV="$WORKSPACE/venv/bin"
+
+get_bptag() {
+ dist=$1
+
+ [ "$dist" = "sid" ] && dver=""
+ [ "$dist" = "jessie" ] && dver="~bpo80+1"
+ [ "$dist" = "wheezy" ] && dver="~bpo70+1"
+ [ "$dist" = "squeeze" ] && dver="~bpo60+1"
+ [ "$dist" = "lenny" ] && dver="~bpo50+1"
+ [ "$dist" = "trusty" ] && dver="$dist"
+ [ "$dist" = "saucy" ] && dver="$dist"
+ [ "$dist" = "precise" ] && dver="$dist"
+ [ "$dist" = "oneiric" ] && dver="$dist"
+ [ "$dist" = "natty" ] && dver="$dist"
+ [ "$dist" = "maverick" ] && dver="$dist"
+ [ "$dist" = "lucid" ] && dver="$dist"
+ [ "$dist" = "karmic" ] && dver="$dist"
+
+ echo $dver
+}
+
+BPTAG=`get_bptag $DIST`
+
+[ "$TEST" = true ] && chacra_ref="test" || chacra_ref="$BRANCH"
+vers=`cat ./dist/version`
+distro=`python -c "exec 'import platform; print platform.linux_distribution()[0].lower()'"`
+chacra_endpoint="ceph/${chacra_ref}/${distro}/${DIST}/${ARCH}"
+
+$VENV/chacractl exists binaries/${chacra_endpoint} ; exists=$?
+
+# if the binary already exists in chacra, do not rebuild
+if [ $exists -eq 0 ] && [ "$FORCE" = false ] ; then
+ echo "The endpoint at ${chacra_endpoint} already exists and FORCE was not set, Exiting..."
+ exit 0
+fi
+
+
+HOST=$(hostname --short)
+echo "Building on $(hostname) Date: $(date)"
+echo " DIST=${DIST}"
+echo " BPTAG=${BPTAG}"
+echo " WS=$WORKSPACE"
+echo " PWD=$(pwd)"
+echo " BUILD SOURCE=$COPYARTIFACT_BUILD_NUMBER_CEPH_SETUP"
+echo "*****"
+env
+echo "*****"
+
+# create a release directory for ceph-build tools
+mkdir -p release
+cp -a dist release/${vers}
+echo $DIST > release/${vers}/debian_dists
+echo "${vers}-1" > release/${vers}/debian_version
+
+cd release/$vers
+
+
+# HACK HACK HACK HACK HACK HACK HACK HACK HACK HACK HACK HACK HACK HACK HACK HACK HACK HACK HACK
+# FIXME: I don't think we need this 'hack' anymore
+# Dirty Hack:
+baddist=$(echo $DIST | grep -ic -e squeeze -e wheezy || true)
+if [ $baddist -eq 1 ]
+then
+ sed -i 's/ libbabeltrace-ctf-dev, libbabeltrace-dev,//g' ceph_${vers}-1.dsc || true
+ sed -i 's/ liblttng-ust-dev//g' ceph_${vers}-1.dsc || true
+
+fi
+# HACK HACK HACK HACK HACK HACK HACK HACK HACK HACK HACK HACK HACK HACK HACK HACK HACK HACK HACK
+
+
+# unpack sources
+dpkg-source -x ceph_${vers}-1.dsc
+
+
+# HACK HACK HACK HACK HACK HACK HACK HACK HACK HACK HACK HACK HACK HACK HACK HACK HACK HACK HACK
+if [ $baddist -eq 1 ]
+then
+ rm -vf *.orig.tar.gz || true
+ grep -v babeltrace ceph-${vers}/debian/control | grep -v liblttng > ceph-${vers}/debian/control.new
+ mv -v ceph-${vers}/debian/control.new ceph-${vers}/debian/control
+fi
+# HACK HACK HACK HACK HACK HACK HACK HACK HACK HACK HACK HACK HACK HACK HACK HACK HACK HACK HACK
+
+
+( cd ceph-${vers}
+ DEB_VERSION=$(dpkg-parsechangelog | sed -rne 's,^Version: (.*),\1, p')
+ BP_VERSION=${DEB_VERSION}${BPTAG}
+ dch -D $DIST --force-distribution -b -v "$BP_VERSION" "$comment"
+)
+dpkg-source -b ceph-${vers}
+
+echo "Building Debian"
+cd "$WORKSPACE"
+# Before, at this point, this script called the below contents that
+# was part of /srv/ceph-buid/build_debs.sh. Now everything is in here, in one
+# place, no need to checkout/clone anything. WYSIWYG::
+#
+# sudo $bindir/build_debs.sh ./release /srv/debian-base $vers
+
+
+releasedir="./release"
+pbuilddir="/srv/debian-base"
+cephver=$vers
+
+start_time=`date`
+echo version $cephver
+
+# This used to live in a *file* on /src/ceph-build. Now it lives here because
+# it doesn't make sense to have a file that lives in /srv/ that we then
+# concatenate to get its contents.
+
+dvers=`cat $releasedir/$cephver/debian_version`
+echo deb vers $dvers
+
+# This function used to live as /srv/gen_debian_version.sh
+gen_debian_version() {
+ raw=$1
+ dist=$2
+
+ [ "$dist" = "sid" ] && dver="$raw"
+ [ "$dist" = "jessie" ] && dver="$raw~bpo80+1"
+ [ "$dist" = "wheezy" ] && dver="$raw~bpo70+1"
+ [ "$dist" = "squeeze" ] && dver="$raw~bpo60+1"
+ [ "$dist" = "lenny" ] && dver="$raw~bpo50+1"
+ [ "$dist" = "precise" ] && dver="$raw$dist"
+ [ "$dist" = "saucy" ] && dver="$raw$dist"
+ [ "$dist" = "trusty" ] && dver="$raw$dist"
+
+ echo $dver
+}
+
+# FIXME this looks exactly like `setup_pbuilder`, we probably don't need this
+# or we need to refactor.
+sudo pbuilder --clean
+
+bpvers=`gen_debian_version $dvers $DIST`
+echo deb vers $bpvers
+
+
+echo building debs for $DIST
+if [ `dpkg-architecture -qDEB_BUILD_ARCH` = "i386" ] ; then
+ # Architecture dependent, independent and source
+ sudo pbuilder build \
+ --distribution $DIST \
+ --basetgz $pbuilddir/$DIST.tgz \
+ --buildresult $releasedir/$cephver \
+ --debbuildopts "-j`grep -c processor /proc/cpuinfo`" \
+ $releasedir/$cephver/ceph_$bpvers.dsc
+else
+ # Binary only architecture dependent
+ sudo pbuilder build \
+ --binary-arch \
+ --distribution $DIST \
+ --basetgz $pbuilddir/$DIST.tgz \
+ --buildresult $releasedir/$cephver \
+ --debbuildopts "-j`grep -c processor /proc/cpuinfo`" \
+ $releasedir/$cephver/ceph_$bpvers.dsc
+fi
+
+# do lintian checks
+bpvers=`gen_debian_version $dvers $DIST`
+echo lintian checks for $bpvers
+echo lintian --allow-root $releasedir/$cephver/*$bpvers*.deb
+
+echo "Start Time = $start_time"
+echo " End Time = $(date)"
+
+[ "$FORCE" = true ] && chacra_flags="--force" || chacra_flags=""
+
+# push binaries to chacra
+find release/$vers/ | egrep "*\.(changes|deb|dsc|gz)$" | egrep -v "(Packages|Sources|Contents)" | $VENV/chacractl binary ${chacra_flags} create ${chacra_endpoint}
+
+
+echo "End Date: $(date)"
--- /dev/null
+#!/bin/bash
+set -ex
+
+if [[ ! -f /etc/redhat-release && ! -f /usr/bin/zypper ]] ; then
+ exit 0
+fi
+
+VENV="$WORKSPACE/venv/bin"
+
+get_rpm_dist() {
+ LSB_RELEASE=/usr/bin/lsb_release
+ [ ! -x $LSB_RELEASE ] && echo unknown && exit
+
+ ID=`$LSB_RELEASE --short --id`
+
+ case $ID in
+ RedHatEnterpriseServer)
+ RELEASE=`$LSB_RELEASE --short --release | cut -d. -f1`
+ DIST=rhel$RELEASE
+ DISTRO=rhel
+ ;;
+ CentOS)
+ RELEASE=`$LSB_RELEASE --short --release | cut -d. -f1`
+ DIST=el$RELEASE
+ DISTRO=centos
+ ;;
+ Fedora)
+ RELEASE=`$LSB_RELEASE --short --release`
+ DIST=fc$RELEASE
+ DISTRO=fedora
+ ;;
+ SUSE\ LINUX)
+ DESC=`$LSB_RELEASE --short --description`
+ RELEASE=`$LSB_RELEASE --short --release`
+ case $DESC in
+ *openSUSE*)
+ DIST=opensuse$RELEASE
+ DISTRO=opensuse
+ ;;
+ *Enterprise*)
+ DIST=sles$RELEASE
+ DISTRO=sles
+ ;;
+ esac
+ ;;
+ *)
+ DIST=unknown
+ DISTRO=unknown
+ ;;
+ esac
+
+ echo $DIST
+}
+
+get_rpm_dist
+dist=$DIST
+[ -z "$dist" ] && echo no dist && exit 1
+echo dist $dist
+
+vers=`cat ./dist/version`
+[ "$TEST" = true ] && chacra_ref="test" || chacra_ref="$BRANCH"
+chacra_baseurl="ceph/${chacra_ref}/${DISTRO}/${RELEASE}"
+
+$VENV/chacractl exists binaries/${chacra_baseurl}/${ARCH} ; exists=$?
+
+# if the binary already exists in chacra, do not rebuild
+if [ $exists -eq 0 ] && [ "$FORCE" = false ]; then
+ echo "The endpoint at ${chacra_baseurl}/${ARCH} already exists and FORCE was not set, Exiting..."
+ exit 0
+fi
+
+HOST=$(hostname --short)
+echo "Building on $(hostname) Date: $(date)"
+echo " DIST=${DIST}"
+echo " BPTAG=${BPTAG}"
+echo " WS=$WORKSPACE"
+echo " PWD=$(pwd)"
+echo " BUILD SOURCE=$COPYARTIFACT_BUILD_NUMBER_CEPH_SETUP"
+echo "*****"
+env
+echo "*****"
+
+
+# create a release directory for ceph-build tools
+mkdir -p release
+cp -a dist release/${vers}
+echo $DIST > release/${vers}/debian_dists
+echo "${vers}-1" > release/${vers}/debian_version
+
+echo "Building RPMs"
+
+# The below contents ported from /srv/ceph-build/build_rpms.sh ::
+# $bindir/build_rpms.sh ./release $vers
+#
+
+releasedir="./release"
+cephver=$vers
+
+cd $releasedir/$cephver || exit 1
+
+# Set up build area
+BUILDAREA=./rpm/$dist
+mkdir -p ${BUILDAREA}/{SOURCES,SRPMS,SPECS,RPMS,BUILD}
+cp -a ceph-*.tar.bz2 ${BUILDAREA}/SOURCES/.
+cp -a ceph.spec ${BUILDAREA}/SPECS/.
+cp -a rpm/*.patch ${BUILDAREA}/SOURCES/. || true
+
+# Build RPMs
+BUILDAREA=`readlink -fn ${BUILDAREA}` ### rpm wants absolute path
+cd ${BUILDAREA}/SPECS
+rpmbuild -ba --define "_topdir ${BUILDAREA}" ceph.spec
+
+echo done
+
+# Make sure we execute at the top level directory
+cd "$WORKSPACE"
+
+[ "$FORCE" = true ] && chacra_flags="--force" || chacra_flags=""
+
+# push binaries to chacra
+find release/${vers}/rpm/*/SRPMS | grep rpm | $VENV/chacractl binary ${chacra_flags} create ${chacra_baseurl}/source
+find release/${vers}/rpm/*/RPMS/* | grep rpm | $VENV/chacractl binary ${chacra_flags} create ${chacra_baseurl}/${ARCH}
+
+echo "End Date: $(date)"
--- /dev/null
+#!/bin/bash
+#
+# Ceph distributed storage system
+#
+# Copyright (C) 2014 Red Hat <contact@redhat.com>
+#
+# Author: Loic Dachary <loic@dachary.org>
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License, or (at your option) any later version.
+#
+set -ex
+HOST=$(hostname --short)
+echo "Building on $(hostname) Date: $(date)"
+echo " DIST=${DIST}"
+echo " BPTAG=${BPTAG}"
+echo " KEYID=${KEYID}"
+echo " WS=$WORKSPACE"
+echo " PWD=$(pwd)"
+echo " BUILD SOURCE=$COPYARTIFACT_BUILD_NUMBER_CEPH_SETUP"
+echo "*****"
+env
+echo "*****"
+
+DIR=/tmp/install-deps.$$
+trap "rm -fr $DIR" EXIT
+mkdir -p $DIR
+if test $(id -u) != 0 ; then
+ SUDO=sudo
+fi
+export LC_ALL=C # the following is vulnerable to i18n
+
+if test -f /etc/redhat-release ; then
+ $SUDO yum install -y redhat-lsb-core
+fi
+
+if which apt-get > /dev/null ; then
+ $SUDO apt-get install -y lsb-release
+fi
+
+# unpack the tar.gz that contains the debian dir
+cd dist
+tar xzf *.orig.tar.gz
+cd ceph-*
+pwd
+
+
+
+case $(lsb_release -si) in
+CentOS|Fedora|SUSE*|RedHatEnterpriseServer)
+ case $(lsb_release -si) in
+ SUSE*)
+ $SUDO zypper -y yum-utils
+ ;;
+ *)
+ $SUDO yum install -y yum-utils
+ ;;
+ esac
+ sed -e 's/@//g' < ceph.spec.in > $DIR/ceph.spec
+ $SUDO yum-builddep -y $DIR/ceph.spec
+ ;;
+*)
+ echo "$(lsb_release -si) is unknown, dependencies will have to be installed manually."
+ ;;
+esac
+
+# Create the virtualenv
+virtualenv $WORKSPACE/venv
+VENV="$WORKSPACE/venv/bin"
+
+# Define and ensure the PIP cache
+PIP_SDIST_INDEX="$HOME/.cache/pip"
+mkdir -p $PIP_SDIST_INDEX
+
+CHACRACTL_VERSION="chacractl>=0.0.4"
+
+# download packages to the local pip cache
+$VENV/pip install --upgrade --exists-action=i --download="$PIP_SDIST_INDEX" $CHACRACTL_VERSION
+# install packages from the local pip cache, ignoring pypi
+$VENV/pip install --upgrade --exists-action=i --find-links="file://$PIP_SDIST_INDEX" --no-index $CHACRACTL_VERSION
+
+# create the .chacractl config file
+cat > $HOME/.chacractl << EOF
+url = "$CHACRACTL_URL"
+user = "$CHACRACTL_USER"
+key = "$CHACRACTL_KEY"
+EOF
--- /dev/null
+#!/bin/sh -x
+# This file will set the tgz images needed for pbuilder on a given host. It has
+# some hard-coded values like `/srv/debian-base` because it gets built every
+# time this file is executed - completely ephemeral. If a Debian host will use
+# pbuilder, then it will need this. Since it is not idempotent it makes
+# everything a bit slower. ## FIXME ##
+
+set -e
+
+# Only run when we are a Debian or Debian-based distro
+if test -f /etc/redhat-release ; then
+ exit 0
+fi
+
+basedir="/srv/debian-base"
+
+# Ensure that the basedir directory exists
+sudo mkdir -p "$basedir"
+
+# This used to live in a *file* on /srv/ceph-build as
+# /srv/ceph-build/update_pbuilder.sh Now it lives here because it doesn't make
+# sense to have a file that lives in /srv/ that we then concatenate to get its
+# contents. what.
+# By using $DIST we are narrowing down to updating only the distro image we
+# need, unlike before where we updated everything on every server on every
+# build.
+
+os="debian"
+[ "$DIST" = "precise" ] && os="ubuntu"
+[ "$DIST" = "saucy" ] && os="ubuntu"
+[ "$DIST" = "trusty" ] && os="ubuntu"
+
+if [ $os = "debian" ]; then
+ # We used to consume from an internal mirror
+ # ("http://apt-mirror.sepia.ceph.com/ftp.us.debian.org/debian") but given
+ # that it has caused us issues before (e.g. packages out of date) and that
+ # it currently does not have Jessie we are going to use a public mirror.
+ mirror="http://www.gtlib.gatech.edu/pub/debian"
+ othermirror=""
+else
+ mirror=""
+ othermirror="deb http://apt-mirror.sepia.ceph.com/archive.ubuntu.com/ubuntu $DIST main restricted universe multiverse"
+fi
+
+# ensure that the tgz is valid, otherwise remove it so that it can be recreated
+# again
+pbuild_tar="$basedir/$DIST.tgz"
+is_not_tar=`python -c "exec 'try: import tarfile;print int(not int(tarfile.is_tarfile(\"$pbuild_tar\")))\nexcept IOError: print 1'"`
+file_size_kb=`du -k "$pbuild_tar" | cut -f1`
+
+if $is_not_tar; then
+ sudo rm -f "$pbuild_tar"
+fi
+
+if [ $file_size_kb -lt 1 ]; then
+ sudo rm -f "$pbuild_tar"
+fi
+
+sudo pbuilder --clean
+
+if [ -e $basedir/$DIST.tgz ]; then
+ echo updating $DIST base.tgz
+ sudo pbuilder update \
+ --basetgz $basedir/$DIST.tgz \
+ --distribution $DIST \
+ --mirror "$mirror" \
+ --othermirror "$othermirror"
+else
+ echo building $DIST base.tgz
+ sudo pbuilder create \
+ --basetgz $basedir/$DIST.tgz \
+ --distribution $DIST \
+ --mirror "$mirror" \
+ --othermirror "$othermirror"
+fi
--- /dev/null
+- job:
+ name: ceph-build
+ project-type: matrix
+ defaults: global
+ display-name: 'ceph-build'
+ block-downstream: false
+ block-upstream: false
+ properties:
+ - github:
+ url: https://github.com/ceph/ceph
+
+ axes:
+ - axis:
+ type: label-expression
+ name: ARCH
+ values:
+ - x86_64
+ - axis:
+ type: label-expression
+ name: DIST
+ values:
+ - jessie
+ #- wheezy
+ #- precise
+ - trusty
+ #- centos6
+ - centos7
+
+ builders:
+ - shell: |
+ echo "Cleaning up workarea"
+ rm -rf dist
+ rm -rf release
+ - copyartifact:
+ project: ceph-setup
+ filter: 'dist/**'
+ which-build: last-successful
+ - shell:
+ !include-raw ../../build/setup
+ - shell:
+ !include-raw ../../build/setup_pbuilder
+ - shell:
+ !include-raw ../../build/build_deb
+ - shell:
+ !include-raw ../../build/build_rpm
+
+ publishers:
+ - archive:
+ artifacts: 'dist/**'
+ allow-empty: false
+ latest-only: false
+
+ wrappers:
+ - inject-passwords:
+ global: true
+ mask-password-params: true
+++ /dev/null
-- job:
- name: ceph-next
- description: 'This is the main ceph build task which uses chacra.ceph.com.'
- project-type: multijob
- defaults: global
- display-name: 'ceph-next'
- logrotate:
- daysToKeep: -1
- numToKeep: 25
- artifactDaysToKeep: 25
- artifactNumToKeep: 25
- 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"
- default: master
-
- - bool:
- name: TEST
- description: "
-If this is unchecked, then the builds will be pushed to chacra with the correct ref. This is the default.
-
-If this is checked, then the builds will be pushed to chacra under the 'test' ref."
- - bool:
- name: TAG
- description: "When this is checked, Jenkins will remove the previous private tag and recreate it again, changing the control files and committing again. When this is unchecked, Jenkins will not do any commit or tag operations. If you've already created the private tag separately, then leave this unchecked."
- default: true
-
- - bool:
- name: FORCE
- description: "
-If this is unchecked, then then nothing is built or pushed if they already exist in chacra. This is the default.
-
-If this is checked, then the binaries will be built and pushed to chacra even if they already exist in chacra."
- - string:
- name: VERSION
- description: "The version for release, e.g. 0.94.4"
-
- builders:
- - multijob:
- name: 'ceph tag phase'
- condition: SUCCESSFUL
- projects:
- - name: ceph-tag
- current-parameters: true
- exposed-scm: false
- - multijob:
- name: 'ceph setup phase'
- condition: SUCCESSFUL
- projects:
- - name: ceph-setup-next
- current-parameters: true
- exposed-scm: false
- - multijob:
- name: 'ceph build phase'
- condition: SUCCESSFUL
- projects:
- - name: ceph-build-next
- current-parameters: true
- exposed-scm: false
-
- wrappers:
- - inject-passwords:
- global: true
- mask-password-params: true
+++ /dev/null
-#!/bin/bash -ex
-
-HOST=$(hostname --short)
-echo "Building on ${HOST}"
-echo " DIST=${DIST}"
-echo " BPTAG=${BPTAG}"
-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"
-
-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
-
-# because autogen+configure will check for dependencies, we are forced to install them
-# and ensure they are present in the current host
-if [ -x install-deps.sh ]; then
- echo "Ensuring dependencies are installed"
- ./install-deps.sh
-fi
-
-# run submodule updates regardless
-echo "Running submodule update ..."
-git submodule update --init
-
-echo "Running autogen.sh ..."
-./autogen.sh
-echo "Running configure ..."
-./configure \
- --disable-option-checking \
- '--prefix=/usr' \
- '--sbindir=/sbin' \
- '--localstatedir=/var' \
- '--sysconfdir=/etc' \
- '--with-debug' \
- '--with-nss' \
- '--with-radosgw' \
- '--disable-static' \
- '--without-lttng' \
- 'CFLAGS= -Wno-unused-parameter' \
- 'CXXFLAGS= -Wno-unused-parameter' \
- --cache-file=/dev/null \
- --srcdir=.
-
-mkdir -p release
-
-# Contents below used to come from /srv/release_tarball.sh and
-# was called like::
-#
-# $bindir/release_tarball.sh release release/version
-
-releasedir='release'
-versionfile='release/version'
-
-if git diff --quiet ; then
- echo repository is clean
-else
- echo
- echo "**** REPOSITORY IS DIRTY ****"
- echo
- if [ "$force" != "force" ]; then
- echo "add 'force' argument if you really want to continue."
- exit 1
- fi
- echo "forcing."
-fi
-
-cephver=`git describe --match "v*" | sed s/^v//`
-echo current version $cephver
-
-srcdir=`pwd`
-
-if [ -d "$releasedir/$cephver" ]; then
- echo "$releasedir/$cephver already exists; reuse that release tarball"
-else
- echo building tarball
- rm ceph-*.tar.gz || true
- rm ceph-*.tar.bz2 || true
- make dist
- make dist-bzip2
-
- vers=`ls ceph-*.tar.gz | cut -c 6- | sed 's/.tar.gz//'`
- echo tarball vers $vers
-
- echo extracting
- mkdir -p $releasedir/$cephver/rpm
- cp rpm/*.patch $releasedir/$cephver/rpm || true
- cd $releasedir/$cephver
-
- tar zxf $srcdir/ceph-$vers.tar.gz
- [ "$vers" != "$cephver" ] && mv ceph-$vers ceph-$cephver
-
- tar zcf ceph_$cephver.orig.tar.gz ceph-$cephver
- cp -a ceph_$cephver.orig.tar.gz ceph-$cephver.tar.gz
-
- tar jcf ceph-$cephver.tar.bz2 ceph-$cephver
-
- # copy debian dir, too
- cp -a $srcdir/debian debian
- cd $srcdir
-
- # copy in spec file, too
- cp ceph.spec $releasedir/$cephver
-fi
-
-if [ -n "$versionfile" ]; then
- echo $cephver > $versionfile
- echo "wrote $cephver to $versionfile"
-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/.
+++ /dev/null
-- job:
- name: ceph-setup-next
- 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."
- # we do not need to pin this to trusty anymore for the new jenkins instance
- # FIXME: unpin when this gets ported over
- node: huge && trusty
- display-name: 'ceph-setup-next'
- 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@github.com:ceph/ceph-releases.git
- # Use the SSH key attached to the ceph-jenkins GitHub account.
- credentials-id: '39fa150b-b2a1-416e-b334-29a9a2c0b32d'
- branches:
- - $BRANCH
- skip-tag: true
- wipe-workspace: true
-
- builders:
- - shell:
- !include-raw ../../build/build
-
- publishers:
- - archive:
- artifacts: 'dist/**'
- allow-empty: false
- latest-only: false
-
- wrappers:
- - inject-passwords:
- global: true
- mask-password-params: true
- - ssh-agent-credentials:
- # "jenkins-build" SSH key, needed for access to ceph-releases.git
- users:
- - '39fa150b-b2a1-416e-b334-29a9a2c0b32d'
--- /dev/null
+#!/bin/bash -ex
+
+HOST=$(hostname --short)
+echo "Building on ${HOST}"
+echo " DIST=${DIST}"
+echo " BPTAG=${BPTAG}"
+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"
+
+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
+
+# because autogen+configure will check for dependencies, we are forced to install them
+# and ensure they are present in the current host
+if [ -x install-deps.sh ]; then
+ echo "Ensuring dependencies are installed"
+ ./install-deps.sh
+fi
+
+# run submodule updates regardless
+echo "Running submodule update ..."
+git submodule update --init
+
+echo "Running autogen.sh ..."
+./autogen.sh
+echo "Running configure ..."
+./configure \
+ --disable-option-checking \
+ '--prefix=/usr' \
+ '--sbindir=/sbin' \
+ '--localstatedir=/var' \
+ '--sysconfdir=/etc' \
+ '--with-debug' \
+ '--with-nss' \
+ '--with-radosgw' \
+ '--disable-static' \
+ '--without-lttng' \
+ 'CFLAGS= -Wno-unused-parameter' \
+ 'CXXFLAGS= -Wno-unused-parameter' \
+ --cache-file=/dev/null \
+ --srcdir=.
+
+mkdir -p release
+
+# Contents below used to come from /srv/release_tarball.sh and
+# was called like::
+#
+# $bindir/release_tarball.sh release release/version
+
+releasedir='release'
+versionfile='release/version'
+
+if git diff --quiet ; then
+ echo repository is clean
+else
+ echo
+ echo "**** REPOSITORY IS DIRTY ****"
+ echo
+ if [ "$force" != "force" ]; then
+ echo "add 'force' argument if you really want to continue."
+ exit 1
+ fi
+ echo "forcing."
+fi
+
+cephver=`git describe --match "v*" | sed s/^v//`
+echo current version $cephver
+
+srcdir=`pwd`
+
+if [ -d "$releasedir/$cephver" ]; then
+ echo "$releasedir/$cephver already exists; reuse that release tarball"
+else
+ echo building tarball
+ rm ceph-*.tar.gz || true
+ rm ceph-*.tar.bz2 || true
+ make dist
+ make dist-bzip2
+
+ vers=`ls ceph-*.tar.gz | cut -c 6- | sed 's/.tar.gz//'`
+ echo tarball vers $vers
+
+ echo extracting
+ mkdir -p $releasedir/$cephver/rpm
+ cp rpm/*.patch $releasedir/$cephver/rpm || true
+ cd $releasedir/$cephver
+
+ tar zxf $srcdir/ceph-$vers.tar.gz
+ [ "$vers" != "$cephver" ] && mv ceph-$vers ceph-$cephver
+
+ tar zcf ceph_$cephver.orig.tar.gz ceph-$cephver
+ cp -a ceph_$cephver.orig.tar.gz ceph-$cephver.tar.gz
+
+ tar jcf ceph-$cephver.tar.bz2 ceph-$cephver
+
+ # copy debian dir, too
+ cp -a $srcdir/debian debian
+ cd $srcdir
+
+ # copy in spec file, too
+ cp ceph.spec $releasedir/$cephver
+fi
+
+if [ -n "$versionfile" ]; then
+ echo $cephver > $versionfile
+ echo "wrote $cephver to $versionfile"
+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/.
--- /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."
+ # we do not need to pin this to trusty anymore for the new jenkins instance
+ # FIXME: unpin when this gets ported over
+ node: huge && trusty
+ display-name: 'ceph-setup'
+ 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@github.com:ceph/ceph-releases.git
+ # Use the SSH key attached to the ceph-jenkins GitHub account.
+ credentials-id: '39fa150b-b2a1-416e-b334-29a9a2c0b32d'
+ branches:
+ - $BRANCH
+ skip-tag: true
+ wipe-workspace: true
+
+ builders:
+ - shell:
+ !include-raw ../../build/build
+
+ publishers:
+ - archive:
+ artifacts: 'dist/**'
+ allow-empty: false
+ latest-only: false
+
+ wrappers:
+ - inject-passwords:
+ global: true
+ mask-password-params: true
+ - ssh-agent-credentials:
+ # "jenkins-build" SSH key, needed for access to ceph-releases.git
+ users:
+ - '39fa150b-b2a1-416e-b334-29a9a2c0b32d'
--- /dev/null
+- job:
+ name: ceph
+ description: 'This is the main ceph build task which uses chacra.ceph.com.'
+ project-type: multijob
+ defaults: global
+ display-name: 'ceph'
+ logrotate:
+ daysToKeep: -1
+ numToKeep: 25
+ artifactDaysToKeep: 25
+ artifactNumToKeep: 25
+ 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"
+ default: master
+
+ - bool:
+ name: TEST
+ description: "
+If this is unchecked, then the builds will be pushed to chacra with the correct ref. This is the default.
+
+If this is checked, then the builds will be pushed to chacra under the 'test' ref."
+ - bool:
+ name: TAG
+ description: "When this is checked, Jenkins will remove the previous private tag and recreate it again, changing the control files and committing again. When this is unchecked, Jenkins will not do any commit or tag operations. If you've already created the private tag separately, then leave this unchecked."
+ default: true
+
+ - bool:
+ name: FORCE
+ description: "
+If this is unchecked, then then nothing is built or pushed if they already exist in chacra. This is the default.
+
+If this is checked, then the binaries will be built and pushed to chacra even if they already exist in chacra."
+ - string:
+ name: VERSION
+ description: "The version for release, e.g. 0.94.4"
+
+ builders:
+ - multijob:
+ name: 'ceph tag phase'
+ condition: SUCCESSFUL
+ projects:
+ - name: ceph-tag
+ current-parameters: true
+ exposed-scm: false
+ - multijob:
+ name: 'ceph setup phase'
+ condition: SUCCESSFUL
+ projects:
+ - name: ceph-setup
+ current-parameters: true
+ exposed-scm: false
+ - multijob:
+ name: 'ceph build phase'
+ condition: SUCCESSFUL
+ projects:
+ - name: ceph-build
+ current-parameters: true
+ exposed-scm: false
+
+ wrappers:
+ - inject-passwords:
+ global: true
+ mask-password-params: true