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
|
- name: Query Zuul API for artifact information
|
||||||
uri:
|
block:
|
||||||
url: "{{ download_artifact_api }}/builds?{{ download_artifact_query }}"
|
- name: Fetch info from Zuul API
|
||||||
register: build
|
uri:
|
||||||
- name: Parse build response
|
url: "{{ download_artifact_api }}/builds?{{ download_artifact_query }}"
|
||||||
set_fact:
|
register: build
|
||||||
build: "{{ build.json[0] }}"
|
|
||||||
|
- 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
|
- name: Download archive by type
|
||||||
uri:
|
uri:
|
||||||
url: "{{ artifact.url }}"
|
url: "{{ artifact.url }}"
|
||||||
|
|
Loading…
Reference in New Issue