Drone automatically clones your repository before executing your pipeline steps. No special configuration is required. In some cases, however, you may need to customize, override or disable the default clone behavior.
The --depth flag
The default clone configuration does use the --depth flag. You can enforce a clone depth by declaring a clone block and adding the depth attribute:
|
|
The --tags flag
The default clone configuration does not use the --tags flag. If you would like to fetch tags you should handle this as a step in your pipeline. For example:
|
|
The --recursive flag
The default clone behavior does not use the --recursive flag and does not fetch submodules. If you would like to fetch submodules you should handle this as a step in your pipeline. For example:
|
|
Custom Logic
The default clone behavior can be disabled and custom clone logic implemented, when necessary. In the following example we implement custom clone commands as a pipeline step:
|
|