-
Notifications
You must be signed in to change notification settings - Fork 1
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
Set up molecule testing #3
Conversation
Take the roles so we can run only roles that have changed in the pr
scenario: | ||
- centos7 | ||
env: | ||
MOLECULE_RUN_TAGS: provision |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this limits molecule to run only mirsg.infrastructure.provision
callbacks_enabled: profile_tasks, timer, yaml | ||
vault_password_file: "${MOLECULE_SCENARIO_DIRECTORY}/../resources/.vault_password" | ||
tags: | ||
run: ${MOLECULE_RUN_TAGS:-all} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if we don't define MOLECULE_RUN_TAGS
, all converge steps are performed
- role: mirsg.infrastructure.provision | ||
tags: provision | ||
- role: mirsg.infrastructure.install_python | ||
tags: python |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we will need to add the other roles here, and probably target specific groups for some of them
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
centos7
molecule scenario (tests/molecule/centos7/molecule.yml
) - it has two instances, one for a database and another for a web servertests/molecule/resources/inventory/hosts.yml
)tests/molecule/resources/inventory/group_vars/all.yml
)tests/molecule/resources/converge.yml
). This playbook uses tags to limit which roles are included. This means we can run molecule only on roles that have changed in a given pr.mirsg.infrastructure.provision
when the provision role has changedEdit: @drmatthews after talking offline, we'll use a single instance for running molecule tests rather than two (database + web server)