From 90d8d68ebba513a8dba3708777e3600efb96bd47 Mon Sep 17 00:00:00 2001 From: Clark Boylan Date: Thu, 4 Jan 2018 13:41:32 -0800 Subject: [PATCH] Create artifacts dir regardless of afs rpm builds We don't always create afs rpms in our periodic job so we were skipping the creation of the artifacts dir. Unfortunately the openstack artifact publishing playbook expects this dir to exist. Fix this by creating the artifacts dir but not populating it with RPMs if we didn't build any RPMs for openafs. Change-Id: I986bca765ae898e9792e789c6852bce1d654d580 --- playbooks/package-afs-centos/post.yaml | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/playbooks/package-afs-centos/post.yaml b/playbooks/package-afs-centos/post.yaml index dbebbbae..7bde3e05 100644 --- a/playbooks/package-afs-centos/post.yaml +++ b/playbooks/package-afs-centos/post.yaml @@ -1,6 +1,14 @@ - hosts: all tasks: + # Note we always create the artifacts dir so that the openstack artifacts + # publishing playbook is happy. + - name: Ensure artifacts directory exists + file: + state: directory + path: '{{ zuul.executor.work_root }}/artifacts/package-afs-centos7' + delegate_to: localhost + # We only build an RPM if one doesn't exist for the desired version. - name: Check for built RPMs stat: @@ -10,13 +18,6 @@ get_md5: false register: rpms_exist - - name: Ensure artifacts directory exists - when: rpms_exist.stat.exists - file: - state: directory - path: '{{ zuul.executor.work_root }}/artifacts/package-afs-centos7' - delegate_to: localhost - - name: Copy RPMs back for publication when: rpms_exist.stat.exists synchronize: