diff options
author | Monty Taylor <mordred@inaugust.com> | 2013-08-03 14:19:20 -0400 |
---|---|---|
committer | Monty Taylor <mordred@inaugust.com> | 2013-08-03 19:03:13 -0400 |
commit | 5e281e4960e21c7adf4a65afa701edbc653a618a (patch) | |
tree | 569a6604505ffa9b5f68a06880b930bd1403dc59 /tools | |
parent | b6234379aaa455ceebdb3d7694befee621991b26 (diff) | |
download | pbr-5e281e4960e21c7adf4a65afa701edbc653a618a.tar.gz |
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
Diffstat (limited to 'tools')
-rw-r--r-- | tools/integration.sh | 27 |
1 files changed, 23 insertions, 4 deletions
diff --git a/tools/integration.sh b/tools/integration.sh index b32b303..2e8d5f6 100644 --- a/tools/integration.sh +++ b/tools/integration.sh @@ -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 |