2023-12-12 20:58:01 +00:00
|
|
|
---
|
|
|
|
when:
|
|
|
|
- event: [pull_request, tag]
|
|
|
|
- event: [push, manual]
|
|
|
|
branch:
|
|
|
|
- ${CI_REPO_DEFAULT_BRANCH}
|
|
|
|
|
2023-12-13 08:31:35 +00:00
|
|
|
variables:
|
|
|
|
- &ansible_base
|
2023-12-12 20:58:01 +00:00
|
|
|
image: docker.io/library/python:3.10
|
2023-12-13 08:43:19 +00:00
|
|
|
group: ansible
|
2023-12-12 20:58:01 +00:00
|
|
|
commands:
|
|
|
|
- pip install poetry -qq
|
|
|
|
- poetry install --all-extras --no-root
|
2023-12-13 08:31:35 +00:00
|
|
|
- poetry run pip install https://github.com/ansible/ansible/archive/$${ANSIBLE_VERSION}.tar.gz --disable-pip-version-check
|
2023-12-12 20:58:01 +00:00
|
|
|
- poetry run ansible --version
|
|
|
|
- poetry run ansible-test sanity --exclude .gitsv/ --exclude .woodpecker/ --python 3.10
|
2023-12-13 08:31:35 +00:00
|
|
|
- &ansible_env
|
|
|
|
PY_COLORS: "1"
|
|
|
|
|
|
|
|
workspace:
|
|
|
|
base: /woodpecker/src
|
|
|
|
path: ansible_collections/${CI_REPO_NAME/./\/}
|
|
|
|
|
|
|
|
steps:
|
|
|
|
ansible-devel:
|
|
|
|
<<: *ansible_base
|
|
|
|
environment:
|
|
|
|
ANSIBLE_VERSION: "devel"
|
|
|
|
<<: *ansible_env
|
|
|
|
|
|
|
|
ansible-216:
|
|
|
|
<<: *ansible_base
|
2023-12-12 20:58:01 +00:00
|
|
|
environment:
|
2023-12-13 08:31:35 +00:00
|
|
|
ANSIBLE_VERSION: "stable-2.16"
|
|
|
|
<<: *ansible_env
|
|
|
|
|
|
|
|
ansible-215:
|
|
|
|
<<: *ansible_base
|
|
|
|
environment:
|
|
|
|
ANSIBLE_VERSION: "stable-2.15"
|
|
|
|
<<: *ansible_env
|
|
|
|
|
|
|
|
depends_on:
|
|
|
|
- lint
|