Consume the OpenStack mirror by default
PyPI upstream obviously breaks all the time. Like, literally, I've spent my whole life dealing with it this past week. In this test, we were avoiding the OpenStack mirror so that we could be sure to be testing that we could build the mirror when new requirements are added. However, the only time that's a concern is on a requirements repo change. Add an option --no-mirror that will trigger the "don't use OpenStack's mirrors as an upstream" behavior, and we'll add that option to the invocation on requirements changes. Change-Id: I8d01c1fbb8a5df5aa83ffba3b6489e374abef1af
This commit is contained in:
parent
b6234379aa
commit
5e281e4960
|
@ -17,9 +17,6 @@ function mkvenv {
|
|||
$venv/bin/pip install $pip
|
||||
}
|
||||
|
||||
# PROJECTS is a list of projects that we're testing
|
||||
PROJECTS=$*
|
||||
|
||||
# BASE should be a directory with a subdir called "new" and in that
|
||||
# dir, there should be a git repository for every entry in PROJECTS
|
||||
BASE=${BASE:-/opt/stack}
|
||||
|
@ -40,9 +37,11 @@ mkdir -p $pypidir
|
|||
|
||||
jeepybvenv=$tmpdir/jeepyb
|
||||
|
||||
sudo touch $HOME/pip.log
|
||||
sudo chown $USER $HOME/pip.log
|
||||
|
||||
rm -f ~/.pip/pip.conf ~/.pydistutils.cfg
|
||||
mkdir -p ~/.pip
|
||||
|
||||
cat <<EOF > ~/.pip/pip.conf
|
||||
[global]
|
||||
log = $HOME/pip.log
|
||||
|
@ -64,6 +63,24 @@ mirrors:
|
|||
output: $pypidir
|
||||
EOF
|
||||
|
||||
# Default to using pypi.openstack.org as an easy_install mirror
|
||||
if [ "$1" == "--no-mirror" ] ; then
|
||||
shift
|
||||
else
|
||||
cat <<EOF > ~/.pydistutils.cfg
|
||||
[easy_install]
|
||||
index_url = http://pypi.openstack.org/openstack
|
||||
EOF
|
||||
cat <<EOF > ~/.pip/pip.conf
|
||||
[global]
|
||||
index-url = http://pypi.openstack.org/openstack
|
||||
log = $HOME/pip.log
|
||||
EOF
|
||||
fi
|
||||
|
||||
# PROJECTS is a list of projects that we're testing
|
||||
PROJECTS=$*
|
||||
|
||||
pbrsdistdir=$tmpdir/pbrsdist
|
||||
git clone $REPODIR/pbr $pbrsdistdir
|
||||
cd $pbrsdistdir
|
||||
|
@ -77,6 +94,8 @@ $jeepybvenv/bin/python setup.py sdist -d $tmpdownload/pip/openstack
|
|||
|
||||
$jeepybvenv/bin/run-mirror -b remotes/origin/master --verbose -c $tmpdir/mirror.yaml --no-download
|
||||
|
||||
find $pypidir
|
||||
|
||||
# Make pypi thing
|
||||
pypiurl=file://$pypidir
|
||||
|
||||
|
|
Loading…
Reference in New Issue