Binary dependency automation
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
bindep/playbooks/bindep/run.yaml

35 lines
1.0 KiB

- hosts: all
roles:
- ensure-pip
vars:
bindep_profile: test
tasks:
- name: Install requirements
pip:
chdir: "{{ zuul_work_dir }}"
virtualenv: "{{ zuul_work_virtualenv }}"
virtualenv_command: "{{ ensure_pip_virtualenv_command }}"
requirements: requirements.txt
- name: Install the project from source
pip:
chdir: "{{ zuul_work_dir }}"
virtualenv: "{{ zuul_work_virtualenv }}"
virtualenv_command: "{{ ensure_pip_virtualenv_command }}"
name: .
- name: Run bindep with the file
command: >
{{ zuul_work_virtualenv }}/bin/bindep -b -f
"{{ ansible_user_dir }}/{{ zuul.projects['opendev.org/opendev/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