Setup virtualenv for zuul-cloner
The zuul-cloner shim require PyYAML as a dependency, create a virtualenv and install it. This replaces the destination with virtualenv variable. Change-Id: I3e55a3a1582aa7dea21c7de67260c2c906c2192b Signed-off-by: Paul Belanger <pabelanger@redhat.com>
This commit is contained in:
parent
560a907b06
commit
6bb1f6046b
1
roles/fetch-zuul-cloner/defaults/main.yaml
Normal file
1
roles/fetch-zuul-cloner/defaults/main.yaml
Normal file
@ -0,0 +1 @@
|
||||
virtualenv: /usr/zuul-env
|
@ -1,18 +1,18 @@
|
||||
- name: Create zuul-cloner destination directory
|
||||
file:
|
||||
path: "{{ destination | dirname }}"
|
||||
state: directory
|
||||
- name: Install zuul-cloner shim dependencies
|
||||
pip:
|
||||
name: PyYAML
|
||||
virtualenv: "{{ virtualenv }}"
|
||||
become: yes
|
||||
|
||||
- name: Install zuul-cloner shim
|
||||
template:
|
||||
src: templates/zuul-cloner-shim.py.j2
|
||||
dest: "{{ destination }}"
|
||||
dest: "{{ virtualenv }}/bin/zuul-cloner"
|
||||
become: yes
|
||||
|
||||
- name: Change zuul-cloner permissions
|
||||
file:
|
||||
path: "{{ destination }}"
|
||||
path: "{{ virtualenv }}/bin/zuul-cloner"
|
||||
mode: 0755
|
||||
become: yes
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user