diff options
| author | Jenkins <jenkins@review.openstack.org> | 2016-08-20 15:48:57 +0000 |
|---|---|---|
| committer | Gerrit Code Review <review@openstack.org> | 2016-08-20 15:48:57 +0000 |
| commit | d24004efec1b2fc76aac6bc33b8e5a1a5228f5cf (patch) | |
| tree | f477a9f4d048029d95d612847246e04706a6ab63 /tools | |
| parent | 6d89528171d198245e102c9375d221113c44ccb6 (diff) | |
| parent | 2e0c5ecbf8ea1dfa6749e5515a38ecfa58764312 (diff) | |
| download | kolla-d24004efec1b2fc76aac6bc33b8e5a1a5228f5cf.tar.gz kolla-d24004efec1b2fc76aac6bc33b8e5a1a5228f5cf.zip | |
Merge "Fix Ubuntu source gate deployment"
Diffstat (limited to 'tools')
| -rwxr-xr-x | tools/setup_gate.sh | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/tools/setup_gate.sh b/tools/setup_gate.sh index a1e10c49e..671181747 100755 --- a/tools/setup_gate.sh +++ b/tools/setup_gate.sh @@ -6,6 +6,12 @@ set -o errexit # Enable unbuffered output for Ansible in Jenkins. export PYTHONUNBUFFERED=1 +source /etc/nodepool/provider + +NODEPOOL_MIRROR_HOST=${NODEPOOL_MIRROR_HOST:-mirror.$NODEPOOL_REGION.$NODEPOOL_CLOUD.openstack.org} +NODEPOOL_MIRROR_HOST=$(echo $NODEPOOL_MIRROR_HOST|tr '[:upper:]' '[:lower:]') +NODEPOOL_PYPI_MIRROR=${NODEPOOL_PYPI_MIRROR:-http://$NODEPOOL_MIRROR_HOST/pypi/simple} + # Just for mandre :) if [[ ! -f /etc/sudoers.d/jenkins ]]; then echo "jenkins ALL=(:docker) NOPASSWD: ALL" | sudo tee /etc/sudoers.d/jenkins @@ -19,8 +25,17 @@ function setup_config { # Generate passwords sudo tools/generate_passwords.py - # Use Infra provided pypi - echo "RUN echo $(base64 -w0 /etc/pip.conf) | base64 -d > /etc/pip.conf" | sudo tee /etc/kolla/header + # Use Infra provided pypi. + # Wheel package mirror may be not compatible. So do not enable it. + PIP_CONF=$(mktemp) + cat > ${PIP_CONF} <<EOF +[global] +timeout = 60 +index-url = $NODEPOOL_PYPI_MIRROR +trusted-host = $NODEPOOL_MIRROR_HOST +EOF + echo "RUN echo $(base64 -w0 ${PIP_CONF}) | base64 -d > /etc/pip.conf" | sudo tee /etc/kolla/header + rm ${PIP_CONF} sed -i 's|^#include_header.*|include_header = /etc/kolla/header|' /etc/kolla/kolla-build.conf if [[ "${DISTRO}" == "Debian" ]]; then |
