if [ "$THROWAWAY" = false ] ; then
# this exists in scripts/build_utils.sh
- check_binary_existence $chacra_check_url
+ check_binary_existence $VENV $chacra_check_url
fi
HOST=$(hostname --short)
esac
pkgs=( "chacractl>=0.0.21" )
-install_python_packages "pkgs[@]"
+install_python_packages $TEMPVENV "pkgs[@]"
# ask shaman which chacra instance to use
chacra_url=`curl -f -u $SHAMAN_API_USER:$SHAMAN_API_KEY https://shaman.ceph.com/api/nodes/next/`
export LC_ALL=C # the following is vulnerable to i18n
pkgs=( "chacractl>=0.0.21" )
-install_python_packages "pkgs[@]"
+install_python_packages $TEMPVENV "pkgs[@]"
# ask shaman which chacra instance to use
chacra_url=`curl -f -u $SHAMAN_API_USER:$SHAMAN_API_KEY https://shaman.ceph.com/api/nodes/next/`
# the following two methods exist in scripts/build_utils.sh
pkgs=( "tox" )
-install_python_packages "pkgs[@]"
+install_python_packages $TEMPVENV "pkgs[@]"
cd $WORKSPACE/docs/
$VENV/tox -rv
# the following two methods exist in scripts/build_utils.sh
pkgs=( "tox" )
-install_python_packages "pkgs[@]"
+install_python_packages $TEMPVENV "pkgs[@]"
# trims leading slashes
BRANCH=${GIT_BRANCH#*/}
# the following two methods exist in scripts/build_utils.sh
pkgs=( "tox" )
-install_python_packages "pkgs[@]"
+install_python_packages $TEMPVENV "pkgs[@]"
# XXX this might not be needed
source $VENV/activate
cd $WORKSPACE/tests
# the method exists in scripts/build_utils.sh
-teardown_vagrant_tests
+teardown_vagrant_tests $VENV
# the following two methods exist in scripts/build_utils.sh
pkgs=( "tox" )
-install_python_packages "pkgs[@]"
+install_python_packages $TEMPVENV "pkgs[@]"
# XXX this might not be needed
source $VENV/activate
[[ "$ghprbTargetBranch" != stable-3.2 && "$SCENARIO" == shrink_osd_legacy ]] ||
[[ "$ghprbTargetBranch" =~ stable-3 && "$SCENARIO" == filestore_to_bluestore ]] ||
[[ "$ghprbTargetBranch" == stable-5.0 && "$DEPLOYMENT" == "non_container" && "$SCENARIO" == update ]] ||
-start_tox
+start_tox $TEMPVENV
# Update scenario on stable-5.0 must be enabled back once 15.2.8 is out
cd $WORKSPACE/tests
# the method exists in scripts/build_utils.sh
-teardown_vagrant_tests
+teardown_vagrant_tests $VENV
# clean fact cache
rm -rf $HOME/ansible/facts/*
# Chacra time
pkgs=( "chacractl>=0.0.21" )
-install_python_packages "pkgs[@]"
+install_python_packages $TEMPVENV "pkgs[@]"
# ask shaman which chacra instance to use
chacra_url=`curl -u $SHAMAN_API_USER:$SHAMAN_API_KEY https://shaman.ceph.com/api/nodes/next/`
# the following two methods exist in scripts/build_utils.sh
pkgs=( "tox" )
-install_python_packages "pkgs[@]"
+install_python_packages $TEMPVENV "pkgs[@]"
# XXX this might not be needed
source $VENV/activate
# In the same logic, clean fact cache
rm -rf $HOME/ansible/facts/*
-start_tox
\ No newline at end of file
+start_tox
cd $WORKSPACE/tests
# the method exists in scripts/build_utils.sh
-teardown_vagrant_tests
+teardown_vagrant_tests $VENV
# clean fact cache
-rm -rf $HOME/ansible/facts/*
\ No newline at end of file
+rm -rf $HOME/ansible/facts/*
# must pin urllib3 to 1.22 because 1.23 is incompatible with requests, which
# is used by jenkins-job-builder
pkgs=( "ansible" "jenkins-job-builder>=3.5.0" "urllib3==1.22" "pyopenssl" "ndg-httpsclient" "pyasn1" )
-install_python_packages "pkgs[@]"
+install_python_packages $TEMPVENV "pkgs[@]"
# Test every definition if available in the current repository and update the jobs
#!/bin/bash
set -ex
-build_debs ${vers} ${debian_version}
+build_debs ${VENV} ${vers} ${debian_version}
create_build_status "started" "ceph" $NORMAL_DISTRO $NORMAL_DISTRO_VERSION $NORMAL_ARCH
pkgs=( "chacractl>=0.0.21" )
-install_python_packages "pkgs[@]"
+install_python_packages $TEMPVENV "pkgs[@]"
chacra_url=https://chacra.ceph.com/
make_chacractl_config
if [ "$THROWAWAY" = false ] ; then
# this exists in scripts/build_utils.sh
# TODO if this exits we need to post to shaman a success
- check_binary_existence $chacra_check_url
+ check_binary_existence $VENV $chacra_check_url
fi
create_build_status "started" "ceph" $NORMAL_DISTRO $NORMAL_DISTRO_VERSION $NORMAL_ARCH
pkgs=( "chacractl>=0.0.21" )
-install_python_packages "pkgs[@]"
+install_python_packages $TEMPVENV "pkgs[@]"
# create the .chacractl config file using global variables
make_chacractl_config
if [ "$THROWAWAY" = false ] ; then
# this exists in scripts/build_utils.sh
# TODO if this exits we need to post to shaman a success
- check_binary_existence $chacra_check_url
+ check_binary_existence $VENV $chacra_check_url
fi
# the following two methods exist in scripts/build_utils.sh
pkgs=( "tox" )
-install_python_packages "pkgs[@]"
+install_python_packages $TEMPVENV "pkgs[@]"
# XXX this might not be needed
source $VENV/activate
# the following two methods exist in scripts/build_utils.sh
pkgs=( "tox" )
-install_python_packages "pkgs[@]"
+install_python_packages $TEMPVENV "pkgs[@]"
# XXX this might not be needed
source $VENV/activate
# this exists in scripts/build_utils.sh for ceph-deploy, binaries have
# no architecture so we POST them to 'noarch' for rpms
- check_binary_existence $chacra_endpoint/noarch
+ check_binary_existence $VENV $chacra_endpoint/noarch
if [ ! -e setup.py ] ; then
echo "Are we in the right directory"
chacra_endpoint="ceph-deploy/${chacra_ref}/${GIT_COMMIT}/${DISTRO}/universal/all"
# this exists in scripts/build_utils.sh
- check_binary_existence $chacra_endpoint
+ check_binary_existence $VENV $chacra_endpoint
if [ ! -d debian ] ; then
echo "Are we in the right directory"
fi
pkgs=( "chacractl>=0.0.21" )
-install_python_packages "pkgs[@]"
+install_python_packages $TEMPVENV "pkgs[@]"
# ask shaman which chacra instance to use
chacra_url=`curl -u $SHAMAN_API_USER:$SHAMAN_API_KEY https://shaman.ceph.com/api/nodes/next/`
# the following two methods exist in scripts/build_utils.sh
pkgs=( "tox" )
-install_python_packages "pkgs[@]"
+install_python_packages $TEMPVENV "pkgs[@]"
# create the docs build with tox
$VENV/tox -rv -e docs
# the following two methods exist in scripts/build_utils.sh
pkgs=( "ansible" "tox" )
-install_python_packages "pkgs[@]"
+install_python_packages $TEMPVENV "pkgs[@]"
# run ansible to get this current host to meet our requirements, specifying
# the following two methods exist in scripts/build_utils.sh
pkgs=( "ansible" )
-install_python_packages "pkgs[@]"
+install_python_packages $TEMPVENV "pkgs[@]"
# run ansible to do all the tagging and release specifying
# a local connection and 'localhost' as the host where to execute
#!/bin/bash
set -ex
-build_debs ${vers} ${debian_version}
+build_debs $VENV ${vers} ${debian_version}
create_build_status "started" "ceph" $NORMAL_DISTRO $NORMAL_DISTRO_VERSION $NORMAL_ARCH
pkgs=( "chacractl>=0.0.21" )
-install_python_packages "pkgs[@]"
+install_python_packages $TEMPVENV "pkgs[@]"
# ask shaman which chacra instance to use
chacra_url=`curl -u $SHAMAN_API_USER:$SHAMAN_API_KEY https://shaman.ceph.com/api/nodes/next/`
if [ "$THROWAWAY" = false ] ; then
# this exists in scripts/build_utils.sh
# TODO if this exits we need to post to shaman a success
- check_binary_existence $chacra_check_url
+ check_binary_existence $VENV $chacra_check_url
fi
create_build_status "started" "ceph" $NORMAL_DISTRO $NORMAL_DISTRO_VERSION $NORMAL_ARCH
pkgs=( "chacractl>=0.0.21" )
-install_python_packages "pkgs[@]"
+install_python_packages $TEMPVENV "pkgs[@]"
# ask shaman which chacra instance to use
chacra_url=`curl -u $SHAMAN_API_USER:$SHAMAN_API_KEY https://shaman.ceph.com/api/nodes/next/`
if [ "$THROWAWAY" = false ] ; then
# this exists in scripts/build_utils.sh
# TODO if this exits we need to post to shaman a success
- check_binary_existence $chacra_check_url
+ check_binary_existence $VENV $chacra_check_url
fi
create_build_status "started" "ceph" $NORMAL_DISTRO $NORMAL_DISTRO_VERSION $NORMAL_ARCH
pkgs=( "chacractl>=0.0.21" )
-install_python_packages "pkgs[@]"
+install_python_packages $TEMPVENV "pkgs[@]"
# ask shaman which chacra instance to use
chacra_url=`curl -u $SHAMAN_API_USER:$SHAMAN_API_KEY https://shaman.ceph.com/api/nodes/next/`
if [ "$THROWAWAY" = false ] ; then
# this exists in scripts/build_utils.sh
# TODO if this exits we need to post to shaman a success
- check_binary_existence $chacra_check_url
+ check_binary_existence $VENV $chacra_check_url
fi
#!/bin/bash
set -ex
-build_debs ${vers} ${debian_version}
+build_debs ${VENV} ${vers} ${debian_version}
create_build_status "started" "ceph" $NORMAL_DISTRO $NORMAL_DISTRO_VERSION $NORMAL_ARCH
pkgs=( "chacractl>=0.0.21" )
-install_python_packages "pkgs[@]"
+install_python_packages $TEMPVENV "pkgs[@]"
# ask shaman which chacra instance to use
chacra_url=`curl -u $SHAMAN_API_USER:$SHAMAN_API_KEY https://shaman.ceph.com/api/nodes/next/`
if [ "$THROWAWAY" = false ] ; then
# this exists in scripts/build_utils.sh
# TODO if this exits we need to post to shaman a success
- check_binary_existence $chacra_check_url
+ check_binary_existence $VENV $chacra_check_url
fi
create_build_status "started" "ceph" $NORMAL_DISTRO $NORMAL_DISTRO_VERSION $NORMAL_ARCH
pkgs=( "chacractl>=0.0.21" )
-install_python_packages "pkgs[@]"
+install_python_packages $TEMPVENV "pkgs[@]"
# ask shaman which chacra instance to use
chacra_url=`curl -u $SHAMAN_API_USER:$SHAMAN_API_KEY https://shaman.ceph.com/api/nodes/next/`
if [ "$THROWAWAY" = false ] ; then
# this exists in scripts/build_utils.sh
# TODO if this exits we need to post to shaman a success
- check_binary_existence $chacra_check_url
+ check_binary_existence $VENV $chacra_check_url
fi
# We need Ubuntu Focal to cross-compile Ceph for Windows.
create_build_status "started" "ceph" $NORMAL_DISTRO $NORMAL_DISTRO_VERSION $NORMAL_ARCH
pkgs=( "chacractl>=0.0.21" )
-install_python_packages "pkgs[@]"
+install_python_packages $TEMPVENV "pkgs[@]"
# ask shaman which chacra instance to use
chacra_url=`curl -u $SHAMAN_API_USER:$SHAMAN_API_KEY https://shaman.ceph.com/api/nodes/next/`
if [ "$THROWAWAY" = false ] ; then
# this exists in scripts/build_utils.sh
# TODO if this exits we need to post to shaman a success
- check_binary_existence $chacra_check_url
+ check_binary_existence $VENV $chacra_check_url
fi
# the following two methods exist in scripts/build_utils.sh
pkgs=( "tox" )
-install_python_packages "pkgs[@]"
+install_python_packages $TEMPVENV "pkgs[@]"
cd "$WORKSPACE/ceph-iscsi-cli"
export LC_ALL=C # the following is vulnerable to i18n
pkgs=( "chacractl>=0.0.21" )
-install_python_packages "pkgs[@]"
+install_python_packages $TEMPVENV "pkgs[@]"
# ask shaman which chacra instance to use
chacra_url=`curl -f -u $SHAMAN_API_USER:$SHAMAN_API_KEY https://shaman.ceph.com/api/nodes/next/`
# the following two methods exist in scripts/build_utils.sh
pkgs=( "tox" )
-install_python_packages "pkgs[@]"
+install_python_packages $TEMPVENV "pkgs[@]"
cd "$WORKSPACE/ceph-iscsi-config"
export LC_ALL=C # the following is vulnerable to i18n
pkgs=( "chacractl>=0.0.21" )
-install_python_packages "pkgs[@]"
+install_python_packages $TEMPVENV "pkgs[@]"
# ask shaman which chacra instance to use
chacra_url=`curl -f -u $SHAMAN_API_USER:$SHAMAN_API_KEY https://shaman.ceph.com/api/nodes/next/`
export LC_ALL=C # the following is vulnerable to i18n
pkgs=( "chacractl>=0.0.21" )
-install_python_packages "pkgs[@]"
+install_python_packages $TEMPVENV "pkgs[@]"
chacra_url="https://chacra.ceph.com/"
# create the .chacractl config file using global variables
export LC_ALL=C # the following is vulnerable to i18n
pkgs=( "chacractl>=0.0.21" )
-install_python_packages "pkgs[@]"
+install_python_packages $TEMPVENV "pkgs[@]"
# ask shaman which chacra instance to use
chacra_url=`curl -f -u $SHAMAN_API_USER:$SHAMAN_API_KEY https://shaman.ceph.com/api/nodes/next/`
# the following two methods exist in scripts/build_utils.sh
pkgs=( "tox" )
-install_python_packages "pkgs[@]"
+install_python_packages $TEMPVENV "pkgs[@]"
cd "$WORKSPACE/ceph-iscsi"
export LC_ALL=C # the following is vulnerable to i18n
pkgs=( "chacractl>=0.0.21" )
-install_python_packages "pkgs[@]"
+install_python_packages $TEMPVENV "pkgs[@]"
# ask shaman which chacra instance to use
chacra_url=`curl -f -u $SHAMAN_API_USER:$SHAMAN_API_KEY https://shaman.ceph.com/api/nodes/next/`
# the following two methods exist in scripts/build_utils.sh
pkgs=( "tox" )
-install_python_packages "pkgs[@]"
+install_python_packages $TEMPVENV "pkgs[@]"
# trims leading slashes
BRANCH=`branch_slash_filter ${GIT_BRANCH}`
# the following two methods exist in scripts/build_utils.sh
pkgs=( "tox" )
-install_python_packages "pkgs[@]"
+install_python_packages $TEMPVENV "pkgs[@]"
sudo yum install -y epel-release
sudo yum --enablerepo epel install -y python36
# Chacra time
pkgs=( "chacractl>=0.0.21" )
-install_python_packages "pkgs[@]"
+install_python_packages $TEMPVENV "pkgs[@]"
make_chacractl_config
# Chacra time
pkgs=( "chacractl>=0.0.21" )
-install_python_packages "pkgs[@]"
+install_python_packages $TEMPVENV "pkgs[@]"
# ask shaman which chacra instance to use
chacra_url=`curl -u $SHAMAN_API_USER:$SHAMAN_API_KEY https://shaman.ceph.com/api/nodes/next/`
# the following two methods exist in scripts/build_utils.sh
pkgs=( "tox" )
-install_python_packages "pkgs[@]"
+install_python_packages $TEMPVENV "pkgs[@]"
WORKDIR=$(mktemp -td tox.XXXXXXXXXX)
# the following two methods exist in scripts/build_utils.sh
pkgs=( "pytest" )
-install_python_packages "pkgs[@]"
+install_python_packages $TEMPVENV "pkgs[@]"
cd "$WORKSPACE"
timeout 600 $VENV/py.test -m "${pytest_mark}" -vs --junitxml="$WORKSPACE/report.xml" "$WORKSPACE/ceph-build/ceph-pr-commits/build/test_commits.py"
# the following two methods exist in scripts/build_utils.sh
pkgs=( "tox" )
-install_python_packages "pkgs[@]"
+install_python_packages $TEMPVENV "pkgs[@]"
# run tox by recreating the environment and in verbose mode
rm -rf RPMBUILD
pkgs=( "chacractl>=0.0.21" )
-install_python_packages "pkgs[@]"
+install_python_packages $TEMPVENV "pkgs[@]"
# create the .chacractl config file using global variables
make_chacractl_config
fi
echo "Target directory is: $target"
-check_binary_existence $chacra_baseurl/noarch
+check_binary_existence $VENV $chacra_baseurl/noarch
# setup rpm build area
mkdir -p RPMBUILD/{BUILD,RPMS,SOURCES,SPECS,SRPMS}
# the following two methods exist in scripts/build_utils.sh
pkgs=( "ansible" )
-install_python_packages "pkgs[@]"
+install_python_packages $TEMPVENV "pkgs[@]"
# run ansible to do all the tagging and release specifying
# a local connection and 'localhost' as the host where to execute
# the following two methods exist in scripts/build_utils.sh
pkgs=( "tox" "github-status>0.0.3" )
-install_python_packages "pkgs[@]"
+install_python_packages $TEMPVENV "pkgs[@]"
GITHUB_STATUS_STATE="pending" $VENV/github-status create
# the following two methods exist in scripts/build_utils.sh
pkgs=( "tox" "github-status>0.0.3" )
-install_python_packages "pkgs[@]"
+install_python_packages $TEMPVENV "pkgs[@]"
GITHUB_STATUS_STATE="failure" $VENV/github-status create
cd $WORKSPACE/src/ceph-volume/ceph_volume/tests/functional
# the method exists in scripts/build_utils.sh
-teardown_vagrant_tests
+teardown_vagrant_tests $VENV
# the following two methods exist in scripts/build_utils.sh
pkgs=( "tox" )
-install_python_packages "pkgs[@]"
+install_python_packages $TEMPVENV "pkgs[@]"
prune_stale_vagrant_vms $WORKSPACE/../**/tests
delete_libvirt_vms
scenarios=$(find . | grep vagrant_ssh_config | xargs -r dirname)
# the method exists in scripts/build_utils.sh
-teardown_vagrant_tests
+teardown_vagrant_tests $VENV
# the following two methods exist in scripts/build_utils.sh
pkgs=( "tox" "github-status>0.0.3")
-install_python_packages "pkgs[@]"
+install_python_packages $TEMPVENV "pkgs[@]"
cd src/ceph-volume
# the following two methods exist in scripts/build_utils.sh
pkgs=( "github-status>0.0.3" )
-install_python_packages "pkgs[@]"
+install_python_packages $TEMPVENV "pkgs[@]"
GITHUB_STATUS_STATE="failure" $VENV/github-status create
# the following two methods exist in scripts/build_utils.sh
pkgs=( "tox" )
-install_python_packages "pkgs[@]"
+install_python_packages $TEMPVENV "pkgs[@]"
delete_libvirt_vms
cd $WORKSPACE/src/ceph-volume/ceph_volume/tests/functional
# the method exists in scripts/build_utils.sh
-teardown_vagrant_tests
+teardown_vagrant_tests $VENV
# the following two methods exist in scripts/build_utils.sh
pkgs=( "tox" )
-install_python_packages "pkgs[@]"
+install_python_packages $TEMPVENV "pkgs[@]"
# XXX this might not be needed
source $VENV/activate
cd "${WORKSPACE}"/tests
# the method exists in scripts/build_utils.sh
-teardown_vagrant_tests
+teardown_vagrant_tests $VENV
# clean fact cache
rm -rf "${HOME}"/ansible/facts/*
fi
pkgs=( "tox" )
-install_python_packages "pkgs[@]"
+install_python_packages $TEMPVENV "pkgs[@]"
export LC_ALL=C # the following is vulnerable to i18n
pkgs=( "chacractl>=0.0.21" )
-install_python_packages "pkgs[@]"
+install_python_packages $TEMPVENV "pkgs[@]"
# create the .chacractl config file using global variables
make_chacractl_config
export LC_ALL=C # the following is vulnerable to i18n
pkgs=( "chacractl>=0.0.21" )
-install_python_packages "pkgs[@]"
+install_python_packages $TEMPVENV "pkgs[@]"
# ask shaman which chacra instance to use
chacra_url=`curl -f -u $SHAMAN_API_USER:$SHAMAN_API_KEY https://shaman.ceph.com/api/nodes/next/`
# the following two methods exist in scripts/build_utils.sh
pkgs=( "ansible" "tox" )
-install_python_packages "pkgs[@]"
+install_python_packages $TEMPVENV "pkgs[@]"
# run ansible to get this current host to meet our requirements, specifying
# a local connection and 'localhost' as the host where to execute
export LC_ALL=C # the following is vulnerable to i18n
pkgs=( "chacractl>=0.0.21" )
-install_python_packages "pkgs[@]"
+install_python_packages $TEMPVENV "pkgs[@]"
# ask shaman which chacra instance to use
chacra_url=`curl -f -u $SHAMAN_API_USER:$SHAMAN_API_KEY https://shaman.ceph.com/api/nodes/next/`
if [ "$THROWAWAY" = false ] ; then
# this exists in scripts/build_utils.sh
- check_binary_existence $chacra_check_url
+ check_binary_existence $VENV $chacra_check_url
fi
HOST=$(hostname --short)
if [ "$THROWAWAY" = false ] ; then
# this exists in scripts/build_utils.sh
- check_binary_existence $chacra_check_url
+ check_binary_existence $VENV $chacra_check_url
fi
HOST=$(hostname --short)
esac
pkgs=( "chacractl>=0.0.21" )
-install_python_packages "pkgs[@]"
+install_python_packages $TEMPVENV "pkgs[@]"
# ask shaman which chacra instance to use
chacra_url=`curl -f -u $SHAMAN_API_USER:$SHAMAN_API_KEY https://shaman.ceph.com/api/nodes/next/`
# the following two methods exist in scripts/build_utils.sh
pkgs=( "jenkins-job-builder>=3.5.0" )
-install_python_packages "pkgs[@]" latest
+install_python_packages $TEMPVENV "pkgs[@]" latest
# Wipe out JJB's cache if $FORCE is set.
[ "$FORCE" = true ] && rm -rf "$HOME/.cache/jenkins_jobs/"
if [ "$THROWAWAY" = false ] ; then
# this exists in scripts/build_utils.sh
- check_binary_existence $chacra_check_url
+ check_binary_existence $VENV $chacra_check_url
fi
HOST=$(hostname --short)
if [ "$THROWAWAY" = false ] ; then
# this exists in scripts/build_utils.sh
- check_binary_existence $chacra_check_url
+ check_binary_existence $VENV $chacra_check_url
fi
HOST=$(hostname --short)
esac
pkgs=( "chacractl>=0.0.21" )
-install_python_packages "pkgs[@]"
+install_python_packages $TEMPVENV "pkgs[@]"
# ask shaman which chacra instance to use
chacra_url=`curl -u $SHAMAN_API_USER:$SHAMAN_API_KEY https://shaman.ceph.com/api/nodes/next/`
# the following two methods exist in scripts/build_utils.sh
pkgs=( "tox" )
-install_python_packages "pkgs[@]"
+install_python_packages $TEMPVENV "pkgs[@]"
# run tox by recreating the environment and in verbose mode
# by default this will run all environments defined
# the following two methods exist in scripts/build_utils.sh
pkgs=( "ansible" )
-install_python_packages "pkgs[@]"
+install_python_packages $TEMPVENV "pkgs[@]"
cd "$WORKSPACE/deploy/playbooks/"
$VENV/ansible-playbook -i "localhost," -c local local_deploy.yml --extra-vars="branch=$BRANCH jenkins_prado_token=$JENKINS_PRADO_TOKEN prado_token=$PRADO_TOKEN"
export LC_ALL=C # the following is vulnerable to i18n
pkgs=( "chacractl>=0.0.21" )
-install_python_packages "pkgs[@]"
+install_python_packages $TEMPVENV "pkgs[@]"
NFS_GANESHA_BRANCH=`branch_slash_filter $NFS_GANESHA_BRANCH`
CEPH_BRANCH=`branch_slash_filter $CEPH_BRANCH`
export LC_ALL=C # the following is vulnerable to i18n
pkgs=( "chacractl>=0.0.21" )
-install_python_packages "pkgs[@]"
+install_python_packages $TEMPVENV "pkgs[@]"
NFS_GANESHA_BRANCH=`branch_slash_filter $NFS_GANESHA_BRANCH`
CEPH_BRANCH=`branch_slash_filter $CEPH_BRANCH`
# the following two methods exist in scripts/build_utils.sh
pkgs=( "tox" )
-install_python_packages "pkgs[@]"
+install_python_packages $TEMPVENV "pkgs[@]"
sudo yum install -y epel-release
sudo yum --enablerepo epel install -y python36
# the following two methods exist in scripts/build_utils.sh
pkgs=( "ansible" "tox" )
-install_python_packages "pkgs[@]"
+install_python_packages $TEMPVENV "pkgs[@]"
# run ansible to get this current host to meet our requirements, specifying
# the following two methods exist in scripts/build_utils.sh
pkgs=( "chacractl>=0.0.21" )
-install_python_packages "pkgs[@]"
+install_python_packages $TEMPVENV "pkgs[@]"
# create the .chacractl config file using global variables
make_chacractl_config
chacra_endpoint="radosgw-agent/${chacra_ref}/${GIT_COMMIT}/${DISTRO}/${DISTRO_VERSION}"
- check_binary_existence $chacra_endpoint/noarch
+ check_binary_existence $VENV $chacra_endpoint/noarch
suse=$(uname -n | grep -ic -e suse -e sles || true)
if [ $suse -gt 0 ]
chacra_endpoint="radosgw-agent/${chacra_ref}/${GIT_COMMIT}/${DISTRO}/${DEB_BUILD}/noarch"
- check_binary_existence $chacra_endpoint
+ check_binary_existence $VENV $chacra_endpoint
dpkg-source -b .
# we no longer sign the .dsc or .changes files (done by default with
export LC_ALL=C # the following is vulnerable to i18n
pkgs=( "chacractl>=0.0.21" )
-install_python_packages "pkgs[@]"
+install_python_packages $TEMPVENV "pkgs[@]"
# ask shaman which chacra instance to use
chacra_url=`curl -f -u $SHAMAN_API_USER:$SHAMAN_API_KEY https://shaman.ceph.com/api/nodes/next/`
export LC_ALL=C # the following is vulnerable to i18n
pkgs=( "chacractl>=0.0.21" )
-install_python_packages "pkgs[@]"
+install_python_packages $TEMPVENV "pkgs[@]"
SAMBA_BRANCH=$(branch_slash_filter $SAMBA_BRANCH)
CEPH_BRANCH=$(branch_slash_filter $CEPH_BRANCH)
}
pip_download() {
+ local venv=$1
+ shift
local package=$1
shift
local options=$@
- if ! $VENV/pip download $options --dest="$PIP_SDIST_INDEX" $package; then
+ if ! $venv/pip download $options --dest="$PIP_SDIST_INDEX" $package; then
# pip <8.0.0 does not have "download" command
- $VENV/pip install $options \
+ $venv/pip install $options \
--upgrade --exists-action=i --cache-dir="$PIP_SDIST_INDEX" \
$package
fi
}
install_python_packages_no_binary () {
+ local venv_dir=$1
+ shift
+ local venv="$venv_dir/bin"
# Use this function to create a virtualenv and install python packages
# without compiling (or using wheels). Pass a list of package names. If
# the virtualenv exists it will get re-used since this function can be used
# Usage (with pip==20.3.4 [the default]):
#
# to_install=( "ansible" "chacractl>=0.0.21" )
- # install_python_packages_no_binary "to_install[@]"
+ # install_python_packages_no_binary $TEMPVENV "to_install[@]"
#
# Usage (with pip<X.X.X [can also do ==X.X.X or !=X.X.X]):
#
# to_install=( "ansible" "chacractl>=0.0.21" )
- # install_python_packages_no_binary "to_install[@]" "pip<X.X.X"
+ # install_python_packages_no_binary $TEMPVENV "to_install[@]" "pip<X.X.X"
#
# Usage (with latest pip):
#
# to_install=( "ansible" "chacractl>=0.0.21" )
- # install_python_packages_no_binary "to_install[@]" latest
+ # install_python_packages_no_binary $TEMPVENV "to_install[@]" latest
- create_virtualenv $TEMPVENV
+ create_virtualenv $venv_dir
# Define and ensure the PIP cache
PIP_SDIST_INDEX="$HOME/.cache/pip"
# Updated to 20.3.4 in March 2021 because 10.0.0 is just too old.
if [ "$2" == "latest" ]; then
echo "Ensuring latest pip is installed"
- $VENV/pip install -U pip
+ $venv/pip install -U pip
elif [[ -n $2 && "$2" != "latest" ]]; then
echo "Installing $2"
- $VENV/pip install "$2"
+ $venv/pip install "$2"
else
# This is the default for most jobs.
# See ff01d2c5 and fea10f52
echo "Installing pip 20.3.4"
- $VENV/pip install "pip==20.3.4"
+ $venv/pip install "pip==20.3.4"
fi
echo "Updating setuptools"
- pip_download setuptools
+ pip_download $VENV setuptools
pkgs=("${!1}")
for package in ${pkgs[@]}; do
echo $package
# download packages to the local pip cache
- pip_download $package --no-binary=:all:
+ pip_download $VENV $package --no-binary=:all:
# install packages from the local pip cache, ignoring pypi
- $VENV/pip install --no-binary=:all: --upgrade --exists-action=i --find-links="file://$PIP_SDIST_INDEX" --no-index $package
+ $venv/pip install --no-binary=:all: --upgrade --exists-action=i --find-links="file://$PIP_SDIST_INDEX" --no-index $package
done
}
install_python_packages () {
+ local venv_dir=$1
+ shift
+ local venv="$venv_dir/bin"
# Use this function to create a virtualenv and install
# python packages. Pass a list of package names.
#
# Usage (with pip 20.3.4 [the default]):
#
# to_install=( "ansible" "chacractl>=0.0.21" )
- # install_python_packages "to_install[@]"
+ # install_python_packages $TEMPVENV "to_install[@]"
#
# Usage (with pip<X.X.X [can also do ==X.X.X or !=X.X.X]):
#
# to_install=( "ansible" "chacractl>=0.0.21" )
- # install_python_packages_no_binary "to_install[@]" "pip<X.X.X"
+ # install_python_packages_no_binary $TEMPVENV "to_install[@]" "pip<X.X.X"
#
# Usage (with latest pip):
#
# to_install=( "ansible" "chacractl>=0.0.21" )
- # install_python_packages "to_install[@]" latest
+ # install_python_packages $TEMPVENV "to_install[@]" latest
- create_virtualenv $TEMPVENV
+ create_virtualenv $venv_dir
# Define and ensure the PIP cache
PIP_SDIST_INDEX="$HOME/.cache/pip"
# Updated to 20.3.4 in March 2021 because 10.0.0 is just too old.
if [ "$2" == "latest" ]; then
echo "Ensuring latest pip is installed"
- $VENV/pip install -U pip
+ $venv/pip install -U pip
elif [[ -n $2 && "$2" != "latest" ]]; then
echo "Installing $2"
- $VENV/pip install "$2"
+ $venv/pip install "$2"
else
# This is the default for most jobs.
# See ff01d2c5 and fea10f52
echo "Installing pip 20.3.4"
- $VENV/pip install "pip==20.3.4"
+ $venv/pip install "pip==20.3.4"
fi
echo "Updating setuptools"
- pip_download setuptools
+ pip_download $venv setuptools
pkgs=("${!1}")
for package in ${pkgs[@]}; do
echo $package
# download packages to the local pip cache
- pip_download $package
+ pip_download $venv $package
# install packages from the local pip cache, ignoring pypi
- $VENV/pip install --upgrade --exists-action=i --find-links="file://$PIP_SDIST_INDEX" --no-index $package
+ $venv/pip install --upgrade --exists-action=i --find-links="file://$PIP_SDIST_INDEX" --no-index $package
done
}
}
check_binary_existence () {
- url=$1
+ local venv=$1
+ shift
+ local url=$1
+ shift
# we have to use ! here so thet -e will ignore the error code for the command
# because of this, the exit code is also reversed
- ! $VENV/chacractl exists binaries/${url} ; exists=$?
+ ! $venv/chacractl exists binaries/${url} ; exists=$?
# if the binary already exists in chacra, do not rebuild
if [ $exists -eq 1 ] && [ "$FORCE" = false ] ; then
}
build_debs() {
+ local venv=$1
+ shift
local vers=$1
shift
local debian_version=$1
find release/$vers/ | \
egrep "*\.(changes|deb|ddeb|dsc|gz)$" | \
egrep -v "(Packages|Sources|Contents)" | \
- $VENV/chacractl binary ${chacra_flags} create ${chacra_endpoint}
+ $venv/chacractl binary ${chacra_flags} create ${chacra_endpoint}
# write json file with build info
cat > $WORKSPACE/repo-extra.json << EOF
{
-u $CHACRACTL_USER:$CHACRACTL_KEY \
${chacra_url}repos/${chacra_repo_endpoint}/extra/
# start repo creation
- $VENV/chacractl repo update ${chacra_repo_endpoint}
+ $venv/chacractl repo update ${chacra_repo_endpoint}
echo Check the status of the repo at: https://shaman.ceph.com/api/repos/${chacra_repo_endpoint}/
fi
}
start_tox() {
+ local venv_dir=$1
+ shift
+ local venv="$venv_dir/bin"
+
# the $SCENARIO var is injected by the job template. It maps
# to an actual, defined, tox environment
while true; do
;;
esac
- for tox_env in $("$VENV"/tox -c "$TOX_INI_FILE" -l)
+ for tox_env in $("$venv"/tox -c "$TOX_INI_FILE" -l)
do
if [[ "$ENV_NAME" == "$tox_env" ]]; then
# shellcheck disable=SC2116
- if ! eval "$(echo "${TOX_RUN_ENV[@]}")" "$VENV"/tox -c "$TOX_INI_FILE" --workdir="$TEMPVENV" -v -e="$ENV_NAME" -- --provider=libvirt; then
+ if ! eval "$(echo "${TOX_RUN_ENV[@]}")" "$venv"/tox -c "$TOX_INI_FILE" --workdir="$venv_dir" -v -e="$ENV_NAME" -- --provider=libvirt; then
echo "ERROR: Job didn't complete successfully or got stuck for more than 3h."
exit 1
fi
}
collect_ceph_logs() {
+ local venv=$1
+ shift
# this is meant to be run in a testing scenario directory
# with running vagrant vms. the ansible playbook will connect
# to your test nodes and fetch any ceph logs that are present
write_collect_logs_playbook
pkgs=( "ansible" )
- install_python_packages "pkgs[@]"
+ install_python_packages $TEMPVENV "pkgs[@]"
export ANSIBLE_SSH_ARGS='-F ./vagrant_ssh_config'
export ANSIBLE_STDOUT_CALLBACK='debug'
- $VENV/ansible-playbook -vv -i hosts --limit $limit --extra-vars "archive_path=$WORKSPACE/logs" $WORKSPACE/collect-logs.yml || true
+ $venv/ansible-playbook -vv -i hosts --limit $limit --extra-vars "archive_path=$WORKSPACE/logs" $WORKSPACE/collect-logs.yml || true
fi
}
teardown_vagrant_tests() {
+ local venv=$1
+ shift
+
# collect ceph logs and teardown any running vagrant vms
# this also cleans up any lingering livirt networks
scenarios=$(find . | grep vagrant_ssh_config | xargs -r dirname)
for scenario in $scenarios; do
cd $scenario
# collect all ceph logs from all test nodes
- collect_ceph_logs all
+ collect_ceph_logs $venv all
vagrant destroy -f
stat ./fetch > /dev/null 2>&1 && rm -rf ./fetch
cd -
# the following two methods exist in scripts/build_utils.sh
pkgs=( "ansible" "tox" )
-install_python_packages "pkgs[@]"
+install_python_packages $TEMPVENV "pkgs[@]"
# run ansible to get this current host to meet our requirements, specifying
# a local connection and 'localhost' as the host where to execute
export LC_ALL=C # the following is vulnerable to i18n
pkgs=( "chacractl>=0.0.21" )
-install_python_packages "pkgs[@]"
+install_python_packages $TEMPVENV "pkgs[@]"
# ask shaman which chacra instance to use
chacra_url=`curl -f -u $SHAMAN_API_USER:$SHAMAN_API_KEY https://shaman.ceph.com/api/nodes/next/`
# the following two methods exist in scripts/build_utils.sh
pkgs=( "tox" )
-install_python_packages "pkgs[@]"
+install_python_packages $TEMPVENV "pkgs[@]"
# create the docs build with tox
$VENV/tox -rv -e docs
# the following two methods exist in scripts/build_utils.sh
pkgs=( "tox" )
-install_python_packages "pkgs[@]"
+install_python_packages $TEMPVENV "pkgs[@]"
# run tox by recreating the environment and in verbose mode
# by default this will run all environments defined