b7bd239e81
openstackclient-check-plugins did not install OSC plugins from git even when they are specified in required-projects. This happened "item.short_name" is not evaluated. Change-Id: I069e63005ad2cd24f134fee475fa246bf324a7e2
50 lines
2.1 KiB
YAML
50 lines
2.1 KiB
YAML
- hosts: all
|
|
name: Run openstackclient plugin check
|
|
tasks:
|
|
|
|
- name: Setup virtualenv, install openstackclient, get requirements
|
|
shell:
|
|
cmd: |
|
|
echo "------------------------------------------------------------"
|
|
virtualenv -p $(which python3) osc_plugins
|
|
echo "------------------------------------------------------------"
|
|
osc_plugins/bin/pip install -c ../requirements/upper-constraints.txt -r requirements.txt
|
|
echo "------------------------------------------------------------"
|
|
cp ../requirements/upper-constraints.txt .
|
|
chdir: /home/zuul/src/opendev.org/openstack/openstackclient
|
|
|
|
- name: Remove packages from upper-constraints
|
|
lineinfile:
|
|
dest=/home/zuul/src/opendev.org/openstack/openstackclient/upper-constraints.txt
|
|
state=absent
|
|
regexp='^{{ item.short_name }}.*$'
|
|
with_items: "{{ zuul.projects.values() | list }}"
|
|
when:
|
|
- item.name != "openstack/requirements"
|
|
- item.name != "openstack/openstackclient"
|
|
|
|
- name: Install repos that are in requirements.txt
|
|
shell:
|
|
cmd: |
|
|
echo "------------------------------------------------------------"
|
|
grep {{ item.short_name }} requirements.txt
|
|
if [ $? -eq 0 ] ; then
|
|
osc_plugins/bin/pip install -c upper-constraints.txt -e {{ ansible_user_dir }}/{{ item.src_dir }}
|
|
fi
|
|
args:
|
|
chdir: /home/zuul/src/opendev.org/openstack/openstackclient
|
|
with_items: "{{ zuul.projects.values() | list }}"
|
|
when:
|
|
- item.name != "openstack/requirements"
|
|
- item.name != "openstack/openstackclient"
|
|
|
|
- name: Run check_osc_commands
|
|
shell:
|
|
cmd: |
|
|
echo "------------------------------------------------------------"
|
|
osc_plugins/bin/pbr freeze
|
|
echo "------------------------------------------------------------"
|
|
osc_plugins/bin/openstack --version
|
|
osc_plugins/bin/python tests/check_osc_commands.py
|
|
chdir: /home/zuul/src/opendev.org/openstack/openstackclient
|