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
Fix role name handling in prerun.py #1490
Commits on Mar 23, 2021
-
src/ansiblelint/prerun.py: Fix role name from SCM
According to https://galaxy.ansible.com/docs/contributing/creating_role.html#role-metadata: "role_name is not used at all if the role is installed using its Git URL. Instead, the name of the repo is used." So, make _install_galaxy_role() respect this to compute the role name. To avoid importing ansible galaxy files, the SCM list is hardcoded to git or hg. Signed-off-by: Arnaud Patard <apatard@hupstream.com>
Configuration menu - View commit details
-
Copy full SHA for 9f0c1d5 - Browse repository at this point
Copy the full SHA 9f0c1d5View commit details -
src/ansiblelint/prerun.py: Use computed fqrn in _install_galaxy_role()
_install_galaxy_role() is taking great pain to get and check the fqrn, even handling/using the shortname when the 'role-name' check is in skip_list but the code is not using the fqrn value to create the symlink in .cache/roles. Correct this by using the computed fqrn name for the link name. Signed-off-by: Arnaud Patard <apatard@hupstream.com>
Configuration menu - View commit details
-
Copy full SHA for fb390ab - Browse repository at this point
Copy the full SHA fb390abView commit details
Commits on Mar 24, 2021
-
playbooks/eco.yml: Change geerlingguy.mysql checkout path
Change the ansible-role-mysql git clone path to match the role fqrn as it's what's used with galaxy and what's currently done by the role ci. (ref: https://github.com/geerlingguy/ansible-role-mysql/blob/86ffba892e1553b7e6f042ec007eef25daa8f5db/.github/workflows/ci.yml#L21) Signed-off-by: Arnaud Patard <apatard@hupstream.com>
Configuration menu - View commit details
-
Copy full SHA for 67b94ad - Browse repository at this point
Copy the full SHA 67b94adView commit details
Commits on Mar 25, 2021
-
Configuration menu - View commit details
-
Copy full SHA for 32ebbd4 - Browse repository at this point
Copy the full SHA 32ebbd4View commit details -
Configuration menu - View commit details
-
Copy full SHA for cf9d993 - Browse repository at this point
Copy the full SHA cf9d993View commit details
Commits on Mar 30, 2021
-
src/ansiblelint/prerun.py: Try to handle author name in metadata author
If the author field in meta/main.yml looks like "John Doe" (at least 2 words separated by a space), act as if there was no namespace. It's not perfect but it's not possible to match author<->galaxy account and there will still be a warning/error issued about it, since the fqrn won't match namespace.role_name. Signed-off-by: Arnaud Patard <apatard@hupstream.com>
Configuration menu - View commit details
-
Copy full SHA for 46c8cdf - Browse repository at this point
Copy the full SHA 46c8cdfView commit details -
src/ansiblelint/prerun.py: Fix role regexp used to strip prefixes
According to : https://galaxy.ansible.com/docs/contributing/creating_role.html#role-metadata: In the past, Galaxy would apply a regex expression to the GitHub repository name and automatically remove 'ansible-' and 'ansible-role-'. For example, if your repository name was 'ansible-role-apache', the role name would translate to 'apache', So update the regexp to handle ansible-role- and ansible- Signed-off-by: Arnaud Patard <apatard@hupstream.com>
Configuration menu - View commit details
-
Copy full SHA for 91b3981 - Browse repository at this point
Copy the full SHA 91b3981View commit details -
src/ansiblelint/prerun.py: Fix link name when 'role-name' in skip_list
If the role-name rule is in skip_list: - if role_name is set in meta/main.yml, assume that the author wants to use this name, even if it's still not up to standards and set the link name to the computed fqrn, - if the role_name is not set, just use the current directory name. Note: don't use 'role_name' variable here since some part of the name has been stripped from the current directory name. Signed-off-by: Arnaud Patard <apatard@hupstream.com>
Configuration menu - View commit details
-
Copy full SHA for 407393e - Browse repository at this point
Copy the full SHA 407393eView commit details -
src/ansiblelint/prerun.py: split _install_galaxy_role
Flake8 is complaining that the function is now too complex, so split it into several ones. Signed-off-by: Arnaud Patard <apatard@hupstream.com>
Configuration menu - View commit details
-
Copy full SHA for 1635649 - Browse repository at this point
Copy the full SHA 1635649View commit details -
src/ansiblelint/prerun.py: Make _get_galaxy_role_* return empty string
Instead of using None for value not found and sometime return an empty string make both functions always return a string and make it empty is something went wrong. Signed-off-by: Arnaud Patard <apatard@hupstream.com>
Configuration menu - View commit details
-
Copy full SHA for 5dad14a - Browse repository at this point
Copy the full SHA 5dad14aView commit details -
src/ansiblelint/prerun.py: Revert "Fix role name from SCM"
As it may lead to breakages, drop the check on .git or .hg presence to get role name. Signed-off-by: Arnaud Patard <apatard@hupstream.com>
Configuration menu - View commit details
-
Copy full SHA for 8a8624d - Browse repository at this point
Copy the full SHA 8a8624dView commit details
Commits on Apr 1, 2021
-
Configuration menu - View commit details
-
Copy full SHA for 7daa4b3 - Browse repository at this point
Copy the full SHA 7daa4b3View commit details
Commits on Apr 7, 2021
-
Configuration menu - View commit details
-
Copy full SHA for dd57f2e - Browse repository at this point
Copy the full SHA dd57f2eView commit details