Make select-mirror use the bandersnatch mirror

A simple next step is to have select-mirror just default everything
to the same thing.

Change-Id: I9882167596de0791eda86397510e2a942848f5c5
This commit is contained in:
Monty Taylor 2014-06-27 23:26:34 -07:00
parent 26ae19a03e
commit d291355275
6 changed files with 32 additions and 40 deletions

View File

@ -1,3 +0,0 @@
[global]
index-url = http://pypi.openstack.org
extra-index-url = http://pypi.python.org/simple

View File

@ -1,2 +0,0 @@
[easy_install]
index_url = http://pypi.openstack.org

View File

@ -0,0 +1,2 @@
[global]
index-url = http://pypi.openstack.org/simple

View File

@ -0,0 +1,2 @@
[easy_install]
index_url = http://pypi.openstack.org/simple

View File

@ -14,44 +14,14 @@
# License for the specific language governing permissions and limitations
# under the License.
org=$1
project=$2
source /usr/local/jenkins/slave_scripts/functions.sh
check_variable_org_project "$org" "$project" "$0"
rm -f ~/.pydistutils.cfg
mkdir -p ~/.pip
rm -f ~/.pip/pip.conf
# Start with a default pip.conf for use with pypi.python.org
# (which may be overwritten later)
cat <<EOF > ~/.pydistutils.cfg
[easy_install]
index_url = http://pypi.openstack.org/simple
EOF
cat <<EOF > ~/.pip/pip.conf
[global]
index-url = http://pypi.openstack.org/simple
timeout = 60
EOF
# For project listed in openstack/requirements,
# use the pypi.openstack.org mirror exclusively
if grep -x "$org/$project" /opt/requirements/projects.txt 2>&1
then
export TOX_INDEX_URL='http://pypi.openstack.org/openstack'
echo "Switching on internal pypi mirror $TOX_INDEX_URL for $org/$project"
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
timeout = 60
EOF
else
echo "$org/$project will not use the internal openstack pypi mirror"
cat <<EOF > ~/.pip/pip.conf
[global]
timeout = 60
index-url = http://pypi.openstack.org/openstack
extra-index-url = http://pypi.python.org/simple
EOF
fi

View File

@ -27,6 +27,29 @@ class openstack_project::slave (
python3 => $python3,
}
file { '/home/jenkins/.pydistutils.cfg':
ensure => present,
owner => 'jenkins',
group => 'jenkins',
mode => '0644',
source => 'puppet:///modules/openstack_project/pydistutils.cfg',
require => Class['jenkins::slave'],
}
file { '/home/jenkins/.pip':
ensure => directory,
require => Class['jenkins::slave'],
}
file { '/home/jenkins/.pip/pip.conf':
ensure => present,
owner => 'jenkins',
group => 'jenkins',
mode => '0644',
source => 'puppet:///modules/openstack_project/pip.conf',
require => File['/home/jenkins/.pip'],
}
class { 'salt':
salt_master => 'ci-puppetmaster.openstack.org',
}