From 760c3c2c691bbac4c49f579938fd88680e9cb890 Mon Sep 17 00:00:00 2001 From: Monty Taylor Date: Wed, 23 Aug 2017 16:32:06 -0400 Subject: [PATCH] Use ensure-twine role to ensure twine exists Depends-On: Ic00e4f0c08fc42ce9d68f39be8522b6c2bba6396 Change-Id: Id1ce97fee85df24675b32af9d610a3323591a8d4 --- playbooks/publish/pypi.yaml | 21 +-------------------- 1 file changed, 1 insertion(+), 20 deletions(-) diff --git a/playbooks/publish/pypi.yaml b/playbooks/publish/pypi.yaml index 0e6ccff371..00a4777d73 100644 --- a/playbooks/publish/pypi.yaml +++ b/playbooks/publish/pypi.yaml @@ -1,24 +1,5 @@ - hosts: localhost roles: + - ensure-twine - 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