f1714ea75b
This updates test-prepare-workspace-git to use a new Ansible module for its work. This module supports each of the three main tasks with a single Python invocation for all projects, rather than using Ansible to loop over them. Within the python invocation, a ThreadPoolExecutor with 10 workers is used to execute the setup processes with increased parallelism. This should greatly improve the workspace sync speed for jobs with large numbers of repos. A simple local test with the 16 Zuul project repos reduces the workspace-prep time to less than 50% of the current time. This removes the mirror_workspace_quiet role variable, since detailed information about the repo state can now be found in the repo state JSON file. Otherwise, the actual git commands used to prepare the repos should be identical. Change-Id: Ib4b6bb379fe656ac9109b8e6073eff8c28c7eaee
34 lines
1.0 KiB
ReStructuredText
34 lines
1.0 KiB
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:: prepare_workspace_sync_required_projects_only
|
|
:type: bool
|
|
:default: False
|
|
|
|
A flag which if set to true, filters the to be synchronized project
|
|
list to only use projects which are required by the job.
|
|
|
|
.. zuul:rolevar:: mirror_workspace_quiet
|
|
|
|
This value is ignored; it should be removed from job configuration.
|
|
|
|
.. zuul:rolevar:: zuul_workspace_root
|
|
:default: "{{ ansible_user_dir }}"
|
|
|
|
The root of the workspace in which the repos are mirrored.
|