Set pypi_twine_executable for upload-pypi role
Use the full path for twine to avoid pathing issues. Change-Id: Ie4b500bea8fcf48092cee29c58ae5c05e28cfff4 Depends-On: I5c757b29e185ab76495abf3cfb2d853aada77a50 Signed-off-by: Paul Belanger <pabelanger@redhat.com>
This commit is contained in:
parent
d45da4ffad
commit
5d36ba7fc7
@ -1,5 +1,24 @@
|
||||
- hosts: localhost
|
||||
|
||||
roles:
|
||||
- role: upload-pypi
|
||||
pypi_path: "{{ zuul.executor.work_root }}/artifacts"
|
||||
|
||||
pre_tasks:
|
||||
- name: Check for twine install
|
||||
command: which twine
|
||||
ignore_errors: yes
|
||||
register: register_twine
|
||||
|
||||
- name: Set pypi_twine_executable
|
||||
set_fact:
|
||||
pypi_twine_executable: "{{ register_twine.stdout }}"
|
||||
when: register_twine|succeeded
|
||||
|
||||
- name: Ensure twine is installed
|
||||
command: pip install twine --user
|
||||
when: pypi_twine_executable is not defined
|
||||
|
||||
- name: Set pypi twine executable
|
||||
set_fact:
|
||||
pypi_twine_executable: ~/.local/bin/twine
|
||||
when: pypi_twine_executable is not defined
|
||||
|
Loading…
Reference in New Issue
Block a user