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

Change source path to the actual role folder #358

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

hhenkel
Copy link

@hhenkel hhenkel commented Oct 9, 2024

Prevent issues when checking out multiple remote roles.

This resolves #357 for me

@@ -409,7 +409,7 @@ def role_to_collection(
"--role",
rolename,
"--src-path",
args.src_path,
os.path.join(args.src_path, rolename),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

src_path can be either the parent directory of the role, or the role directory. Forcing it to be only the role directory will break some of our use cases.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@richm Okay - so what be an acceptable solution then? The only other thing that currently comes to my mind is, to checkout remote roles to individual tmp folders. As you can see in the provided error log in the issue #357 you code currently picks up the wrong folder on the second cloned repository.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@hhenkel What repo(s) are release_collection.py checking out from github? What does your collection_release.yml look like?

Copy link
Author

@hhenkel hhenkel Oct 10, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks like this, it is a enterprise github:

usergroups:
  org: Github-My_corp-CHE
  repo: cioapir-my_corp.ansible-role-usergroups
  ref: 0.0.0
  sourcenum: 1
users:
  org: Github-My_corp-CHE
  repo: cioapir-my_corp.ansible-role-users
  ref: 0.0.0
  sourcenum: 2
sudo:
  org: Github-My_corp-CHE
  repo: cioapir-my_corp.ansible-role-sudo
  ref: 0.0.0
  sourcenum: 3

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.

release_collection.py does not support multiple remote repos
2 participants