When contributing to this repository, please first discuss the change you wish to make via issue, or any other method with the owners of this repository before making a change.
- Prepare the Azure configuration file at
tests/integration/cloud-config-azure.ini
, a template of which is available in the Ansible repo. Populate your appropriate credential and resource group information.- The account or service principal must have permission (typically Owner) on the resource groups.
- Ensure the resource groups defined in your configuration file are already created. Recommended region: East US (not all regions support all Azure features).
- Prepare testing directory (necessary until ansible/ansible#68499 is resolved):
git init tests/staging
- Unless you are running
ansible-test
inside a container (--docker
flag), it is recommended you install Ansible and this repository's dependencies in a virtual environment:python3 -m venv venv . venv/bin/activate pip3 install -U pip pip3 install ansible pip3 install -r requirements-azure.txt pip3 install -r sanity-requirements-azure.txt
- Build/install the collection:
rm azure-azcollection-*.tar.gz && ansible-galaxy collection build . --force && ansible-galaxy collection install azure-azcollection-*.tar.gz -p tests/staging --force
- Switch to the test environment directory where the collection installed:
cd tests/staging/ansible_collections/azure/azcollection/
- Run tests for the desired module(s):
ansible-test integration azure_rm_storageaccount --allow-destructive -v ansible-test sanity azure_rm_storageaccount --color --junit -v
Additional ansible-test
resources:
- Fork this project into your account if you are a first-time contributor.
- Create a branch based on the latest
dev
branch, commit your changes on this branch. - You may merge the Pull Request in once you have the sign-off of two other developers, or if you do not have permission to do that, you may request the second reviewer to merge it for you.
- Please provide integration tests showing the changed behavior/functionality under
tests/integration/targets/<relevant-module>/tasks
. - Think about updating the documentation and examples for the changed module.
- Please run a sanity check. Install prerequisites
pip install -r sanity-requirements-azure.txt
, run withansible-test sanity --color -v --junit
. Read more at https://docs.ansible.com/ansible/latest/dev_guide/testing_sanity.html. - There is a script
tests/utils/ado/ado.sh
for running tests inside an Azure DevOps pipeline. Unfortunately the pipeline and results are not visible for the public. You can perhaps adapt the parts of the script or use a small playbook to run the task list of the integration tests mentioned above.
- Create a release branch from the target commit on dev branch.
- Update version in galaxy.yml and release logs in CHANGELOG.md.
- Make sure the release branch is ready to release, merge the release branch into master branch.
- Tag the master branch with new version number like
v*.*.*
, push to origin. - Release pipleline will automatically release the new version to galaxy.
- Merge released changes back to
dev
branch.
For each release details, you can refer to the CHANGELOG which contains the dates and significant changes in each minor release.