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: 'BacklogPullRequestSCMSource'
remote : String
credentialsId : String
includes : String
excludes : String
ignoreOnPushNotifications : boolean
url : String
apiKey : String
API key when using Backlog API version 2.
id : String
(optional)
browser
(optional)
assembla
repoUrl : String
$class: 'BacklogGitRepositoryBrowser'
repoName : String
repoUrl : String
bitbucketServer
repoUrl : String
bitbucket
repoUrl : String
cgit
repoUrl : String
fisheye
repoUrl : String
gitblit
repoUrl : String
projectName : String
$class: 'GitBucketBrowser'
url : String
gitLab
repoUrl : String
version : String
(optional)
gitLabBrowser
https://gitLab.example.com
then the URL for bob's skunkworks project might be https://gitLab.example.com/bob/skunkworks
.
projectUrl : String
https://gitLab.example.com
then the URL for bob's skunkworks project might be https://gitLab.example.com/bob/skunkworks
gitList
repoUrl : String
gitWeb
repoUrl : String
$class: 'GiteaBrowser'
repoUrl : String
https://gitea.example.com
then the URL for bob's skunkworks project repository might be https://gitea.example.com/bob/skunkworks
github
repoUrl : String
gitiles
repoUrl : String
$class: 'GitoriousWeb'
repoUrl : String
gogs
repoUrl : String
kiln
repoUrl : String
phabricator
repoUrl : String
repo : String
redmine
repoUrl : String
rhodeCode
repoUrl : String
$class: 'ScmManagerGitRepositoryBrowser'
repoUrl : String
$class: 'Stash'
repoUrl : String
teamFoundation
repoUrl : String
If TFS is also used as the repository server, this can usually be left blank.
$class: 'TracGitRepositoryBrowser'
$class: 'TuleapBrowser'
repositoryUrl : String
viewgit
repoUrl : String
projectName : String
extensions
(optional)
authorInChangelog
$class: 'BuildChooserSetting'
This extension point in Jenkins is used by many other plugins to control the job to build specific commits. When you activate those plugins, you may see them installing a custom strategy here.
buildChooser
$class: 'AlternativeBuildChooser'
$class: 'AncestryBuildChooser'
maximumAgeInDays : int
ancestorCommitSha1 : String
$class: 'DefaultBuildChooser'
$class: 'DeflakeGitBuildChooser'
$class: 'GerritTriggerBuildChooser'
$class: 'InverseBuildChooser'
buildSingleRevisionOnly
changelogToBranch
options
compareRemote : String
origin
, that contains the branch you specify below.
compareTarget : String
checkoutOption
timeout : int
cleanBeforeCheckout
.gitignore
. It also resets all tracked files to their versioned state. This ensures that the workspace is in the same state as if you cloned and checked out in a brand-new empty directory, and ensures that your build is not affected by the files generated by the previous build.
deleteUntrackedNestedRepositories : boolean
(optional)
.git
directories.
cleanAfterCheckout
.gitignore
. It also resets all tracked files to their versioned state. This ensures that the workspace is in the same state as if you cloned and checked out in a brand-new empty directory, and ensures that your build is not affected by the files generated by the previous build.
deleteUntrackedNestedRepositories : boolean
(optional)
.git
directories.
cloneOption
shallow : boolean
noTags : boolean
reference : String
timeout : int
depth : int
(optional)
honorRefspec : boolean
(optional)
$class: 'CodeCommitURLHelper'
credentialId : String
OPTIONAL: Select the credentials to use.
If not specified, defaults to the DefaultAWSCredentialsProviderChain behaviour - *FROM THE JENKINS INSTANCE*
In the latter case, usage of IAM Role Profiles seems not to work, thus relying on environment variables / system properties or the ~/.aws/credentials file, thus not recommended.
repositoryName : String
$class: 'DisableRemotePoll'
$class: 'ExcludeFromChangeSet'
$class: 'ExcludeFromPoll'
lfs
$class: 'GitSCMChecksExtension'
verboseConsoleLog : boolean
(optional)
$class: 'GitSCMStatusChecksExtension'
name : String
(optional)
skip : boolean
(optional)
skipProgressUpdates : boolean
(optional)
suppressLogs : boolean
(optional)
unstableBuildNeutral : boolean
(optional)
$class: 'GitTagMessageExtension'
useMostRecentTag : boolean
(optional)
$class: 'IgnoreNotifyCommit'
localBranch
If selected, and its value is an empty string or "**", then the branch name is computed from the remote branch without the origin. In that case, a remote branch origin/master will be checked out to a local branch named master, and a remote branch origin/develop/new-feature will be checked out to a local branch named develop/newfeature.
Please note that this has not been tested with submodules.
localBranch : String
$class: 'MessageExclusion'
excludedMessage : String
.*\[maven-release-plugin\].*The example above illustrates that if only revisions with "[maven-release-plugin]" message in first comment line have been committed to the SCM a build will not occur. You can create more complex patterns using embedded flag expressions.
(?s).*FOO.*This example will search FOO message in all comment lines.
$class: 'PathRestriction'
includedRegions : String
myapp/src/main/web/.*\.html myapp/src/main/web/.*\.jpeg myapp/src/main/web/.*\.gifThe example above illustrates that a build will only occur, if html/jpeg/gif files have been committed to the SCM. Exclusions take precedence over inclusions, if there is an overlap between included and excluded regions.
excludedRegions : String
myapp/src/main/web/.*\.html myapp/src/main/web/.*\.jpeg myapp/src/main/web/.*\.gifThe example above illustrates that if only html/jpeg/gif files have been committed to the SCM a build will not occur.
perBuildTag
$class: 'PreBuildMerge'
options
mergeTarget : String
master
.
fastForwardMode
(optional)
FF
, FF_ONLY
, NO_FF
mergeRemote : String
(optional)
origin
, that contains the branch you specify below. If left blank, it'll default to the name of the first repository configured above.
mergeStrategy
(optional)
DEFAULT
, RESOLVE
, RECURSIVE
, OCTOPUS
, OURS
, SUBTREE
, RECURSIVE_THEIRS
pretestedIntegration
gitIntegrationStrategy
accumulated
shortCommitMessage : boolean
(optional)
ffonly
shortCommitMessage : boolean
(optional)
squash
integrationBranch : String
The branch name must match your integration branch name. No trailing slash.
git checkout -B <Branch name> <Repository name>/<Branch name> git merge --squash <Branch matched by git> git commit -C <Branch matched by git>
git checkout -B <Branch name> <Repository name>/<Branch name> git merge -m <commitMsg> <Branch matched by git> --no-ff
Changes are only ever pushed when the build results is SUCCESS
git push <Repository name> <Branch name>
repoName : String
The repository name. In git the repository is always the name of the remote. So if you have specified a repository name in your Git configuration. You need to specify the exact same name here, otherwise no integration will be performed. We do the merge based on this.
No trailing slash on repository name.
Remember to specify this when working with NAMED repositories in Git
pruneStaleBranch
pruneTags
pruneTags : boolean
$class: 'RelativeTargetDirectory'
relativeTargetDir : String
This extension should not be used in Jenkins Pipeline (either declarative or scripted). Jenkins Pipeline already provides standard techniques for checkout to a subdirectory. Use ws and dir in Jenkins Pipeline rather than this extension.
$class: 'ScmName'
Unique name for this SCM. Needed when using Git within the Multi SCM plugin.
name : String
$class: 'SparseCheckoutPaths'
Specify the paths that you'd like to sparse checkout. This may be used for saving space (Think about a reference repository). Be sure to use a recent version of Git, at least above 1.7.10
sparseCheckoutPaths
path : String
submodule
depth : int
(optional)
disableSubmodules : boolean
(optional)
parentCredentials : boolean
(optional)
recursiveSubmodules : boolean
(optional)
reference : String
(optional)
git init --bare git remote add SubProject1 https://gitrepo.com/subproject1 git remote add SubProject2 https://gitrepo.com/subproject2 git fetch --all
shallow : boolean
(optional)
threads : int
(optional)
timeout : int
(optional)
trackingSubmodules : boolean
(optional)
$class: 'UserExclusion'
excludedUsers : String
auto_build_userThe example above illustrates that if only revisions by "auto_build_user" have been committed to the SCM a build will not occur.
$class: 'UserIdentity'
name : String
If given, "GIT_COMMITTER_NAME=[this]" and "GIT_AUTHOR_NAME=[this]" are set for builds. This overrides whatever is in the global settings.
email : String
If given, "GIT_COMMITTER_EMAIL=[this]" and "GIT_AUTHOR_EMAIL=[this]" are set for builds. This overrides whatever is in the global settings.
$class: 'WipeWorkspace'
gitTool : String
(optional)
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.