Skip to content

Conversation

@fatz
Copy link
Contributor

@fatz fatz commented Oct 28, 2022

What problem does this PR solve?:
Currently only basic testing is done against a full image build. But changes in ansible are not covered by tests. This actually lead to customer facing issue.

Molecule was in a quite unmaintained state. To improve code quality its important to establish a test driven approach making changes to the ansible code in KIB.

This PR will establish automated molecule testing for all supported OSes by using AWS instances for testing.

We'll not cover provider specific code but focus on the supported Distributions

Action items:

  • make sure ansible ( without the sysprep step ) is idempotent so while developing new features ansible could be run over and over again
  • ensure molecule works from within the devkit container
  • establish private AWS GH runner for this repository
  • add github actions to run the molecule suite whenever there are changes in /ansible
  • add github action to run special GPU related tests whenever the /ansible/roles/gpu has changes

Which issue(s) does this PR fix?:

no jira

Special notes for your reviewer:
This is branched off my latest changes about cloud-init due to those changes adding a molecule test.

Does this PR introduce a user-facing change?:


@github-actions
Copy link
Contributor

File Coverage
All files 15%
pkg/ansible/runner.go 0%
pkg/app/artifacts.go 0%
pkg/app/build.go 0%
pkg/app/build_azure.go 2%
pkg/app/build_gcp.go 0%
pkg/app/config.go 49%
pkg/app/errors.go 0%
pkg/app/provision.go 0%
pkg/app/root.go 0%
pkg/app/utils.go 7%
pkg/app/validate.go 0%
pkg/appansible/io.go 0%
pkg/appansible/playbook.go 0%
pkg/azure/azure.go 0%
pkg/logging/logger.go 0%
pkg/packer/manifest.go 0%
pkg/packer/packer.go 0%
pkg/stringutil/rand.go 0%
pkg/version/info.go 8%

Minimum allowed coverage is 75%

Generated by 🐒 cobertura-action against 00de00f

@fatz fatz force-pushed the julferts/ansible-testing-molecule branch from 9b914e1 to 90c3293 Compare March 7, 2023 09:38
@fatz fatz requested review from dkoshkin, faiq and supershal March 7, 2023 09:38
@fatz
Copy link
Contributor Author

fatz commented Mar 7, 2023

Hey @supershal @faiq I've took another look into this PR and rebased it.

It adds regular molecule test to improve ansible code quality as molecule does not only testing the run results but also doing linting of ansible.

@fatz fatz mentioned this pull request Mar 8, 2023
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.

2 participants