Fix permission error in ready script

The ready script runs as the jenkins user, so to write pip.conf
we need to use sudo.

Change-Id: I94b617f1778bad415d7fa9415c6fcb2cafcb8a5a
This commit is contained in:
James E. Blair 2016-01-28 15:56:21 -08:00
parent dbb3544761
commit 473f875a1f

View File

@ -21,13 +21,14 @@ source /etc/nodepool/provider
NODEPOOL_MIRROR_HOST=${NODEPOOL_MIRROR_HOST:-mirror.$NODEPOOL_REGION.$NODEPOOL_CLOUD.openstack.org}
NODEPOOL_PYPI_MIRROR=${NODEPOOL_PYPI_MIRROR:-$NODEPOOL_MIRROR_HOST/pypi/simple}
cat >/etc/pip.conf <<EOF
cat >/tmp/pip.conf <<EOF
[global]
timeout = 60
index-url = $NODEPOOL_PYPI_MIRROR
trusted-host = $NODEPOOL_PYPI_MIRROR
extra-index-url =
EOF
sudo mv /tmp/pip.conf /etc/pip.conf
cat >/home/jenkins/.pydistutils.cfg <<EOF
[easy_install]