project-config/playbooks/publish/wheel-mirror.yaml
Ian Wienand 3d776f6734 Add CentOS 8 Stream wheel publish jobs
Depends-On: https://review.opendev.org/c/openstack/openstack-zuul-jobs/+/802988
Change-Id: Id71888115597894d4dcb5c12731f819177fd9341
2021-08-05 08:20:04 +10:00

43 lines
1.5 KiB
YAML

- hosts: all
# We don't want the python2 & python3 hosts copying to AFS at the
# same time. In some cases for generic wheels they can have
# produced a file with the same name and thus we open a window to
# corruption on AFS with multiple simultaneous writers to the same
# file.
serial: 1
pre_tasks:
# NOTE(ianw) 2021-08-04 : ansible_distribution currently reports
# both stream and non-stream as "CentOS" so we need to check lsb
# here.
- name: Generate AFS slug - CentOS Stream
set_fact:
afs_slug: 'centos-{{ ansible_distribution_major_version }}-stream-{{ ansible_architecture }}'
when: ansible_lsb.id == 'CentOSStream'
- name: Generate AFS slug - CentOS
set_fact:
afs_slug: "{{ ansible_distribution|lower }}-{{ ansible_distribution_major_version }}-{{ ansible_architecture }}"
when: ansible_distribution == "CentOS" and
ansible_lsb.id != 'CentOSStream'
- name: Generate AFS slug - Debuntu
set_fact:
afs_slug: "{{ ansible_distribution|lower }}-{{ ansible_distribution_version }}-{{ ansible_architecture }}"
when: ansible_distribution == "Ubuntu" or
ansible_distribution == "Debian"
- name: Set fact for AFS dir
set_fact:
afs_dir: "/afs/.openstack.org/mirror/wheel/{{ afs_slug }}/"
- name: Set fact for wheel dir
set_fact:
wheel_dir: /opt/wheel/workspace
roles:
- create-afs-token
- copy-wheels
- destroy-afs-token