Update download-artifact to use zuul.artifacts
Also support the ability for child_jobs to fetch artifacts. Change-Id: I0e2d43873410a095771503da712e67db5b64f25f Signed-off-by: Paul Belanger <pabelanger@redhat.com>
This commit is contained in:
parent
26cadea6af
commit
272cfbee78
|
@ -1,10 +1,28 @@
|
|||
---
|
||||
- name: Query inventory for artifact information
|
||||
block:
|
||||
- name: Parse inventory response
|
||||
set_fact:
|
||||
build: "{{ zuul.artifacts }}"
|
||||
when: zuul.artifacts is defined
|
||||
|
||||
- name: Query Zuul API for artifact information
|
||||
uri:
|
||||
url: "{{ download_artifact_api }}/builds?{{ download_artifact_query }}"
|
||||
register: build
|
||||
- name: Parse build response
|
||||
set_fact:
|
||||
build: "{{ build.json[0] }}"
|
||||
block:
|
||||
- name: Fetch info from Zuul API
|
||||
uri:
|
||||
url: "{{ download_artifact_api }}/builds?{{ download_artifact_query }}"
|
||||
register: build
|
||||
|
||||
- name: Parse build response
|
||||
set_fact:
|
||||
build: "{{ build.json[0] }}"
|
||||
when: download_artifact_api is defined
|
||||
|
||||
- name: Ensure artifacts directory exists
|
||||
file:
|
||||
path: "{{ download_artifact_directory }}"
|
||||
state: directory
|
||||
|
||||
- name: Download archive by type
|
||||
uri:
|
||||
url: "{{ artifact.url }}"
|
||||
|
|
Loading…
Reference in New Issue