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