ce2bea51d4
This change is preparation for https://review.opendev.org/c/zuul/zuul-jobs/+/887917 In the beginning, there was only prepare-workspace[0] which rsynced repos. Then we added mirror-workspace-git[1] to make it more efficient by using git operation, but it required some openstack-specific code in project-config to work. Then we added prepare-workspace-git[2] which completed the git-based sync solution by locating everything requried in zuul-jobs. It used mirror-workspace-git by reference and added this TODO: # TODO(tobiash): we might want to deprecate the role mirror-workspace-git-repos # and move it here. This change completes that TODO by moving the mirror-workspace-git-repos code into prepare-workspace-git and places the repo in a sensible and maintainable state with two simple and good options: * prepare-workspace (rsync) * prepare-workspace-git (git) In the unlikely event anyone is still using mirror-workspace-git-repos standalone (OpenStack/OpenDev is not, and that solution was haphazard as described above) they would be well served by a notification that there is a better alternative which is what most of the community actually uses now. [0]cfffd4431b
[1]348598e96a
[2]7cee7156bc
Change-Id: Ib80e0447d49363182fd0d4c4d4e269841bc3aa95
29 lines
850 B
ReStructuredText
29 lines
850 B
ReStructuredText
Mirror the local git repos to remote nodes
|
|
|
|
This role uses git operations (unlike :zuul:role:`prepare-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**
|
|
|
|
.. zuul:rolevar:: cached_repos_root
|
|
:default: /opt/git
|
|
|
|
The root of the cached repos.
|
|
|
|
.. zuul:rolevar:: mirror_workspace_quiet
|
|
:default: false
|
|
|
|
If `true` git operations will be silenced and won't print every
|
|
changed reference.
|
|
|
|
.. zuul:rolevar:: zuul_workspace_root
|
|
:default: "{{ ansible_user_dir }}"
|
|
|
|
The root of the workspace in which the repos are mirrored.
|