diff --git a/playbooks/publish/puppetforge.yaml b/playbooks/publish/puppetforge.yaml index ca4ab9f330..48b5bf634a 100644 --- a/playbooks/publish/puppetforge.yaml +++ b/playbooks/publish/puppetforge.yaml @@ -1,6 +1,18 @@ -- hosts: all - roles: - - role: upload-puppetforge - blacksmith_forge_username: "{{ puppetforge.user }}" - blacksmith_forge_password: "{{ puppetforge.password }}" - when: zuul_success | bool +- hosts: localhost + tasks: + - name: Find all puppet tarballs in artifacts + find: + paths: "{{ zuul.executor.work_root }}/artifacts/" + patterns: '*.tar.gz' + recurse: yes + register: tarballs + - name: Upload tarballs to PuppetForge + include_role: + name: upload-forge + vars: + forge_username: "{{ puppetforge.user }}" + forge_password: "{{ puppetforge.password }}" + forge_tarball: "{{ item.path }}" + forge_url: "https://forgeapi.puppet.com" + with_items: + - "{{ tarballs.files }}" diff --git a/zuul.d/jobs.yaml b/zuul.d/jobs.yaml index f366df0e04..551d29bf68 100644 --- a/zuul.d/jobs.yaml +++ b/zuul.d/jobs.yaml @@ -87,8 +87,8 @@ pre-run: playbooks/puppet-tarball/pre.yaml run: playbooks/puppet-tarball/run.yaml post-run: - - playbooks/publish/puppetforge.yaml - playbooks/puppet-tarball/post.yaml + - playbooks/publish/puppetforge.yaml secrets: - gpg_key - name: puppetforge