-
Notifications
You must be signed in to change notification settings - Fork 114
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
[kustomize_deploy] Include symlinks when user kustomize dir is set #2546
[kustomize_deploy] Include symlinks when user kustomize dir is set #2546
Conversation
Thanks for the PR! ❤️ |
Build failed (check pipeline). Post https://softwarefactory-project.io/zuul/t/rdoproject.org/buildset/0b6480babdf1415894b1ce5747a88e7d ✔️ openstack-k8s-operators-content-provider SUCCESS in 1h 38m 43s |
- name: Fetch the content of the kustomize patches | ||
ansible.builtin.slurp: | ||
path: "{{ item.path }}" | ||
register: _cifmw_kustomize_deploy_yaml_patches_slurp | ||
loop: "{{ _cifmw_kustomize_deploy_yaml_patches_find.files | default([]) }}" | ||
loop: "{{ _cifmw_kustomize_deploy_yaml_patches_find | default([]) }}" |
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.
I think you can get rid of the new task, the one before this one and make this one like this:
- name: Fetch the content of the kustomize patches
ansible.builtin.debug:
msg: "{{ item.path }}"
register: _cifmw_kustomize_deploy_yaml_patches_slurp
loop: >-
{{
_kustomize_deploy_yaml_files.results |
map(attribute='files') | flatten
}}
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.
I just tested it and it looks much better. Thanks, @pablintino
With this patch, not only regular files but also symlinks are taken into account.
58a389e
to
d8995d3
Compare
/approve |
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.
/approve
The default file_type for ansible.builtin.find is 'file'
This patch loops over both file and link file types, the loop returns two .results, each containing a filles
list.
Fetch the content of the kustomize patches
task guards against there being no files or links returned by looping over the returned files list and defaulting to an empty list.
It then filters the results pulling out the files attribute returns a flat list of files found.
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: lewisdenny, pablintino The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
/lgtm |
f31aef1
into
openstack-k8s-operators:main
/cherry-pick 18.0-fr1 |
@eduolivares: new pull request created: #2552 In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
With this patch, not only regular files but also symlinks are taken into account.