The following plugin provides functionality available through Pipeline-compatible steps. Read more about how to integrate steps into your Pipeline in the Steps section of the Pipeline Syntax page.
For a list of other such plugins, see the Pipeline Steps Reference page.
$class: 'hudson.plugins.repo.RepoScm'
The repo plugin provides Repo as an SCM tools in Jenkins.
The repo plugin provides an SCM implementation to be used with the Pipeline SCM checkout
step. The Pipeline Syntax Snippet Generator guides the user to select repo plugin checkout options and provides online help for each of the options.
manifestRepositoryUrl : String
The URL of the manifest. This is passed to repo as repo init -u url
.
cleanFirst : boolean
(optional)
When this is checked the first thing to do will be a
repo forall -c "git clean -fdx"
currentBranch : boolean
(optional)
Fetch only the current branch from server. Increases the speed of the repo sync operation. This is passed to repo as repo init --current-branch
and repo sync -c
.
depth : int
(optional)
Specify the depth in history to sync from the source. The default is to sync all of the history. Use 1 to just sync the most recent commit. This is passed to repo as repo init --depth=n
.
destinationDir : String
(optional)
The sub-directory of the workspace where the source should be synced. The default is the root of the workspace.
extraEnvVars
(optional)
java.util.Map<java.lang.String, java.lang.String>
fetchSubmodules : boolean
(optional)
Fetch submodules for from server. This is passed to repo as repo sync --fetch-submodules
.
forceSync : boolean
(optional)
Overwrite an existing git directory if it needs to point to a different object directory. WARNING: this may cause loss of data. This is passed to repo as repo sync --force-sync
.
ignoreProjects : String
(optional)
jobs : int
(optional)
Specify the number of projects to fetch simultaneously. The default is 1. This is passed to repo as repo sync --jobs=n
.
localManifest : String
(optional)
The contents of .repo/local_manifests/local.xml
. This is written prior to calling sync. The default is to not use a local.xml
file.
The contents may be given here literally, as XML; see the example below. Such literal content must start with the string <?xml
. Alternatively, the content may be given as an URL, in which case the file pointed by the URL is used. If the content does not start with the <?xml
prefix, it is assumed to be an URL.
An example
<?xml version="1.0" encoding="UTF-8"?> <manifest> <project path="external/project" name="org/project" remote="github" revision="master" /> </manifest>
manifestBranch : String
(optional)
The branch of the manifest to use. This is passed to repo as repo init -b branchname
. Repo will default to master if a branch name isn't provided.
manifestFile : String
(optional)
The initial manifest file to use while initializing the repo. This is passed to repo as repo init -m manifestFile
. If a manifest file is not specified, repo uses the default of "default.xml".
manifestGroup : String
(optional)
Restricts manifest projects to ones tagged with provided group name. This is passed to repo as repo init -g groupName
. If a group name is not provided, the -g
option is not passed to repo and it will default to fetching projects that are tagged with 'default'.
manifestPlatform : String
(optional)
Restrict manifest projects to ones with a specified platform group [auto|all|none|linux|darwin|...]
This is passed to repo as repo init -P platformName
. If a platform is not provided, the -p
option is not passed to repo and it will default to auto
and ony fetch projects which needed for current system.
manifestSubmodules : boolean
(optional)
Sync any submodules associated with the manifest repo. This is passed to repo as repo init --submodules
.
mirrorDir : String
(optional)
The location of the mirror directory to reference when initialising the repository. This is passed to repo as repo sync --reference=DIR
. This speeds up fetching code and isn't used by default.
noCloneBundle : boolean
(optional)
When this is checked --no-clone-bundle
is used when running the repo init
and repo sync
commands.
noTags : boolean
(optional)
Don't fetch tags. This is passed to repo as repo init --no-tags
and repo sync --no-tags
.
quiet : boolean
(optional)
Make repo more quiet. This is passed to repo as repo sync -q
.
repoBranch : String
(optional)
Use a specific branch for pulling repo itself. By default this is empty, and repo will be using its default branch (i.e. stable)
repoUrl : String
(optional)
Pull repo itself from this git repository. By default this is empty, and repo will be pulled from its default git url (i.e. googles)
resetFirst : boolean
(optional)
When this is checked the first thing to do will be a
repo forall -c "git reset --hard"
showAllChanges : boolean
(optional)
When this is checked --first-parent
is no longer passed to git log
when determining changesets.
trace : boolean
(optional)
Trace git command execution. This is passed to repo as repo --trace <subcommand>
.
worktree : boolean
(optional)
Use `git worktree` for checkouts (At least, Git version 2.15 is required to avoid dangerous gc bugs). Usefull under Windows because it no longer require symlinks at all.
Please submit your feedback about this page through this quick form.
Alternatively, if you don't wish to complete the quick form, you can simply indicate if you found this page helpful?
See existing feedback here.