
Ansible's "uri:" download looks at the file and sets the last-modified-time header, basically assuming if the file with the download name on disk is later than the upstream version it doesn't need to download. This isn't the case for these downloads, where we want each one as they are separate clients. Remove the downloaded file between extractions. Change-Id: I671e9df072a6c59d29659a65829af18deb5e3c9a
71 lines
2.5 KiB
YAML
71 lines
2.5 KiB
YAML
- hosts: localhost
|
|
tasks:
|
|
- name: Ensure artifacts directories exist
|
|
file:
|
|
state: directory
|
|
path: '{{ zuul.executor.work_root }}/{{ item }}'
|
|
loop:
|
|
- 'artifacts/openafs/centos7'
|
|
- 'artifacts/openafs/centos8'
|
|
|
|
# Download everything to the artifacts/ directory for publish
|
|
- name: Download centos 7 x86 artifact
|
|
include_role:
|
|
name: download-artifact
|
|
vars:
|
|
download_artifact_api: "https://zuul.opendev.org/api/tenant/{{ zuul.tenant }}"
|
|
download_artifact_type: rpm.tar.gz
|
|
download_artifact_pipeline: gate
|
|
download_artifact_job: openafs-rpm-package-build-centos-7-x86
|
|
download_artifact_directory: '{{ zuul.executor.work_root }}'
|
|
|
|
- name: Extract centos 7 x86
|
|
unarchive:
|
|
src: '{{ zuul.executor.work_root }}/openafs-rpms.tar.gz'
|
|
dest: '{{ zuul.executor.work_root }}/artifacts/openafs/centos7'
|
|
|
|
- name: Remove artifact
|
|
file:
|
|
state: absent
|
|
path: '{{ zuul.executor.work_root }}/openafs-rpms.tar.gz'
|
|
|
|
- name: Download centos 8 x86 artifact
|
|
include_role:
|
|
name: download-artifact
|
|
vars:
|
|
download_artifact_api: "https://zuul.opendev.org/api/tenant/{{ zuul.tenant }}"
|
|
download_artifact_type: rpm.tar.gz
|
|
download_artifact_pipeline: gate
|
|
download_artifact_job: openafs-rpm-package-build-centos-8-x86
|
|
download_artifact_directory: '{{ zuul.executor.work_root }}'
|
|
|
|
- name: Extract centos 8 x86
|
|
unarchive:
|
|
src: '{{ zuul.executor.work_root }}/openafs-rpms.tar.gz'
|
|
dest: '{{ zuul.executor.work_root }}/artifacts/openafs/centos8'
|
|
|
|
- name: Remove artifact
|
|
file:
|
|
state: absent
|
|
path: '{{ zuul.executor.work_root }}/openafs-rpms.tar.gz'
|
|
|
|
- name: Download centos 8 arm64 artifact
|
|
include_role:
|
|
name: download-artifact
|
|
vars:
|
|
download_artifact_api: "https://zuul.opendev.org/api/tenant/{{ zuul.tenant }}"
|
|
download_artifact_type: rpm.tar.gz
|
|
download_artifact_pipeline: gate
|
|
download_artifact_job: openafs-rpm-package-build-centos-8-arm64
|
|
download_artifact_directory: '{{ zuul.executor.work_root }}'
|
|
|
|
- name: Extract centos 8 arm64
|
|
unarchive:
|
|
src: '{{ zuul.executor.work_root }}/openafs-rpms.tar.gz'
|
|
dest: '{{ zuul.executor.work_root }}/artifacts/openafs/centos8'
|
|
|
|
- name: Remove artifact
|
|
file:
|
|
state: absent
|
|
path: '{{ zuul.executor.work_root }}/openafs-rpms.tar.gz'
|