Skip to content

ci: Comply with Ansible partner certification checking [citest_skip]#9

Closed
richm wants to merge 1 commit into
mainfrom
ci-ansible-lint-ansible-test-matrix
Closed

ci: Comply with Ansible partner certification checking [citest_skip]#9
richm wants to merge 1 commit into
mainfrom
ci-ansible-lint-ansible-test-matrix

Conversation

@richm
Copy link
Copy Markdown
Contributor

@richm richm commented Apr 8, 2026

https://github.com/ansible-collections/partner-certification-checker/blob/main/README.md

Unfortunately we cannot use the checkers provided by their team because they assume
the git repo is in collection format - you cannot convert to collection format first
then point the checkers at that collection. Instead, implement our own checkers that
do the same (and more) - check with multiple versions of ansible-lint and ansible-test
to ensure we cover:

  • all supported versions of EL
  • Automation Hub gating
  • the latest versions of Ansible, including the latest milestone version

This requires the latest version of tox-lsr

Signed-off-by: Rich Megginson rmeggins@redhat.com

Summary by Sourcery

Align CI and test workflows with Ansible partner certification requirements and update role naming and documentation to the trustee_server identity.

New Features:

  • Add a reusable test task file to clear facts and run the linux-system-roles.trustee_server role with optional failure handling.

Bug Fixes:

  • Correct role name, GitHub repository links, and related identifiers from trustee_attestation_server to trustee_server across documentation, plans, and tests.
  • Fix Red Hat distribution variable names in test vars to match the trustee_server role naming.

Enhancements:

  • Extend ansible-lint CI to run as a matrix over multiple ansible-lint, ansible-core, and Python versions and invoke linting via tox in collection format.
  • Extend ansible-test CI to run a matrix of ansible-test environments across multiple ansible-core and Python versions using tox-managed environments.
  • Upgrade tox-lsr to version 3.18.0 across CI workflows for linting, testing, and integration jobs.
  • Adjust Testing Farm tmt plan filters to use the trustee_server tag and workflow URLs.
  • Update README CI badges to point to the trustee_server repository workflows.

Tests:

  • Add a helper task file to clear Ansible facts and run the trustee_server role under different failure-handling modes for use in tests.

https://github.com/ansible-collections/partner-certification-checker/blob/main/README.md

Unfortunately we cannot use the checkers provided by their team because they assume
the git repo is in collection format - you cannot convert to collection format first
then point the checkers at that collection.  Instead, implement our own checkers that
do the same (and more) - check with multiple versions of ansible-lint and ansible-test
to ensure we cover:

* all supported versions of EL
* Automation Hub gating
* the latest versions of Ansible, including the latest milestone version

This requires the latest version of tox-lsr

Signed-off-by: Rich Megginson <rmeggins@redhat.com>
@richm richm requested a review from spetrosi as a code owner April 8, 2026 22:00
@richm richm self-assigned this Apr 8, 2026
@sourcery-ai
Copy link
Copy Markdown

sourcery-ai Bot commented Apr 8, 2026

Reviewer's Guide

Updates CI to run in-repo Ansible partner certification-equivalent checks across multiple ansible-lint, ansible-core, and Python versions using tox-lsr 3.18.0, aligns repository naming from trustee_attestation_server to trustee_server in docs/tests/CI plans, and adds a reusable helper task file for running the role with cleared facts and optional failure suppression.

File-Level Changes

Change Details Files
Run ansible-lint via tox across multiple ansible-lint/ansible-core/Python versions instead of the ansible-lint GitHub Action.
  • Add a fail-fast: false strategy matrix over ansible-lint, ansible-core, and Python versions to the ansible-lint workflow.
  • Upgrade tox-lsr dependency from 3.17.1 to 3.18.0 in the ansible-lint workflow.
  • Replace the previous collection-conversion plus ansible-lint GitHub Action invocation with a tox call that converts to a collection and runs the ansible-lint-collection environment, parameterized via LSR_ANSIBLE_LINT_* env vars and matrix Python.
.github/workflows/ansible-lint.yml
Run ansible-test via tox across a matrix of ansible-core and Python versions instead of the ansible-test GitHub Action.
  • Introduce a fail-fast: false matrix for multiple ansible-core streams (2-14 through 2-20 plus milestone) and Python versions in the ansible-test workflow.
  • Upgrade tox-lsr dependency from 3.17.1 to 3.18.0 in the ansible-test workflow.
  • Replace the ansible-community/ansible-test-gh-action usage with a tox run that first converts the role to a collection and then executes versioned ansible-test-* environments with matrix-specific basepython overrides.
.github/workflows/ansible-test.yml
Align project naming and URLs from trustee_attestation_server to trustee_server in docs and CI-related files.
  • Update contributing guide title, issue tracker links, and repository links to use trustee_server.
  • Adjust tmt/Testing Farm documentation and tft workflow plan filters and git URLs to reference trustee_server.
  • Update README workflow badges to point to the trustee_server GitHub repository.
  • Rename internal distro-related test vars from _trustee_attestation_server* to _trustee_server* for consistency.
contributing.md
plans/README-plans.md
.github/workflows/tft.yml
README.md
tests/vars/rh_distros_vars.yml
Standardize tox-lsr version and partner certification-related configuration across remaining CI workflows.
  • Bump tox-lsr from 3.17.1 to 3.18.0 in ansible-managed-var-comment, qemu-kvm-integration-tests, and related workflows.
  • Adjust tmt_plan_filter in tft.yml to use the trustee_server tag required by shared certification/testing infrastructure.
.github/workflows/ansible-managed-var-comment.yml
.github/workflows/qemu-kvm-integration-tests.yml
.github/workflows/tft.yml
Add a reusable test task file to clear facts and run the trustee_server role with optional failure suppression for tests.
  • Introduce tests/tasks/run_role_with_clear_facts.yml as a centrally managed helper to clear facts and include the linux-system-roles.trustee_server role.
  • Support optional parameters (__sr_tasks_from, __sr_public, __sr_failed_when) to control which tasks to run, variable visibility, and whether to ignore role failures by wrapping include_role in a block/rescue.
  • Ensure a normal role execution path when __sr_failed_when is true or undefined to preserve original failure behavior.
tests/tasks/run_role_with_clear_facts.yml

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

Copy link
Copy Markdown

@sourcery-ai sourcery-ai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey - I've reviewed your changes and they look great!


Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

@richm richm closed this Apr 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant