zuul-jobs/roles/prepare-workspace-git/tasks
Clark Boylan 4f02e92e70 Reduce the number of loops in prepare-workspace-git
Our prepare-workspace-git role was trying to express a few related steps
as ansible tasks. The problem is that each one of these steps had to
iterate through the entire project list incurring the ansible startup
time for each task of each loop iteration. We can speed things up a bit
if we use a single loop and a slightly more complicated shell task that
checks if things like directories exist before cloning/initing git
repos.

Note this is still slower than if we removed the Ansible task loop
entirely and move this logic into an ansible module that can run a loop
internally. However, making a change like that is significantly more
involved as we'd likely end up exec'ing git with python and need to
manage logging, errors, and so on. The shell module already handles that
for us in a nice way.

Change-Id: Ic87eb182cc4ca4bd0acdd1aa46c2d72dc1165e90
2022-09-22 11:09:05 -07:00
..
main.yaml Reduce the number of loops in prepare-workspace-git 2022-09-22 11:09:05 -07:00