Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Example vmware job #47

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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