From cb9c815262914d78156f22e4ba8e251adf485b6c Mon Sep 17 00:00:00 2001 From: Andrew Schoen Date: Wed, 28 Oct 2015 16:09:31 -0500 Subject: [PATCH] activate the virtualenv so we don't have to use the full path Signed-off-by: Andrew Schoen --- ceph-build-next/build/build_deb | 7 +++++-- ceph-build-next/build/build_rpm | 9 ++++++--- 2 files changed, 11 insertions(+), 5 deletions(-) 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)" -- 2.47.3