From 27beae943be51c598a295bcb019583a03605aefe Mon Sep 17 00:00:00 2001 From: Fabien Boucher Date: Fri, 8 Feb 2019 17:14:38 +0100 Subject: [PATCH] Add the tox_install_bindep option to the tox job If no binary deps are required by a tox run then give the ability to not run the bindep role. default is: true Change-Id: Iacdf54e74126305199c17a932c001bc12c484759 --- playbooks/unittests/pre.yaml | 14 ++++++++++---- zuul.yaml | 6 ++++++ 2 files changed, 16 insertions(+), 4 deletions(-) diff --git a/playbooks/unittests/pre.yaml b/playbooks/unittests/pre.yaml index 379ce8cf0..e046ef386 100644 --- a/playbooks/unittests/pre.yaml +++ b/playbooks/unittests/pre.yaml @@ -1,5 +1,11 @@ - hosts: all - roles: - - role: bindep - bindep_dir: "{{ zuul_work_dir }}" - - test-setup + tasks: + - name: Install binary dependencies + include_role: + name: bindep + vars: + bindep_dir: "{{ zuul_work_dir }}" + when: tox_install_bindep | default(true) + - name: Run test-setup role + include_role: + name: test-setup diff --git a/zuul.yaml b/zuul.yaml index 6de795cfe..8842672cb 100644 --- a/zuul.yaml +++ b/zuul.yaml @@ -84,6 +84,12 @@ Override tox requirements that have corresponding zuul git repos on the node by installing the git versions into the tox virtualenv. + + .. zuul:jobvar: tox_install_bindep + :default: true + + Whether or not to run the binary dependencies detection and + installation with bindep. run: playbooks/tox/run.yaml pre-run: playbooks/tox/pre.yaml post-run: playbooks/tox/post.yaml