From: Andrew Schoen Date: Mon, 16 Nov 2015 23:00:29 +0000 (-0600) Subject: ceph-build: use the check_binary_existence method X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=5fbefa62bbb90be2d53660092e39e573a1ad4b1e;p=ceph-build.git ceph-build: use the check_binary_existence method Signed-off-by: Andrew Schoen --- diff --git a/ceph-build/build/build_deb b/ceph-build/build/build_deb index 8fc2945d..e541b012 100644 --- a/ceph-build/build/build_deb +++ b/ceph-build/build/build_deb @@ -35,14 +35,8 @@ 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 - +# this exists in scripts/build_utils.sh +check_binary_existence $chacra_endpoint HOST=$(hostname --short) echo "Building on $(hostname) Date: $(date)" diff --git a/ceph-build/build/build_rpm b/ceph-build/build/build_rpm index df030fb5..b0956587 100644 --- a/ceph-build/build/build_rpm +++ b/ceph-build/build/build_rpm @@ -61,13 +61,8 @@ 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 +# this exists in scripts/build_utils.sh +check_binary_existence $chacra_baseurl/$ARCH HOST=$(hostname --short) echo "Building on $(hostname) Date: $(date)"