Merge "Set nodepool mirror PIP_OPTS consistently"
This commit is contained in:
commit
22723549a3
@ -97,6 +97,9 @@ esac
|
||||
# Ensure that our shell knows about the new virtualenv
|
||||
hash -r virtualenv
|
||||
|
||||
# Load nodepool PIP mirror settings
|
||||
load_nodepool_pip_opts
|
||||
|
||||
# Ensure we use the HTTPS/HTTP proxy with pip if it is specified
|
||||
if [ -n "$HTTPS_PROXY" ]; then
|
||||
PIP_OPTS+="--proxy $HTTPS_PROXY"
|
||||
|
@ -81,11 +81,7 @@ log_instance_info
|
||||
|
||||
run_dstat || true
|
||||
|
||||
# If in OpenStack-Infra, set some vars to use the mirror when bootstrapping Ansible
|
||||
if [[ -e /etc/ci/mirror_info.sh ]]; then
|
||||
source /etc/ci/mirror_info.sh
|
||||
export PIP_OPTS="--index-url ${NODEPOOL_PYPI_MIRROR} --trusted-host ${NODEPOOL_MIRROR_HOST} --extra-index-url ${NODEPOOL_WHEEL_MIRROR}"
|
||||
fi
|
||||
load_nodepool_pip_opts
|
||||
|
||||
# Bootstrap Ansible
|
||||
source "${OSA_CLONE_DIR}/scripts/bootstrap-ansible.sh"
|
||||
@ -169,11 +165,7 @@ if [[ "${ACTION}" == "upgrade" ]]; then
|
||||
unset UPPER_CONSTRAINTS_FILE
|
||||
unset PIP_OPTS
|
||||
|
||||
# If in OpenStack-Infra, set some vars to use the mirror when bootstrapping Ansible
|
||||
if [[ -e /etc/ci/mirror_info.sh ]]; then
|
||||
source /etc/ci/mirror_info.sh
|
||||
export PIP_OPTS="--index-url ${NODEPOOL_PYPI_MIRROR} --trusted-host ${NODEPOOL_MIRROR_HOST} --extra-index-url ${NODEPOOL_WHEEL_MIRROR}"
|
||||
fi
|
||||
load_nodepool_pip_opts
|
||||
|
||||
# Source the current scripts-library.sh functions
|
||||
source "${OSA_CLONE_DIR}/scripts/scripts-library.sh"
|
||||
|
@ -92,6 +92,14 @@ function build_ansible_runtime_venv {
|
||||
fi
|
||||
}
|
||||
|
||||
# If in OpenStack-Infra, set some vars to use the mirror when bootstrapping Ansible
|
||||
function load_nodepool_pip_opts {
|
||||
if [[ -e /etc/ci/mirror_info.sh ]]; then
|
||||
source /etc/ci/mirror_info.sh
|
||||
export PIP_OPTS="--index-url ${NODEPOOL_PYPI_MIRROR} --trusted-host ${NODEPOOL_MIRROR_HOST} --extra-index-url ${NODEPOOL_WHEEL_MIRROR}"
|
||||
fi
|
||||
}
|
||||
|
||||
# Determine the distribution we are running on, so that we can configure it
|
||||
# appropriately.
|
||||
function determine_distro {
|
||||
|
Loading…
Reference in New Issue
Block a user