Skip to content
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

Install collection to local directory during development #763

Merged
merged 5 commits into from
Apr 18, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
*.pyc
tests/output/
tests/staging/
tests/integration/cloud-config-azure.ini
azure-azcollection-*.tar.gz
venv*
.venv*
.vscode
ansible_collections/
6 changes: 3 additions & 3 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ When contributing to this repository, please first discuss the change you wish t
1. Ensure the resource groups defined in your configuration file are already created. Recommended region: **East US** (not all regions support all Azure features).
1. Prepare testing directory (necessary until [ansible/ansible#68499](https://github.com/ansible/ansible/issues/68499) is resolved):
```bash
git init tests/staging
git init ansible_collections
```
1. 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:
```bash
Expand All @@ -25,11 +25,11 @@ When contributing to this repository, please first discuss the change you wish t

1. Build/install the collection:
```bash
rm azure-azcollection-*.tar.gz && ansible-galaxy collection build . --force && ansible-galaxy collection install azure-azcollection-*.tar.gz -p tests/staging --force
rm -f azure-azcollection-*.tar.gz && ansible-galaxy collection build . --force && ansible-galaxy collection install azure-azcollection-*.tar.gz --force
```
1. Switch to the test environment directory where the collection installed:
```bash
cd tests/staging/ansible_collections/azure/azcollection/
cd ansible_collections/azure/azcollection/
```
1. Run tests for the desired module(s):
```bash
Expand Down
2 changes: 2 additions & 0 deletions ansible.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[defaults]
collections_paths = ./
3 changes: 2 additions & 1 deletion galaxy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,4 +67,5 @@ build_ignore:
- 'azure-azcollection-*.tar.gz'
- 'venv*'
- '.vscode'
- 'tests/staging'
- 'ansible_collections'
- 'ansible.cfg'