This patch fixes an issue where only tests/tests.yml was checked for embeded STI tests.
This also removes the useless usage of ansible_user_dir.
Build succeeded.
The * is expanded by shell, so using find gives no added benefit. The same result is returned with ls or stat.
*
find
ls
stat
Should this check the exit code rather than output?
Either way, the code looks like it'll work, but I don't know how to verify.
We are in a Zuul config repository so unfortunately this cannot be tested speculatively with "Depends-on". I did a test locally by running the play with ansible-playbook and an inventory file to set zuul.project.src_dir var and replacing the zuul_return module with debug module. This shows that it seems to behave as expected.
So IMO, let's merge and see if we get any trouble. Is that fine for you ?
Just saw you inline comment. Ok, wait I'll see to address them.
1 new commit added
Remove useless use of find and rely on return code
Looks correct. Not sure what failed_when does.
https://docs.ansible.com/ansible/latest/user_guide/playbooks_error_handling.html#ignoring-failed-commands
Here we do not want the Task to be considered a failure as the normal behavior of Ansible will be to stop the play execution.
I'm merging this. I keep the related issue open until we are confident that the fix behave as expected.
Metadata Update from @fbo: - Pull-request tagged with: gateit
Build succeeded (gate pipeline).
Pull-Request has been merged by zuul
This patch fixes an issue where only tests/tests.yml was checked
for embeded STI tests.
This also removes the useless usage of ansible_user_dir.