diff --git a/playbooks/puppet-branch-tarball/post.yaml b/playbooks/puppet-branch-tarball/post.yaml new file mode 100644 index 0000000000..fba32b5f9a --- /dev/null +++ b/playbooks/puppet-branch-tarball/post.yaml @@ -0,0 +1,9 @@ +- hosts: all + roles: + - fetch-puppet-module-output + + pre_tasks: + - name: Rename files to branch specific name + shell: "mv *.tar.gz {{ zuul.project.short_name }}-{{ zuul.branch | replace('/', '-') }}.tar.gz" + args: + chdir: "{{ zuul.project.src_dir }}/pkg" diff --git a/playbooks/puppet-branch-tarball/pre.yaml b/playbooks/puppet-branch-tarball/pre.yaml new file mode 100644 index 0000000000..1b64383d60 --- /dev/null +++ b/playbooks/puppet-branch-tarball/pre.yaml @@ -0,0 +1,7 @@ +- hosts: all + roles: + - role: bindep + # NOTE(pabelanger): puppet modules use the build profile to manage + # dependencies for puppet module build. + bindep_profile: build + - revoke-sudo diff --git a/playbooks/puppet-branch-tarball/run.yaml b/playbooks/puppet-branch-tarball/run.yaml new file mode 100644 index 0000000000..26fe7dd5bc --- /dev/null +++ b/playbooks/puppet-branch-tarball/run.yaml @@ -0,0 +1,6 @@ +- hosts: all + tasks: + - name: Build puppet module + command: puppet module build . + args: + chdir: "{{ zuul.project.src_dir }}" diff --git a/zuul.d/jobs.yaml b/zuul.d/jobs.yaml index f42131db37..376334c6d6 100644 --- a/zuul.d/jobs.yaml +++ b/zuul.d/jobs.yaml @@ -328,6 +328,15 @@ - secret: afsdocs_secret name: afs +- job: + name: publish-openstack-puppet-branch-tarball + parent: publish-openstack-artifacts + description: | + Publish the results of the puppet-tarball job to tarballs.openstack.org. + pre-run: playbooks/puppet-branch-tarball/pre + run: playbooks/puppet-branch-tarball/run + post-run: playbooks/puppet-branch-tarball/post + - job: name: publish-openstack-python-branch-tarball parent: publish-openstack-artifacts