- 
                Notifications
    
You must be signed in to change notification settings  - Fork 23
 
ci: run ansible-lint after converting the role to a collection #309
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
ci: run ansible-lint after converting the role to a collection #309
Conversation
          
Reviewer's guide (collapsed on small PRs)Reviewer's GuideThis PR updates the GitLab CI pipeline to convert the Ansible role into a collection before running ansible-lint and ansible-test, aligning it with GitHub CI and recommended usage of ansible-lint. Flow diagram for ansible-lint job after role conversionflowchart TD
    Start([Start ansible_lint job])
    InstallDeps[Install collection dependencies]
    ConvertRole[Convert role to collection]
    CopyConfig[Copy .ansible-lint config]
    RunLint[Run ansible-lint]
    Start --> InstallDeps --> ConvertRole --> CopyConfig --> RunLint
    File-Level Changes
 Tips and commandsInteracting with Sourcery
 Customizing Your ExperienceAccess your dashboard to: 
 Getting Help
  | 
    
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey there - I've reviewed your changes - here's some feedback:
- Remove the debug 
pwdcall in the convert_role_to_collection step to avoid cluttering CI logs. - Rather than skipping 'yaml[line-length]' on the command line, consider adding that rule to the .ansible-lint config so the ignore is more explicit and maintainable.
 
Prompt for AI Agents
Please address the comments from this code review:
## Overall Comments
- Remove the debug `pwd` call in the convert_role_to_collection step to avoid cluttering CI logs.
- Rather than skipping 'yaml[line-length]' on the command line, consider adding that rule to the .ansible-lint config so the ignore is more explicit and maintainable.Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
          Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@            Coverage Diff             @@
##             main     #309      +/-   ##
==========================================
+ Coverage   82.88%   88.32%   +5.44%     
==========================================
  Files           6       11       +5     
  Lines         479      891     +412     
==========================================
+ Hits          397      787     +390     
- Misses         82      104      +22     ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
  | 
    
Fix gitlab CI to run
ansible-lintafter converting the role to a collection. This makes it consistent with github CI and it is a recommended way of usingansible-lintanyway.Summary by Sourcery
Update GitLab CI to run ansible-lint and ansible-test on the role after converting it to a collection, aligning with GitHub CI and recommended practices
Enhancements: