Clone repository
Overview of the Clone repository job step, which clones the repository during Job execution.

From the job step settings (Figure 1), you can customize information about the job step, including:
- A custom step name can be defined; otherwise, the default step name will be used
- Select one of the Repositories that will be cloned during
execution of the Job. Repository value can be set to None. If a repository is
chosen, additional cloning options will become available. Note: Please note that a problem may occur with long paths, when trying to clone a repository on Windows machine. If that happens consult Git clone troubleshooting guide page for more information.
Figure 2. Clone repository job step when a repository is selected - You can define the branch that will be cloned during Execution of the Job. Pro tip: The branch can be a Job parameter. An example is available here.
- Clone options for additional clone repository configuration:
- You can define the depth you wish to use for cloning (i.e. Depth limits the size of cloning to last n commits).
- You can define destination where the repository should be cloned as a relative directory path within the Agent's working directory. If left blank, the repository will be cloned within the Agent's working directory
- When the repository is first cloned for any Agent, Officer keeps a copy of the
repository in cache. When a new Job is started, it will Pull the repository
from cache whenever possible instead of cloning the repository from the
beginning. If Clear cache field is marked, all the repository data
will be deleted before this job step, forcing the entire repository to be
cloned. Note: Using the Clear cache field may lead to execution performance degradation.
- Every step has Advanced options through which steps can be managed.
When execution of the step fails, execution of the job continues. If option Abort job on step fail is marked,
Job execution will stop once this step fails and further steps will not be executed.
When it comes to skip condition, it allows skipping the current step if the condition is met.
Figure 3. Clone repository job step with advanced options shown
Note: In order to save a form, all input fields must be valid. Required fields are signed
with *.