4f02e92e70
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 |
||
---|---|---|
.. | ||
defaults | ||
tasks | ||
README.rst |
Mirror the local git repos to remote nodes
This role uses git operations (unlike :zuulprepare-workspace
which uses
rsync) to mirror the locally prepared git repos to the remote nodes
while taking advantage of cached repos on the node if they exist. This
role works generically regardless of the existence of a cached repo on
the node.
The cached repos need to be placed using the canonical name under the cached_repos_root directory.
Role Variables