This repository contains a reusable GitHub Actions workflow to check whether an Ansible collection is ready for certification on Red Hat Ansible Automation Hub.
The workflow helps Red Hat partners catch common certification issues before uploading a collection to Automation Hub. Furthermore, the workflow file calls a reusable workflow that the Ansible Community and Partner Engineering team at Red Hat maintain.
The certification checker runs the same types of checks used during the Automation Hub import process, including:
- Galaxy importer checks
- Ansible Lint checks
- Ansible sanity tests
These checks help reduce failed imports and repeat release cycles.
Important
This checker runs the types of checks used during the Automation Hub import process. The Ansible collection certification process has other requirements which this checker does not cover.
Important
This checker is not a replacement for a complete test strategy. Use it alongside unit and integration tests for your modules, plugins, and roles.
Add the certification workflow to your collection repository.
-
Clone this repository.
-
Copy the certification workflow into your collection repository:
cp partner-certification-checker/.github/workflows/certification.yml <PATH>/<TO>/<COLLECTION>.github/workflows/certification.yml
-
Commit and push the workflow:
cd <PATH>/<TO>/<COLLECTION> git add .github/workflows/certification.yml git commit -m "Add certification workflow" git push
-
Open the
Actionstab in your collection repository and verify that the workflow is enabled.
Add an .ansible-lint file to the root of your collection repository. This prevents unrelated files from causing Ansible Lint failures.
Optionally, add a .github/dependabot.yml configuration file so your repository receives pull requests when the certification workflow is updated.
Create .github/dependabot.yml:
version: 2
updates:
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "weekly"For more information, see the Dependabot documentation.
Some sanity test failures cannot be fixed and may need to be ignored.
To ignore an allowed sanity failure:
- Review the list of currently allowed ignores.
- Create a sanity ignore file for each affected ansible-core version, for example
tests/sanity/ignore-2.18.txt. - Add the required ignore entries.
- Commit and push the changes.
| Component | Version |
|---|---|
| ansible-core sanity branches | stable-2.16, stable-2.18, stable-2.20 |
Python for ansible-lint and galaxy-importer |
3.12 |
| Default ansible-core for build, import, and lint jobs | 2.16.0 |
The tested ansible-core branches are aligned with downstream Execution Environments.