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

Add downstream testing pipeline #1434

Merged
merged 2 commits into from
Mar 10, 2021
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
1 change: 1 addition & 0 deletions .github/workflows/tox.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ jobs:
env:
- TOXENV: lint
- TOXENV: docs
- TOXENV: eco
- TOXENV: packaging
env:
TOX_PARALLEL_NO_SPINNER: 1
Expand Down
38 changes: 38 additions & 0 deletions playbooks/eco.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
#!env ansible-playbook
- hosts: localhost
connection: local
gather_facts: false
vars:
cache_dir: "{{ (lookup('env','HOME'), '.cache', 'ansible-lint-eco') | path_join | realpath }}"
repos:
- name: ansible-role-mysql
url: https://github.com/geerlingguy/ansible-role-mysql.git
contact: geerlingguy
# Enable after: https://review.opendev.org/c/zuul/zuul-jobs/+/773245
# - name: zuul-jobs
# url: https://opendev.org/zuul/zuul-jobs
# contact: ssbarnea
- name: ansible-role-hardening
url: https://github.com/konstruktoid/ansible-role-hardening
contact: konstruktoid
- name: ansible-docker-rootless
url: https://github.com/konstruktoid/ansible-docker-rootless
contact: konstruktoid
# Enable after: https://github.com/devroles/ansible_collection_system/pull/1
- name: ansible_collection_system
url: https://github.com/devroles/ansible_collection_system
contact: greg-hellings
tasks:

- name: Clone repo
git:
repo: "{{ item.url }}"
dest: "{{ (cache_dir, item.name) | path_join }}"
loop: "{{ repos }}"

- name: Run linter
command: ansible-lint -v
args:
chdir: "{{ (cache_dir, item.name) | path_join }}"
loop: "{{ repos }}"
changed_when: false
14 changes: 14 additions & 0 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,20 @@ commands =
'print("\n" + "=" * 120 + f"\n\nDocumentation available under `file://\{index_file\}`\n\nTo serve docs, use `python3 -m http.server --directory \{docs_dir\} 0`\n\n" + "=" * 120)'
changedir = {toxinidir}/docs

[testenv:eco]
description = Perform ecosystem impact (downstream testing) https://github.com/ansible-community/ansible-lint/discussions/1403
commands =
ansible-playbook -i localhost, playbooks/eco.yml
extras =
yamllint
community
setenv =
ANSIBLE_FORCE_COLOR=1
ANSIBLE_NOCOWS=1
ANSIBLE_PYTHON_INTERPRETER=auto_silent
ANSIBLE_STDOUT_CALLBACK=yaml
NO_COLOR=1

[testenv:packaging]
basepython = python3
description =
Expand Down