From: Andrew Schoen Date: Wed, 28 Oct 2015 21:09:31 +0000 (-0500) Subject: activate the virtualenv so we don't have to use the full path X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F180%2Fhead;p=ceph-build.git activate the virtualenv so we don't have to use the full path Signed-off-by: Andrew Schoen --- diff --git a/ceph-build-next/build/build_deb b/ceph-build-next/build/build_deb index 662df0b2..44ca826e 100644 --- a/ceph-build-next/build/build_deb +++ b/ceph-build-next/build/build_deb @@ -6,6 +6,9 @@ if test -f /etc/redhat-release ; then exit 0 fi +# activate the virtualenv +$WORKSPACE/venv/bin/activate + get_bptag() { dist=$1 @@ -33,7 +36,7 @@ vers=`cat ./dist/version` distro=`python -c "exec 'import platform; print platform.linux_distribution()[0].lower()'"` chacra_endpoint="ceph/${chacra_ref}/${distro}/{$dist}/${ARCH}" -$WORKSPACE/venv/bin/chacractl exists binaries/${chacra_endpoint}; exists=$? || true +chacractl exists binaries/${chacra_endpoint}; exists=$? || true # if the binary already exists in chacra, do not rebuild if [ $exists -e 0 ] && [ "$FORCE" = false ] ; then @@ -173,7 +176,7 @@ echo "Start Time = $start_time" echo " End Time = $(date)" # push binaries to chacra -find release/$vers/ | grep 'changes\|deb\|dsc\|gz' | $WORKSPACE/venv/bin/chacractl binary create ${chacra_endpoint} +find release/$vers/ | grep 'changes\|deb\|dsc\|gz' | chacractl binary create ${chacra_endpoint} echo "End Date: $(date)" diff --git a/ceph-build-next/build/build_rpm b/ceph-build-next/build/build_rpm index b1773e34..90373d5f 100644 --- a/ceph-build-next/build/build_rpm +++ b/ceph-build-next/build/build_rpm @@ -5,6 +5,9 @@ if [[ ! -f /etc/redhat-release && ! -f /usr/bin/zypper ]] ; then exit 0 fi +# activate the virtualenv +$WORKSPACE/venv/bin/activate + get_rpm_dist() { LSB_RELEASE=/usr/bin/lsb_release [ ! -x $LSB_RELEASE ] && echo unknown && exit @@ -59,7 +62,7 @@ vers=`cat ./dist/version` [ "$TEST" = true ] && chacra_ref="test" || chacra_ref="$BRANCH" chacra_baseurl="ceph/${chacra_ref}/${DISTRO}/${RELEASE}" -$WORKSPACE/venv/bin/chacractl exists binaries/${chacra_baseurl}/${ARCH}; exists=$? || true +chacractl exists binaries/${chacra_baseurl}/${ARCH}; exists=$? || true # if the binary already exists in chacra, do not rebuild if [ $exists -e 0 ] && [ "$FORCE" = false ]; then @@ -115,7 +118,7 @@ cd "$WORKSPACE" # push binaries to chacra -find release/${vers}/rpm/*/SRPMS | grep rpm | $WORKSPACE/venv/bin/chacractl binary create ${chacra_baseurl}/source -find release/${vers}/rpm/*/RPMS/* | grep rpm | $WORKSPACE/venv/bin/chacractl binary create ${chacra_baseurl}/${ARCH} +find release/${vers}/rpm/*/SRPMS | grep rpm | chacractl binary create ${chacra_baseurl}/source +find release/${vers}/rpm/*/RPMS/* | grep rpm | chacractl binary create ${chacra_baseurl}/${ARCH} echo "End Date: $(date)"