Revert "Fix Jenkins virtualenv issue that masked stale dependency" (#23828)
* Revert "Use pip-sync to make sure that dep cache tarball can go safely stale" This reverts commitd435f4cd3e. * Revert "Extract worker setup into own shell script, as much as possible" This reverts commit0a079e757c.
This commit is contained in:
3
Makefile
3
Makefile
@@ -61,8 +61,7 @@ pull: ## update the Docker image used by "make shell"
|
||||
docker pull edxops/edxapp:latest
|
||||
|
||||
requirements: ## install development environment requirements
|
||||
pip install -qr requirements/edx/pip-tools.txt
|
||||
pip-sync -q requirements/edx/development.txt requirements/edx/private.*
|
||||
pip install -qr requirements/edx/development.txt --exists-action w
|
||||
|
||||
shell: ## launch a bash shell in a Docker container with all edx-platform dependencies installed
|
||||
docker run -it -e "NO_PYTHON_UNINSTALL=1" -e "PIP_INDEX_URL=https://pypi.python.org/simple" -e TERM \
|
||||
|
||||
@@ -45,12 +45,6 @@ fi
|
||||
# Activate the Python virtualenv
|
||||
source $VENV_PATH/edx-venv/bin/activate
|
||||
|
||||
# Hack to fix up egg-link files given that the virtualenv is not relocatable
|
||||
sed -i "s|^/home/jenkins/shallow-clone|`pwd`|" -- \
|
||||
$VENV_PATH/edx-venv/lib/python*/site-packages/*.egg-link
|
||||
pip install -qr requirements/edx/pip-tools.txt
|
||||
pip-sync -q requirements/edx/testing.txt requirements/edx/django.txt
|
||||
|
||||
# add the node packages dir to PATH
|
||||
PATH=$PATH:node_modules/.bin
|
||||
|
||||
|
||||
@@ -12,13 +12,13 @@ python scripts/xdist/pytest_worker_manager.py -a up -n ${XDIST_NUM_WORKERS} \
|
||||
|
||||
# Install the correct version of Django depending on which tox environment (if any) is in use
|
||||
if [[ -z ${TOXENV+x} ]] || [[ ${TOXENV} == 'null' ]]; then
|
||||
DJANGO_REQUIREMENT="requirements/edx/django.txt"
|
||||
DJANGO_REQUIREMENT="-r requirements/edx/django.txt"
|
||||
elif [[ ${TOXENV} == *'django20'* ]]; then
|
||||
DJANGO_REQUIREMENT="requirements/edx/django20.txt"
|
||||
DJANGO_REQUIREMENT="-r requirements/edx/django20.txt"
|
||||
elif [[ ${TOXENV} == *'django21'* ]]; then
|
||||
DJANGO_REQUIREMENT="requirements/edx/django21.txt"
|
||||
DJANGO_REQUIREMENT="-r requirements/edx/django21.txt"
|
||||
elif [[ ${TOXENV} == *'django22'* ]]; then
|
||||
DJANGO_REQUIREMENT="requirements/edx/django.txt"
|
||||
DJANGO_REQUIREMENT="-r requirements/edx/django.txt"
|
||||
fi
|
||||
|
||||
ip_list=$(<pytest_worker_ips.txt)
|
||||
@@ -27,7 +27,10 @@ do
|
||||
worker_reqs_cmd="ssh -o StrictHostKeyChecking=no jenkins@$ip
|
||||
'git clone --branch master --depth 1 -q https://github.com/edx/edx-platform.git; cd edx-platform;
|
||||
git fetch -fq origin ${XDIST_GIT_REFSPEC}; git checkout -q ${XDIST_GIT_BRANCH};
|
||||
scripts/xdist/setup_worker.sh -p $PYTHON_VERSION -d $DJANGO_REQUIREMENT' & "
|
||||
rm -rf /home/jenkins/edx-venv-${PYTHON_VERSION}/edx-venv;
|
||||
tar -C /home/jenkins/edx-venv-${PYTHON_VERSION} -xf /home/jenkins/edx-venv_clean-${PYTHON_VERSION}.tar.gz;
|
||||
source ../edx-venv-${PYTHON_VERSION}/edx-venv/bin/activate;
|
||||
pip install -q ${DJANGO_REQUIREMENT} -r requirements/edx/testing.txt; mkdir reports' & "
|
||||
|
||||
cmd=$cmd$worker_reqs_cmd
|
||||
done
|
||||
|
||||
@@ -1,27 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
# Set up worker node.
|
||||
|
||||
while getopts 'p:d:' opt; do
|
||||
case "$opt" in
|
||||
p) PYTHON_VERSION="$OPTARG";;
|
||||
d) DJANGO_REQUIREMENT="$OPTARG";;
|
||||
[?])
|
||||
print >&2 "Usage: $0 -p python-version -d django-reqs-file"
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
venv_parent=/home/jenkins/edx-venv-${PYTHON_VERSION}
|
||||
venv=$venv_parent/edx-venv
|
||||
rm -rf $venv
|
||||
tar -C $venv_parent -xf /home/jenkins/edx-venv_clean-${PYTHON_VERSION}.tar.gz
|
||||
source $venv/bin/activate
|
||||
|
||||
# Hack to fix up egg-link files given that the virtualenv is not relocatable
|
||||
sed -i "s|\(^/home/jenkins\)/shallow-clone|\1/edx-platform|" -- \
|
||||
$venv/lib/python*/site-packages/*.egg-link
|
||||
pip install -qr requirements/edx/pip-tools.txt
|
||||
pip-sync -q requirements/edx/testing.txt "${DJANGO_REQUIREMENT}"
|
||||
|
||||
mkdir reports
|
||||
Reference in New Issue
Block a user