From 856496533ecf3c1691e38de5e6e899cb25e3983c Mon Sep 17 00:00:00 2001 From: Paul Belanger Date: Mon, 23 Oct 2017 13:29:07 -0400 Subject: [PATCH] Upload to pypi if pre / run was successful If we failed to build a wheel / tarball, we don't actually want to attempt an upload. Checking the zuul_status results will provide that information. Change-Id: If0afb88f5063fe11e664a0393528933911da667b Signed-off-by: Paul Belanger --- playbooks/publish/pypi.yaml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/playbooks/publish/pypi.yaml b/playbooks/publish/pypi.yaml index 00a4777d73..2632ffa923 100644 --- a/playbooks/publish/pypi.yaml +++ b/playbooks/publish/pypi.yaml @@ -1,5 +1,7 @@ - hosts: localhost roles: - - ensure-twine + - role: ensure-twine + when: zuul_success | bool - role: upload-pypi pypi_path: "{{ zuul.executor.work_root }}/artifacts" + when: zuul_success | bool