exit 0
fi
+## Get the desired CEPH_BRANCH/CEPH_SHA1 ceph repo
+# Get repo file from appropriate shaman build
+REPO_URL="https://shaman.ceph.com/api/repos/ceph/$CEPH_BRANCH/$CEPH_SHA1/$DISTRO/$DIST/repo"
+TIME_LIMIT=1200
+INTERVAL=30
+REPO_FOUND=0
+
+# poll shaman for up to 10 minutes
+while [ "$SECONDS" -le "$TIME_LIMIT" ]
+do
+ if `curl --fail -L ${REPO_URL} > $WORKSPACE/shaman.list`; then
+ echo "Ceph debian lib repo exists in shaman"
+ REPO_FOUND=1
+ break
+ else
+ sleep $INTERVAL
+ fi
+done
+
+if [[ "$REPO_FOUND" -eq 0 ]]; then
+ echo "Ceph debian lib repo does NOT exist in shaman"
+ exit 1
+fi
+
+# Copy the repo
+sudo cp $WORKSPACE/shaman.list /etc/apt/sources.list.d/
## Install any setup-time deps
+# Make sure we use the latest version of libcephfs-dev
+sudo apt-get remove -y libcephfs-dev || true
+
# We need these for the build
-sudo apt-get update && sudo apt-get install -y build-essential equivs libgnutls-dev libacl1-dev libldap2-dev ruby ruby-dev
+sudo apt-get update && sudo apt-get install -y build-essential equivs libgnutls-dev libacl1-dev libldap2-dev ruby ruby-dev libcephfs-dev
# We use fpm to create the deb package
sudo gem install fpm
exit 0
fi
+RELEASE="$(lsb_release --short -r | cut -d '.' -f 1)" # sytem release
+
+## Get the desired CEPH_BRANCH/CEPH_SHA1 ceph repo
+# Get .repo file from appropriate shaman build
+REPO_URL="https://shaman.ceph.com/api/repos/ceph/$CEPH_BRANCH/$CEPH_SHA1/$DISTRO/$RELEASE/flavors/default/repo"
+TIME_LIMIT=1200
+INTERVAL=30
+REPO_FOUND=0
+
+# poll shaman for up to 10 minutes
+while [ "$SECONDS" -le "$TIME_LIMIT" ]
+do
+ if `curl --fail -L $REPO_URL > $WORKSPACE/shaman.repo`; then
+ echo "Ceph repo file has been added from shaman"
+ REPO_FOUND=1
+ break
+ else
+ sleep $INTERVAL
+ fi
+done
+
+if [[ "$REPO_FOUND" -eq 0 ]]; then
+ echo "Ceph lib repo does NOT exist in shaman"
+ exit 1
+fi
+
+# Copy the repo
+sudo cp $WORKSPACE/shaman.repo /etc/yum.repos.d/
## Install any setup-time deps
+# We modified the repos, clean cache first
+sudo yum clean all
+
# We need these for the build
-sudo yum install -y gnutls-devel libacl-devel openldap-devel rubygems ruby-devel
+sudo yum install -y gnutls-devel libacl-devel openldap-devel rubygems ruby-devel libcephfs-devel
# We use fpm to create the deb package
sudo gem install fpm
## Get some basic information about the system and the repository
# Get version
export LD_LIBRARY_PATH=${DESTDIR}/usr/local/samba/lib/:${DESTDIR}/usr/local/samba/lib/private/
-RELEASE="$(lsb_release --short -r | cut -d '.' -f 1)" # system release
VERSION=$(${DESTDIR}/usr/local/samba/sbin/smbd --version | sed -e "s|Version ||")
REVISION="$(git rev-parse HEAD)"
description: "The git branch (or tag) to build"
default: "master"
+ - string:
+ name: CEPH_SHA1
+ description: "The SHA1 of the ceph branch"
+ default: "latest"
+
+ - string:
+ name: CEPH_BRANCH
+ description: "The branch of Ceph to get the repo file of for libcephfs"
+ default: "master"
+
- string:
name: DISTROS
description: "A list of distros to build for. Available options are: xenial, centos7, centos6, trusty-pbuilder, precise, wheezy, and jessie"