openstack-zuul-jobs/playbooks/package-afs-centos/centos8/post.yaml
Ian Wienand 7160e29bef Add CentOS 8 openafs package build job
Split the extant job into separate centos7 and centos8 parts (this is
so we can easily just rm the centos7 path when it's not required,
rather than making some mashed up combined job), and add a centos8
job to build openafs packages for centos-8.

This is in preparation for making centos-8 wheels; we copy the wheel
directly from the building host so it needs an openafs client.

Change-Id: I2d6392879aac85431253284f217b9daa4a9af94d
2020-01-14 16:41:02 +11:00

29 lines
904 B
YAML

- 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-centos8'
delegate_to: localhost
# We only build an RPM if one doesn't exist for the desired version.
- name: Check for built RPMs
stat:
path: '{{ ansible_user_dir }}/rpmbuild/RPMS/x86_64'
get_checksum: false
get_mime: false
get_md5: false
register: rpms_exist
- name: Copy RPMs back for publication
when: rpms_exist.stat.exists
synchronize:
src: '{{ ansible_user_dir }}/rpmbuild/RPMS/x86_64/'
dest: '{{ zuul.executor.work_root }}/artifacts/package-afs-centos8'
mode: pull
delete: true
recursive: true