Skip to content

Added Community Collection Template as a collection-type to create new collections locally #80782

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

Closed
wants to merge 7 commits into from

Conversation

Ompragash
Copy link
Contributor

SUMMARY
  • Supports Community Collection Template as a type to initialize a new collection using ansible-galaxy command. Eg: ansible-galaxy collection init example.my_collection --type community
  • Added integration test for the new collection type community.

Extras:

  • Added integration test for existing role types container, apb and network.
ISSUE TYPE
  • Feature Pull Request
COMPONENT NAME
  • ansible-galaxy

Ompragash added 5 commits May 12, 2023 04:51
…w collections locally

Signed-off-by: Ompragash Viswanathan <ompragash@proton.me>
Signed-off-by: Ompragash Viswanathan <ompragash@proton.me>
Signed-off-by: Ompragash Viswanathan <ompragash@proton.me>
Signed-off-by: Ompragash Viswanathan <ompragash@proton.me>
Signed-off-by: Ompragash Viswanathan <ompragash@proton.me>
@ansibot ansibot added affects_2.16 feature This issue/PR relates to a feature request. needs_triage Needs a first human triage before being processed. labels May 12, 2023
@ansibot
Copy link
Contributor

ansibot commented May 12, 2023

The test ansible-test sanity --test package-data [explain] failed with 15 errors:

lib/ansible/galaxy/data/community/.github/workflows/ansible-test.yml:0:0: File not installed
lib/ansible/galaxy/data/community/.github/workflows/extra-docs-linting.yml:0:0: File not installed
lib/ansible/galaxy/data/community/.gitignore:0:0: File not installed
lib/ansible/galaxy/data/community/CHANGELOG.rst:0:0: File not installed
lib/ansible/galaxy/data/community/LICENSE:0:0: File not installed
lib/ansible/galaxy/data/community/MAINTAINERS:0:0: File not installed
lib/ansible/galaxy/data/community/changelogs/changelog.yaml:0:0: File not installed
lib/ansible/galaxy/data/community/changelogs/fragments/.keep:0:0: File not installed
lib/ansible/galaxy/data/community/changelogs/fragments/.keep:0:0: File was not added to sdist
lib/ansible/galaxy/data/community/meta/runtime.yml:0:0: File not installed
lib/ansible/galaxy/data/community/tests/integration/targets/.gitkeep:0:0: File not installed
lib/ansible/galaxy/data/community/tests/integration/targets/.gitkeep:0:0: File was not added to sdist
lib/ansible/galaxy/data/community/tests/units/.gitkeep:0:0: File not installed
lib/ansible/galaxy/data/community/tests/units/.gitkeep:0:0: File was not added to sdist
test/support/README.md:0:0: File was not added to sdist

click here for bot help

@ansibot ansibot added the needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR. label May 12, 2023
Signed-off-by: Ompragash Viswanathan <ompragash@proton.me>
@ansibot ansibot added needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR. and removed needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR. labels May 12, 2023
@bcoca bcoca removed the needs_triage Needs a first human triage before being processed. label May 16, 2023
@ansibot ansibot removed the needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR. label May 18, 2023
@mattclay
Copy link
Member

Instead of embedding ever more complex templates into ansible-galaxy, we should rely on externally provided templates.

Perhaps something like this (just an example, a different option may be more appropriate):

ansible-galaxy collection init my_namespace.my_collection --collection-skeleton https://github.com/ansible-collections/collection_template/archive/refs/heads/main.zip

Then the templates can be easily versioned, updated, etc. without having to constantly update ansible-galaxy.

@ansibot ansibot added the needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR. label May 18, 2023
@mattclay

This comment was marked as outdated.

@azure-pipelines

This comment was marked as outdated.

@ansibot ansibot removed the needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR. label May 18, 2023
@sivel
Copy link
Member

sivel commented May 18, 2023

Instead of embedding ever more complex templates into ansible-galaxy, we should rely on externally provided templates

+100 to this. I don't see us ever accepting things like the GHA workflows included in this PR into this repo.

@ansibot ansibot added the needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR. label May 18, 2023
@ansibot ansibot added the stale_ci This PR has been tested by CI more than one week ago. Close and re-open this PR to get it retested. label May 26, 2023
@ansibot ansibot added the needs_rebase https://docs.ansible.com/ansible/devel/dev_guide/developing_rebasing.html label Jun 7, 2023
@ansibot
Copy link
Contributor

ansibot commented Jun 19, 2023

@Ompragash this PR contains the following merge commits:

Please rebase your branch to remove these commits.

click here for bot help

