Rework to use new upload-forge module

Reworks the publish playbooks and the post-run jobs
for the Puppet release job.

Depends-On: https://review.openstack.org/#/c/635941/
Change-Id: Ia9b149d3e1e94331b047d9bc762359d09ce81b20
This commit is contained in:
Tobias Urdin 2019-02-08 22:58:22 +01:00
parent b5ad176a1d
commit 1de4c20e00
2 changed files with 19 additions and 7 deletions

View File

@ -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 }}"

View File

@ -114,8 +114,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