Fix CI issues
Fixes following:- - download the different version pip file - add project dir to git safe to allow installation with pip, more details in [1] [1] https://bugs.launchpad.net/devstack/+bug/1968798 Change-Id: Iedcf4207b51424c11625e34f146ebd67df2dc4c5
This commit is contained in:
parent
2359cd4ea5
commit
165c21ef99
|
@ -54,9 +54,18 @@
|
|||
- name: Install pip3 if needed
|
||||
when: os_distro == "CentOS 7" or os_distro == "Ubuntu 18.04" or os_distro == "Ubuntu 20.04"
|
||||
shell:
|
||||
executable: /bin/bash
|
||||
chdir: '{{ zuul.project.src_dir }}'
|
||||
cmd: |
|
||||
curl https://bootstrap.pypa.io/get-pip.py -o /tmp/get-pip.py
|
||||
python_version=`python3 --version`
|
||||
python_version=`echo $python_version |awk '{print $2}'`
|
||||
echo $python_version
|
||||
if [[ $python_version =~ ^3.6 ]]; then
|
||||
pip_url=https://bootstrap.pypa.io/pip/3.6/get-pip.py
|
||||
else
|
||||
pip_url=https://bootstrap.pypa.io/get-pip.py
|
||||
fi
|
||||
curl $pip_url -o /tmp/get-pip.py
|
||||
sudo python3 /tmp/get-pip.py
|
||||
|
||||
- name: Update pip3 if needed
|
||||
|
|
|
@ -13,6 +13,11 @@
|
|||
become: yes
|
||||
when: bindep_output.stdout_lines
|
||||
|
||||
# Required for https://bugs.launchpad.net/devstack/+bug/1968798
|
||||
- name: Configure project src_dir as git safe
|
||||
become: yes
|
||||
command: git config --system --add safe.directory {{ ansible_user_dir }}/{{ zuul.project.src_dir }}
|
||||
|
||||
- name: Install Rally system wide
|
||||
shell:
|
||||
executable: /bin/sh
|
||||
|
|
|
@ -50,7 +50,13 @@
|
|||
executable: /bin/bash
|
||||
cmd: |
|
||||
set -e
|
||||
curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py
|
||||
pip_url="https://bootstrap.pypa.io/get-pip.py"
|
||||
if [ "{{ python_version.stdout }}" = "3.6" ]; then
|
||||
pip_url="https://bootstrap.pypa.io/pip/3.6/get-pip.py"
|
||||
elif [ "{{ python_version.stdout }}" = "3" ]; then
|
||||
pip_url="https://bootstrap.pypa.io/pip/3.6/get-pip.py"
|
||||
fi
|
||||
curl $pip_url -o get-pip.py
|
||||
python{{ python_version.stdout }} get-pip.py --force-reinstall
|
||||
|
||||
- name: Install python tox
|
||||
|
|
Loading…
Reference in New Issue