@ansibot ansibot added merge_commit This PR contains at least one merge commit. Please resolve! and removed needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR. stale_ci This PR has been tested by CI more than one week ago. Close and re-open this PR to get it retested. labels Jun 19, 2023
@ansibot
Copy link
Contributor

ansibot commented Jun 19, 2023

The test ansible-test sanity --test package-data [explain] failed with 12 errors:

lib/ansible_test/_internal/commands/sanity/bin_symlinks.py:0:0: File not installed
lib/ansible_test/_internal/commands/sanity/integration_aliases.py:0:0: File not installed
test/lib/ansible_test/_internal/commands/sanity/bin_symlinks.py:0:0: File was not added to sdist
test/lib/ansible_test/_internal/commands/sanity/integration_aliases.py:0:0: File was not added to sdist
test/sanity/code-smell/botmeta.json:0:0: File was not added to sdist
test/sanity/code-smell/botmeta.py:0:0: File was not added to sdist
test/sanity/code-smell/botmeta.requirements.in:0:0: File was not added to sdist
test/sanity/code-smell/botmeta.requirements.txt:0:0: File was not added to sdist
test/sanity/code-smell/release-names.json:0:0: File was not added to sdist
test/sanity/code-smell/release-names.py:0:0: File was not added to sdist
test/sanity/code-smell/release-names.requirements.in:0:0: File was not added to sdist
test/sanity/code-smell/release-names.requirements.txt:0:0: File was not added to sdist

click here for bot help

@ansibot ansibot added the needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR. label Jun 19, 2023
@Ompragash
Copy link
Contributor Author

@sivel This has already been discussed in the earlier PR #74901 but do you think we can hardcode the community-collection repo link in the galaxy code and running the command ansible-galaxy collection init example.my_collection --type community will download the skeleton and change the namespace and collection names as required?
@mattclay would love to hear your thoughts as well

@Ompragash Ompragash marked this pull request as draft June 19, 2023 10:50
@ansibot ansibot added the WIP This issue/PR is a work in progress. Nevertheless it was shared for getting input from peers. label Jun 19, 2023
@mattclay
Copy link
Member

@Ompragash Any template download implementation should not be hard-coded.

@ansibot ansibot added the stale_ci This PR has been tested by CI more than one week ago. Close and re-open this PR to get it retested. label Jul 1, 2023
@ansibot ansibot removed the needs_rebase https://docs.ansible.com/ansible/devel/dev_guide/developing_rebasing.html label Jul 12, 2023
@ansibot
Copy link
Contributor

ansibot commented Jul 12, 2023

The test ansible-test sanity --test package-data [explain] failed with 12 errors:

lib/ansible_test/_internal/commands/sanity/bin_symlinks.py:0:0: File not installed
lib/ansible_test/_internal/commands/sanity/integration_aliases.py:0:0: File not installed
test/lib/ansible_test/_internal/commands/sanity/bin_symlinks.py:0:0: File was not added to sdist
test/lib/ansible_test/_internal/commands/sanity/integration_aliases.py:0:0: File was not added to sdist
test/sanity/code-smell/botmeta.json:0:0: File was not added to sdist
test/sanity/code-smell/botmeta.py:0:0: File was not added to sdist
test/sanity/code-smell/botmeta.requirements.in:0:0: File was not added to sdist
test/sanity/code-smell/botmeta.requirements.txt:0:0: File was not added to sdist
test/sanity/code-smell/release-names.json:0:0: File was not added to sdist
test/sanity/code-smell/release-names.py:0:0: File was not added to sdist
test/sanity/code-smell/release-names.requirements.in:0:0: File was not added to sdist
test/sanity/code-smell/release-names.requirements.txt:0:0: File was not added to sdist

click here for bot help

@mkrizek mkrizek removed the merge_commit This PR contains at least one merge commit. Please resolve! label Nov 3, 2023
@ansibot ansibot added the needs_rebase https://docs.ansible.com/ansible/devel/dev_guide/developing_rebasing.html label Feb 20, 2024
@ansibot ansibot added the stale_pr This PR has not been pushed to for more than one year. label Jan 28, 2025
@mattclay
Copy link
Member

mattclay commented Jun 4, 2025

Closing, per previous comments.

@mattclay mattclay closed this Jun 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
affects_2.16 feature This issue/PR relates to a feature request. needs_rebase https://docs.ansible.com/ansible/devel/dev_guide/developing_rebasing.html needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR. stale_ci This PR has been tested by CI more than one week ago. Close and re-open this PR to get it retested. stale_pr This PR has not been pushed to for more than one year. WIP This issue/PR is a work in progress. Nevertheless it was shared for getting input from peers.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants