Fix Ubuntu source gate deployment
In CI environment, MySQL-python wheel package has a wrong _mysql.so file, which is not compatible with Ubuntu. Disable wheel index in the CI for pip. Closes-Bug: #1615231 Change-Id: I127ebb017e09a5bf245e0fdad9bf052203e68e55
This commit is contained in:
parent
f2a2b69c6a
commit
2e0c5ecbf8
@ -6,6 +6,12 @@ set -o errexit
|
|||||||
# Enable unbuffered output for Ansible in Jenkins.
|
# Enable unbuffered output for Ansible in Jenkins.
|
||||||
export PYTHONUNBUFFERED=1
|
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 :)
|
# Just for mandre :)
|
||||||
if [[ ! -f /etc/sudoers.d/jenkins ]]; then
|
if [[ ! -f /etc/sudoers.d/jenkins ]]; then
|
||||||
echo "jenkins ALL=(:docker) NOPASSWD: ALL" | sudo tee /etc/sudoers.d/jenkins
|
echo "jenkins ALL=(:docker) NOPASSWD: ALL" | sudo tee /etc/sudoers.d/jenkins
|
||||||
@ -19,8 +25,17 @@ function setup_config {
|
|||||||
# Generate passwords
|
# Generate passwords
|
||||||
sudo tools/generate_passwords.py
|
sudo tools/generate_passwords.py
|
||||||
|
|
||||||
# Use Infra provided pypi
|
# Use Infra provided pypi.
|
||||||
echo "RUN echo $(base64 -w0 /etc/pip.conf) | base64 -d > /etc/pip.conf" | sudo tee /etc/kolla/header
|
# 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
|
sed -i 's|^#include_header.*|include_header = /etc/kolla/header|' /etc/kolla/kolla-build.conf
|
||||||
|
|
||||||
if [[ "${DISTRO}" == "Debian" ]]; then
|
if [[ "${DISTRO}" == "Debian" ]]; then
|
||||||
|
Loading…
Reference in New Issue
Block a user