Replace deprecated bindep-fallback testing

Adopts testing using in-repo bindep.txt testing file instead of
using the deprecated externally hosted bindep-fallback.txt file.

Initial file is the same but in the future we may want to simplify it.

Change-Id: I570fe8686068478a163e4fe597514460b6a69fef
This commit is contained in:
Sorin Sbarnea
2019-02-11 15:58:37 +00:00
parent 0bc70eee07
commit 2152331ebf
4 changed files with 151 additions and 36 deletions

31
playbooks/bindep/run.yaml Normal file
View File

@@ -0,0 +1,31 @@
- hosts: all
vars:
bindep_profile: test
tasks:
- name: Install requirements
pip:
chdir: "{{ zuul_work_dir }}"
virtualenv: "{{ zuul_work_virtualenv }}"
requirements: requirements.txt
- name: Install the project from source
pip:
chdir: "{{ zuul_work_dir }}"
virtualenv: "{{ zuul_work_virtualenv }}"
name: .
- name: Run bindep with the file
command: >
{{ zuul_work_virtualenv }}/bin/bindep -b -f
"{{ ansible_user_dir }}/{{ zuul.projects['git.openstack.org/openstack-infra/bindep'].src_dir }}/bindep/tests/bindep.txt"
{{ bindep_profile }}
register: _bindep_output
changed_when: false
failed_when: false
- name: Install distro packages from bindep
package:
name: "{{ _bindep_output.stdout_lines }}"
state: present
become: yes
when: _bindep_output.stdout_lines