Skip to content

Commit

Permalink
Dont merge
Browse files Browse the repository at this point in the history
Signed-off-by: Paul Belanger <[email protected]>
  • Loading branch information
pabelanger committed Nov 26, 2019
1 parent f8a749e commit 26cc2ac
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 0 deletions.
15 changes: 15 additions & 0 deletions .zuul.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,19 @@
- job:
name: test-sandbox
run: playbooks/run.yaml
nodeset: centos-8-1vcpu
vars:
download_artifact_directory: ~/downloads
download_artifact_type:
- ansible_collection

- project:
check:
jobs:
- build-ansible-collection
- test-sandbox:
dependencies:
- build-ansible-collection
post:
jobs:
- release-ansible-collection-galaxy-dev
Expand Down
14 changes: 14 additions & 0 deletions playbooks/roles/download-ansible-collections/tasks/main.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
---
- name: create dir
file:
path: "{{ download_artifact_directory }}"
state: directory

- name: Download archive by type
uri:
url: "{{ artifact.url }}"
dest: "{{ download_artifact_directory }}"
loop: "{{ zuul.artifacts }}"
loop_control:
loop_var: artifact
when: "'metadata' in artifact and 'type' in artifact.metadata and (artifact.metadata.type == download_artifact_type or ((download_artifact_type | type_debug) == 'list' and artifact.metadata.type in download_artifact_type))"
5 changes: 5 additions & 0 deletions playbooks/run.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
- hosts: all
tasks:
- name: download ansible collections
include_role:
name: download-artifact

0 comments on commit 26cc2ac

Please sign in to comment.