set -ex
+# set to "true" or "false" so that both string comparisons
+# and 'if $CI_CONTAINER' work as expected. Conventions vary across the
+# set of shell scripts and repos involved.
+CI_CONTAINER=${CI_CONTAINER:-false}
+
# create a release directory for ceph-build tools
mkdir -p release
cp -a dist release/${vers}
echo Check the status of the repo at: https://shaman.ceph.com/api/repos/${chacra_endpoint}/flavors/${FLAVOR}/
fi
+# XXX perhaps use job parameters instead of literals; then
+# later stages can also use them to compare etc.
+if [[ $CI_CONTAINER == "true" && $DISTRO == "centos" && $RELEASE == "7" && $FLAVOR == "default" ]] ; then
+ loop=0
+ ready=false
+ while ((loop < 15)); do
+ if [[ $(curl -s https://shaman.ceph.com/api/repos/${chacra_endpoint}/flavors/${FLAVOR}/ | jq '.[0].status') == '"ready"' ]] ; then ready=true; break; fi
+ ((loop = loop + 1))
+ sleep 60
+ done
+
+ if [[ "$ready" == "false" ]] ; then
+ echo "FAIL: timed out waiting for shaman repo to be built: https://shaman.ceph.com/api/repos/${chacra_endpoint}/flavors/${FLAVOR}/"
+ # don't fail the build here on purpose
+ # update_build_status "failed" "ceph" $NORMAL_DISTRO $NORMAL_DISTRO_VERSION $NORMAL_ARCH
+ # exit 1
+ fi
+
+ cd $WORKSPACE/ceph-container
+ # avoid failing the build if build-push fails
+ CI_CONTAINER=${CI_CONTAINER} SHA1=${SHA1} /bin/bash ./contrib/build-push-ceph-container-imgs.sh || /bin/true
+ cd $WORKSPACE
+fi
+
# update shaman with the completed build status
update_build_status "completed" "ceph" $NORMAL_DISTRO $NORMAL_DISTRO_VERSION $NORMAL_ARCH
default: "default"
description: "Type of Ceph build, choices are: crimson, notcmalloc, default (i.e. with tcmalloc). Defaults to: 'default'"
+ - string:
+ name: CI_CONTAINER
+ description: 'Build container with development release of Ceph. Note: this must be "false" or "true" so that it can execute a command or satisfy a string comparison'
+ default: "true"
+
- string:
name: CONTAINER_BRANCH
description: "For CI_CONTAINER: Branch of ceph-container to use"
default: master
+ - string:
+ name: CONTAINER_REPO_HOSTNAME
+ description: "For CI_CONTAINER: Name of container repo server (i.e. 'quay.io')"
+ default: "quay.io"
+
+ - string:
+ name: CONTAINER_REPO_ORGANIZATION
+ description: "For CI_CONTAINER: Name of container repo organization (i.e. 'cephci')"
+ default: "cephci"
+
builders:
- multijob:
name: 'ceph dev setup phase'