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.
library: Load a shared library on the fly Load a library dynamically rather than using @Library syntax. You may use global variables defined in the library thereafter:
library 'mylib@master'
usefulFunction()
You may also load classes defined in the library by selecting their fully-qualified names like properties on the return value of this step, then call static methods or call constructors as if they were a method named new:
def utils = library('mylib').com.mycorp.jenkins.Utils.new(this)
utils.handyStuff()
identifier
@. You may instead define a library inline here.
Stringchangelog (optional)
booleanretriever (optional)
httphttphttpURL
StringcredentialsId
StringpreemptiveAuth
booleannexusnexusartifactDetails
StringmavenHome
StringlegacySCMlegacySCMscm
$class: 'AWSCodePipelineSCM'$class: 'AWSCodePipelineSCM'name
StringclearWorkspace
booleanregion
StringawsAccessKey
In order to integrate with AWS CodePipeline, you must authorize access to the pipeline and its related artifacts. If you installed Jenkins on a supported Amazon EC2 instance type, such as Amazon Linux, you can install the AWS CLI and configure a profile with the required credentials. This is the preferred method. In all other cases, you can store AWS credentials in these fields. You should securely configure your Jenkins instance to use HTTPS so that these credentials are not sent unencrypted. For more information, see AWS CodePipeline Integration for Other Products and Services.
StringawsSecretKey
>In order to integrate with AWS CodePipeline, you must authorize access to the pipeline and its related artifacts. If you installed Jenkins on a supported Amazon EC2 instance type, such as Amazon Linux, you can install the AWS CLI and configure a profile with the required credentials. This is the preferred method. In all other cases, you can store AWS credentials in these fields. You should securely configure your Jenkins instance to use HTTPS so that these credentials are not sent unencrypted. For more information, see AWS CodePipeline Integration for Other Products and Services.
StringproxyHost
You might need a proxy host address if you are hosting Jenkins on a private network. The proxy name can be an IP address or DNS address. The AWS CodePipeline Plugin for Jenkins requires internet access. If access is not configured, you might see errors in the AWS CodePipeline Polling Log.
StringproxyPort
You might need a proxy port for your proxy host address if you are hosting Jenkins on a private network. The proxy port is a number, might be on port 8080, 3128, or 8443, depending on your network protocols and security settings. If access is not configured, you might see errors in the AWS CodePipeline Polling Log.
Stringcategory
This is the category of the action type in AWS CodePipeline, and is usually either Build or Test. To see an example usage, see Install and Configure the AWS CodePipeline Plugin for Jenkins.
Stringprovider
This is the provider name of the action type in AWS CodePipeline. You must provide this exact string when adding an action for Jenkins in AWS CodePipeline. To see an example usage, see Install and Configure the AWS CodePipeline Plugin for Jenkins.
Stringversion
Leave the default as 1.
Stringaccurevaccurevdepot
Stringstream
StringserverName (optional)
StringserverUUID (optional)
StringwspaceORreftree (optional)
StringaccurevTool (optional)
Stringcleanreftree (optional)
booleandirectoryOffset (optional)
StringdontPopContent (optional)
booleanfilterForPollSCM (optional)
StringignoreStreamParent (optional)
booleanreftree (optional)
StringsnapshotNameFormat (optional)
StringsubPath (optional)
StringsubPathOnly (optional)
booleansynctime (optional)
booleanuseSnapshot (optional)
booleanworkspace (optional)
String$class: 'BazaarSCM'$class: 'BazaarSCM'source
Stringcleantree
booleanbrowser
$class: 'Loggerhead'$class: 'Loggerhead'url
String$class: 'OpenGrok'$class: 'OpenGrok'url
StringrootModule
Stringcheckout
boolean$class: 'BitKeeperSCM'$class: 'BitKeeperSCM'parent
StringlocalRepository
StringusePull
booleanquiet
booleanBbSBbSid
Stringbranches
namename
Specify the branches if you'd like to track a specific branch in a repository. If left blank, all branches will be examined for changes and built.
The safest way is to use the refs/heads/<branchName> syntax. This way the expected branch is unambiguous.
If your branch name has a / in it make sure to use the full reference above. When not presented with a full path the plugin will only use the part of the string right of the last slash. Meaning foo/bar will actually match bar.
If you use a wildcard branch specifier, with a slash (e.g. release/), you'll need to specify the origin repository in the branch names to make sure changes are picked up. So e.g. origin/release/
Possible options:
<branchName>refs/heads/<branchName>.master, feature1, ... refs/heads/<branchName>refs/heads/master, refs/heads/feature1/master, ... <remoteRepoName>/<branchName>refs/heads/<branchName>.origin/master remotes/<remoteRepoName>/<branchName>remotes/origin/master refs/remotes/<remoteRepoName>/<branchName>refs/remotes/origin/master <tagName>refs/tags/<tagName> instead.git-2.3.0 refs/tags/<tagName>refs/tags/git-2.3.0 <commitId>5062ac843f2b947733e6a3b105977056821bd352, 5062ac84, ... ${ENV_VARIABLE}${TREEISH}, refs/tags/${TAGNAME}, ... <Wildcards>REPOSITORYNAME/BRANCH. In addition, BRANCH is recognized as a shorthand of */BRANCH, '*' is recognized as a wildcard, and '**' is recognized as wildcard that includes the separator '/'. Therefore, origin/branches* would match origin/branches-foo but not origin/branches/foo, while origin/branches** would match both origin/branches-foo and origin/branches/foo. :<regular expression>:regexp. Regular expression syntax in branches to build will only build those branches whose names match the regular expression.:^(?!(origin/prefix)).*
origin or origin/master or origin/featureorigin/prefix or origin/prefix_123 or origin/prefix-abc:origin/release-\d{8}
origin/release-20150101origin/release-2015010 or origin/release-201501011 or origin/release-20150101-something:^(?!origin/master$|origin/develop$).*
origin/branch1 or origin/branch-2 or origin/master123 or origin/develop-123origin/master or origin/developStringcredentialsId
When running a job, Jenkins requires credentials to authenticate with Bitbucket Server. For example, to checkout the source code for builds. To do this, it needs credentials with access to the projects and repositories you want it to build from.
You can provide Jenkins with credentials here by:
In addition, you can provide Jenkins with SSH credentials below. If you do, Jenkins will use them for clone operations instead of the credentials you select here.
StringsshCredentialsId
If specified, Jenkins will use these credentials to check out the source code for builds. If no SSH credentials are specified, Jenkins will use the basic credentials instead.
To provide Jenkins with SSH credentials, you can:
Stringextensions
$class: 'AuthorInChangelog'$class: 'AuthorInChangelog'$class: 'BuildChooserSetting'$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: 'AlternativeBuildChooser'$class: 'AncestryBuildChooser'$class: 'AncestryBuildChooser'maximumAgeInDays
intancestorCommitSha1
String$class: 'DefaultBuildChooser'$class: 'DefaultBuildChooser'$class: 'DeflakeGitBuildChooser'$class: 'DeflakeGitBuildChooser'$class: 'GerritTriggerBuildChooser'$class: 'GerritTriggerBuildChooser'$class: 'InverseBuildChooser'$class: 'InverseBuildChooser'$class: 'BuildSingleRevisionOnly'$class: 'BuildSingleRevisionOnly'$class: 'ChangelogToBranch'$class: 'ChangelogToBranch'options
compareRemotecompareRemote
origin, that contains the branch you specify below.
StringcompareTargetcompareTarget
String$class: 'CheckoutOption'$class: 'CheckoutOption'timeout
int$class: 'CleanBeforeCheckout'$class: '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 (optional)
.git directories.
boolean$class: 'CleanCheckout'$class: 'CleanCheckout'.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 (optional)
.git directories.
boolean$class: 'CloneOption'$class: 'CloneOption'shallow
booleannoTags
booleanreference
Stringtimeout
intdepth (optional)
inthonorRefspec (optional)
boolean$class: 'CodeCommitURLHelper'$class: 'CodeCommitURLHelper'credentialId
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.
StringrepositoryName
String$class: 'DisableRemotePoll'$class: 'DisableRemotePoll'$class: 'ExcludeFromChangeSet'$class: 'ExcludeFromChangeSet'$class: 'ExcludeFromPoll'$class: 'ExcludeFromPoll'$class: 'GitLFSPull'$class: 'GitLFSPull'$class: 'GitSCMChecksExtension'$class: 'GitSCMChecksExtension'verboseConsoleLog (optional)
boolean$class: 'GitSCMStatusChecksExtension'$class: 'GitSCMStatusChecksExtension'name (optional)
Stringskip (optional)
booleanskipProgressUpdates (optional)
booleansuppressLogs (optional)
booleanunstableBuildNeutral (optional)
boolean$class: 'GitTagMessageExtension'$class: 'GitTagMessageExtension'useMostRecentTag (optional)
boolean$class: 'IgnoreNotifyCommit'$class: 'IgnoreNotifyCommit'$class: 'LocalBranch'$class: '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'$class: 'MessageExclusion'excludedMessage
.*\[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.
String$class: 'PathRestriction'$class: 'PathRestriction'includedRegions
myapp/src/main/web/.*\.html
myapp/src/main/web/.*\.jpeg
myapp/src/main/web/.*\.gif
The 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.
StringexcludedRegions
myapp/src/main/web/.*\.html
myapp/src/main/web/.*\.jpeg
myapp/src/main/web/.*\.gif
The example above illustrates that if only html/jpeg/gif files have been committed to the SCM a build will not occur.
String$class: 'PerBuildTag'$class: 'PerBuildTag'$class: 'PreBuildMerge'$class: 'PreBuildMerge'options
mergeTargetmergeTarget
master.
StringfastForwardModefastForwardMode (optional)
FF, FF_ONLY, NO_FFmergeRemotemergeRemote (optional)
origin, that contains the branch you specify below. If left blank, it'll default to the name of the first repository configured above.
StringmergeStrategymergeStrategy (optional)
DEFAULT, RESOLVE, RECURSIVE, OCTOPUS, OURS, SUBTREE, RECURSIVE_THEIRSpretestedIntegrationpretestedIntegrationgitIntegrationStrategy
accumulatedaccumulatedsquashsquashintegrationBranch
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>
StringrepoName
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
String$class: 'PruneStaleBranch'$class: 'PruneStaleBranch'pruneTagspruneTagspruneTags
boolean$class: 'RelativeTargetDirectory'$class: 'RelativeTargetDirectory'relativeTargetDir
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.
String$class: 'ScmName'$class: 'ScmName'Unique name for this SCM. Needed when using Git within the Multi SCM plugin.
name
String$class: 'SparseCheckoutPaths'$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
pathpath
String$class: 'SubmoduleOption'$class: 'SubmoduleOption'disableSubmodules
booleanrecursiveSubmodules
booleantrackingSubmodules
booleanreference
git init --bare git remote add SubProject1 https://gitrepo.com/subproject1 git remote add SubProject2 https://gitrepo.com/subproject2 git fetch --all
Stringtimeout
intparentCredentials
booleandepth (optional)
intshallow (optional)
booleanthreads (optional)
int$class: 'UserExclusion'$class: 'UserExclusion'excludedUsers
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.
String$class: 'UserIdentity'$class: 'UserIdentity'name
If given, "GIT_COMMITTER_NAME=[this]" and "GIT_AUTHOR_NAME=[this]" are set for builds. This overrides whatever is in the global settings.
Stringemail
If given, "GIT_COMMITTER_EMAIL=[this]" and "GIT_AUTHOR_EMAIL=[this]" are set for builds. This overrides whatever is in the global settings.
String$class: 'WipeWorkspace'$class: 'WipeWorkspace'gitTool
StringprojectName
Enter the name of the Bitbucket Server project containing the repository you want Jenkins to build from. To find a project, start typing. If it doesn't appear in the search results, the credentials that you've chosen may not have read access to it and you'll need to provide different credentials.
To get Jenkins to build from a personal repository, enter a tilde (~) followed by repository owner's username. For example, ~jsmith.
StringrepositoryName
Enter the Bitbucket Server repository you want Jenkins to build from. To find a repository, start typing. If it doesn't appear in the search results, the credentials that you've chosen may not have read access to it and you'll need to provide different credentials.
To get Jenkins to build from a personal repository, enter its slug. This is the URL-friendly version of the repository name. For example, a repository called my example repo will have the slug my-example-repo, and you can see this in its URL, https://bitbucketserver.mycompany.com/myproject/my-example-repo.
StringserverId
Choose the Bitbucket Server instance containing the repository you want Jenkins to build from. If you can't find your instance, check this plugin's configuration and try again.
StringmirrorName
Choose the location that Jenkins should clone from when running this build. This can be the primary server or a mirror if one is available. To see available mirrors, first choose a Bitbucket Server project and repository.
String$class: 'BlameSubversionSCM'$class: 'BlameSubversionSCM'if it is false and the build is not triggered by upstream job,
the plugin will not collect any svn info from upstream job.
else the plugin will collect svn info from latest upstream job
alwaysCollectSVNInfo
boolean$class: 'CCUCMScm'$class: 'CCUCMScm'loadModule
Stringnewest
booleanmode
$class: 'PollChildMode'$class: 'PollChildMode'levelToPoll
Stringcomponent (optional)
StringcreateBaseline (optional)
Check this if you want create a baseline after a completed deliver.
This is only applicable for child and sibling poll mode.
booleannewest (optional)
boolean$class: 'PollRebaseMode'$class: 'PollRebaseMode'levelToPoll
Stringcomponent (optional)
StringcreateBaseline (optional)
booleanexcludeList (optional)
String$class: 'PollSelfMode'$class: 'PollSelfMode'levelToPoll
Stringcomponent (optional)
Stringnewest (optional)
boolean$class: 'PollSiblingMode'$class: 'PollSiblingMode'levelToPoll
Stringcomponent (optional)
StringcreateBaseline (optional)
Check this if you want create a baseline after a completed deliver.
This is only applicable for child and sibling poll mode.
booleannewest (optional)
booleanuseHyperLinkForPolling (optional)
boolean$class: 'PollSubscribeMode'$class: 'PollSubscribeMode'levelToPoll
StringcomponentsToMonitor
componentSelectioncomponentSelection
StringjobsToMonitor
jobnamejobname
Stringignoresignores
StringjobNamejobName (optional)
StringcascadePromotion (optional)
booleancomponent (optional)
Stringnewest (optional)
booleanstream
StringtreatUnstable
StringnameTemplate
StringforceDeliver
booleanrecommend
booleanmakeTag
booleansetDescription
booleanbuildProject
StringremoveViewPrivateFiles
booleantrimmedChangeSet
booleandiscard
boolean$class: 'CVSSCM'$class: 'CVSSCM'repositories
cvsRootcvsRoot
StringpasswordRequiredpasswordRequired
booleanpasswordpassword
StringrepositoryItemsrepositoryItems
locationlocation
$class: 'BranchRepositoryLocation'$class: 'BranchRepositoryLocation'branchName
StringuseHeadIfNotFound
boolean$class: 'HeadRepositoryLocation'$class: 'HeadRepositoryLocation'$class: 'TagRepositoryLocation'$class: 'TagRepositoryLocation'tagName
StringuseHeadIfNotFound
booleanmodulesmodules
remoteNameremoteName
StringlocalNamelocalName
StringprojectsetFileNameprojectsetFileName
StringexcludedRegionsexcludedRegions
src/main/web/.*\.html src/main/web/.*\.jpeg 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. More information on regular expressions can be found here.
patternpattern
StringcompressionLevelcompressionLevel
intrepositoryBrowserrepositoryBrowser
$class: 'FishEyeCVS'$class: 'FishEyeCVS'url
String$class: 'OpenGrok'$class: 'OpenGrok'url
String$class: 'ViewCVS'$class: 'ViewCVS'url
StringcanUseUpdate
booleanlegacy
If you have multiple modules to check out, this option is forced (otherwise they'll overlap.)
This affects other path specifiers, such as artifact archivers --- you now specify "build/foo.jar" instead of "foo/build/foo.jar".
booleanskipChangeLog
booleanpruneEmptyDirectories
booleandisableCvsQuiet
booleancleanOnFailedUpdate
booleanforceCleanCopy
booleancheckoutCurrentTimestamp
The build quiet period is designed to assist with CVS checkouts by waiting for a specific period of time without commits. Normally you want the checkout to reflect the time when the quiet period was exited successfully. Select this option if you need to re-enable the legacy behaviour of Jenkins, i.e. using the time that the build started checking out as the timestamp for the checkout operation. Note: enabling this option can result in the quiet period being defeated especially in those cases where the build is not able to start immediately after exiting the quiet period.
boolean$class: 'ClearCaseSCM'$class: 'ClearCaseSCM'branch
Stringlabel
StringextractConfigSpec
booleanconfigSpecFileName
StringrefreshConfigSpec
booleanrefreshConfigSpecCommand
StringconfigSpec
StringviewTag
Stringuseupdate
booleanextractLoadRules
booleanloadRules
StringuseOtherLoadRulesForPolling
booleanloadRulesForPolling
Stringusedynamicview
booleanviewdrive
Stringmkviewoptionalparam
StringfilterOutDestroySubBranchEvent
booleandoNotUpdateConfigSpec
booleanrmviewonrename
booleanexcludedRegions
StringmultiSitePollBuffer
StringuseTimeRule
booleancreateDynView
booleanviewPath
Stringchangeset
ALL, BRANCH, NONE, UPDTviewStorage
Three strategies are currently available to manage view storage location.
$class: 'DefaultViewStorage'$class: 'DefaultViewStorage'$class: 'ServerViewStorage'$class: 'ServerViewStorage'assignedLabelString
Label expression used to populate view storage location dropdown.
Stringserver
The view storage location that will be passed to the -stgloc option.
The list of available servers is retrieved using cleartool lsstgloc -view
Note that auto is always available.
String$class: 'SpecificViewStorage'$class: 'SpecificViewStorage'winStorageDir
StringunixStorageDir
String$class: 'ClearCaseUcmBaselineSCM'$class: 'ClearCaseUcmBaselineSCM'$class: 'ClearCaseUcmSCM'$class: 'ClearCaseUcmSCM'stream
Stringloadrules
StringviewTag
Stringusedynamicview
booleanviewdrive
Stringmkviewoptionalparam
StringfilterOutDestroySubBranchEvent
booleanuseUpdate
booleanrmviewonrename
booleanexcludedRegions
StringmultiSitePollBuffer
StringoverrideBranchName
StringcreateDynView
booleanfreezeCode
booleanrecreateView
booleanallocateViewName
booleanviewPath
StringuseManualLoadRules
booleanchangeset
ALL, BRANCH, NONE, UPDTviewStorage
Three strategies are currently available to manage view storage location.
$class: 'DefaultViewStorage'$class: 'DefaultViewStorage'$class: 'ServerViewStorage'$class: 'ServerViewStorage'assignedLabelString
Label expression used to populate view storage location dropdown.
Stringserver
The view storage location that will be passed to the -stgloc option.
The list of available servers is retrieved using cleartool lsstgloc -view
Note that auto is always available.
String$class: 'SpecificViewStorage'$class: 'SpecificViewStorage'winStorageDir
StringunixStorageDir
StringbuildFoundationBaseline
If checked, instead of creating a view on the current stream, the job will look up the current foundation baselines for the given stream and work in readonly on these baselines. If polling is enabled, the build will be triggered every time a new foundation baseline is detected on the given stream.
boolean$class: 'CloneWorkspaceSCM'$class: 'CloneWorkspaceSCM'parentJobName
Stringcriteria
String$class: 'CmvcSCM'$class: 'CmvcSCM'family
Stringbecome
Stringreleases
StringcheckoutScript
StringtrackViewReportWhereClause
String$class: 'ConfigurationRotator'$class: 'ConfigurationRotator'acrs
$class: 'ClearCaseUCM'$class: 'ClearCaseUCM'pvobName
Stringcontribute
Contribute data to a global database. Defined in the Compatibility Action Storage Plugin.
booleantargets
baselineNamebaselineName
Stringlevellevel
INITIAL, BUILT, TESTED, RELEASED, REJECTEDfixedfixed
booleanuseNewest (optional)
boolean$class: 'Git'$class: 'Git'targets
namename
Stringrepositoryrepository
Stringbranchbranch
StringcommitIdcommitId
Stringfixedfixed
booleanuseNewest (optional)
boolean$class: 'CvsProjectset'$class: 'CvsProjectset'repositories
cvsRootcvsRoot
StringpasswordRequiredpasswordRequired
booleanpasswordpassword
StringrepositoryItemsrepositoryItems
locationlocation
$class: 'BranchRepositoryLocation'$class: 'BranchRepositoryLocation'branchName
StringuseHeadIfNotFound
boolean$class: 'HeadRepositoryLocation'$class: 'HeadRepositoryLocation'$class: 'TagRepositoryLocation'$class: 'TagRepositoryLocation'tagName
StringuseHeadIfNotFound
booleanmodulesmodules
remoteNameremoteName
StringlocalNamelocalName
StringprojectsetFileNameprojectsetFileName
StringexcludedRegionsexcludedRegions
src/main/web/.*\.html src/main/web/.*\.jpeg 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. More information on regular expressions can be found here.
patternpattern
StringcompressionLevelcompressionLevel
intrepositoryBrowserrepositoryBrowser
$class: 'FishEyeCVS'$class: 'FishEyeCVS'url
String$class: 'OpenGrok'$class: 'OpenGrok'url
String$class: 'ViewCVS'$class: 'ViewCVS'url
StringcanUseUpdate
booleanusername
Stringpassword
Stringbrowser
$class: 'FishEyeCVS'$class: 'FishEyeCVS'url
String$class: 'OpenGrok'$class: 'OpenGrok'url
String$class: 'ViewCVS'$class: 'ViewCVS'url
StringskipChangeLog
booleanpruneEmptyDirectories
booleandisableCvsQuiet
booleancleanOnFailedUpdate
booleanforceCleanCopy
boolean$class: 'DarcsScm'$class: 'DarcsScm'source
StringlocalDir
Stringclean
booleanbrowser
$class: 'DarcsWeb'$class: 'DarcsWeb'url
Stringrepo
String$class: 'Darcsden'$class: 'Darcsden'url
String$class: 'DimensionsSCM'$class: 'DimensionsSCM'project
StringcredentialsType
StringuserName
Stringpassword
StringpluginServer
StringuserServer
StringkeystoreServer
StringpluginDatabase
StringuserDatabase
StringkeystoreDatabase
StringkeystorePath
StringcertificateAlias
StringcredentialsId
StringcertificatePassword
StringkeystorePassword
StringcertificatePath
StringremoteCertificatePassword
StringsecureAgentAuth
booleancanJobDelete (optional)
booleancanJobExpand (optional)
booleancanJobForce (optional)
booleancanJobNoMetadata (optional)
booleancanJobNoTouch (optional)
booleancanJobRevert (optional)
booleancanJobUpdate (optional)
booleaneol (optional)
Stringfolders (optional)
valuevalue
StringpathsToExclude (optional)
valuevalue
Stringpermissions (optional)
StringtimeZone (optional)
StringwebUrl (optional)
String$class: 'DrushMakefileSCM'$class: 'DrushMakefileSCM'makefile
Specify the content of the Makefile. Support for YAML Makefiles depends on the version of Drush you have installed.
This example will generate a vanilla Drupal 7.38:
api=2
core=7.x
projects[drupal][version]=7.38
Stringroot
String$class: 'EndevorConfiguration'$class: 'EndevorConfiguration'connectionId
StringfilterPattern
StringfileExtension
StringcredentialsId
StringtargetFolder
Stringfilesystemfilesystempath
The file path for the source code.
e.g. \\Server1\project1\src or c:\myproject\src
Note for distributed build environment, please make sure the path is accessible on remote node(s)
StringclearWorkspace
If true, the system will delete all existing files/sub-folders in workspace before checking-out. Poll changes will not be affected by this setting.
booleancopyHidden
If true, the system will copy hidden files and folders as well. Default is false.
booleanfilterSettings
includeFilterincludeFilter
booleanselectorsselectors
You can apply wildcard filter(s) when detecting changes and copying files. By default, the system will filter out hidden files, on Unix, that means files/folder starting with ".", on Windows, that means files/folders with "hidden" attribute. You may want to filter out, e.g. files with ".tmp" extension.
Note: filters are applied on both sides, source and destination (i.e. the workspace). E.g. if you filter out ".tmp" files, all ".tmp" files currently in workspace will not be removed.
wildcardwildcard
ANT style wildcard.
To include just *.java, set filter type to "Include" and type add "*.java" (without quote) in the wildcard. To exclude *.exe" and all JUnit test cases, set filter type to "Exclude" and add two wildcard, one for "*.dll" and one for "*Test*"
To exclude a directory, set filter to "**/dir_to_exclude/**"
Note: (1) the wildcard is case insensitive, (2) all backslashes (\) will be replaced with slashes (/)
String$class: 'FeatureBranchAwareMercurialSCM'$class: 'FeatureBranchAwareMercurialSCM'installation
Stringsource
Stringbranch
Stringmodules
Stringsubdir
my/sources (use forward slashes). If changing this entry, you probably want to clean the workspace first.
Stringbrowser
$class: 'FishEye'$class: 'FishEye'url
String$class: 'GoogleCode'$class: 'GoogleCode'url
String$class: 'HgWeb'$class: 'HgWeb'url
String$class: 'Kallithea'$class: 'Kallithea'url
String$class: 'KilnHG'$class: 'KilnHG'url
String$class: 'RhodeCode'$class: 'RhodeCode'url
String$class: 'RhodeCodeLegacy'$class: 'RhodeCodeLegacy'url
String$class: 'ScmManager'$class: 'ScmManager'url
http://YOURSCMMANAGER/scm/repo/NAMESPACE/NAME/).
Stringclean
booleanbranchPattern
String$class: 'GeneXusServerSCM'$class: 'GeneXusServerSCM'gxInstallationId
StringserverURL
StringcredentialsId
Credentials to use when authenticating to the GeneXus Server.
Select the credentials you want to use or click "Add" to enter a new user/password pair.
StringkbName
StringkbVersion
Name of the Version that will be selected when creating a local copy of the Knowledge Base.
If you leave it blank the 'Trunk' version will be selected by default.
StringlocalKbPath
Path to the local Knowledge Base to use as working copy.
If you leave it blank the default ${WORKSPACE}\KBname will apply.
StringlocalKbVersion
Name of the Version in the local Knowledge Base that is linked to the Version in the server.
If you leave it blank the 'Trunk' version will be selected by default.
StringkbDbServerInstance
StringkbDbCredentialsId
Credentials to use when to connecting to SQL Server.
Select "none" for Windows Authentication.
StringkbDbName
Name of the SQL Server database used for the local Knowledge Base.
Leave it blank to use the default database name.
StringkbDbInSameFolder
Create the database files in the same folder as the Knowledge Base when checking out. Default is 'true'.
If kbDbInSameFolder is true or not set, then the database files will be created in the same folder as the Knowledge Base. If kbDbInSameFolder is false, then the database files will be created in the default folder configured for the SQL Server at kbDbServerInstance (optional).
boolean$class: 'GitSCM'$class: 'GitSCM'The git plugin provides fundamental git operations for Jenkins projects. It can poll, fetch, checkout, and merge contents of git repositories.
The git plugin provides an SCM implementation to be used with the Pipeline SCM checkout step. The Pipeline Syntax Snippet Generator guides the user to select git plugin checkout options and provides online help for each of the options.
userRemoteConfigs
${SUPER_PROJECT_URL}/${SUBMODULE}, rather than relying on information from .gitmodules.urlurl
git clone command.
Stringnamename
origin, to uniquely identify this repository among other remote repositories. This is the same "name" that you use in your git remote command. If left empty, Jenkins will generate unique names for you.
You normally want to specify this when you have multiple remote repositories.
Stringrefspecrefspec
git fetch, which retrieves all the branch heads as remotes/REPOSITORYNAME/BRANCHNAME. This default behaviour is OK for most cases.
In other words, the default refspec is "+refs/heads/*:refs/remotes/REPOSITORYNAME/*" where REPOSITORYNAME is the value you specify in the above "name of repository" textbox.
When do you want to modify this value? A good example is when you want to just retrieve one branch. For example, +refs/heads/master:refs/remotes/origin/master would only retrieve the master branch and nothing else.
The plugin uses a default refspec for its initial fetch, unless the "Advanced Clone Option" is set to honor refspec. This keeps compatibility with previous behavior, and allows the job definition to decide if the refspec should be honored on initial clone.
Multiple refspecs can be entered by separating them with a space character. +refs/heads/master:refs/remotes/origin/master +refs/heads/develop:refs/remotes/origin/develop retrieves the master branch and the develop branch and nothing else.
See the refspec definition in Git user manual for more details.
StringcredentialsIdcredentialsId
Stringbranches
namename
Specify the branches if you'd like to track a specific branch in a repository. If left blank, all branches will be examined for changes and built.
The safest way is to use the refs/heads/<branchName> syntax. This way the expected branch is unambiguous.
If your branch name has a / in it make sure to use the full reference above. When not presented with a full path the plugin will only use the part of the string right of the last slash. Meaning foo/bar will actually match bar.
If you use a wildcard branch specifier, with a slash (e.g. release/), you'll need to specify the origin repository in the branch names to make sure changes are picked up. So e.g. origin/release/
Possible options:
<branchName>refs/heads/<branchName>.master, feature1, ... refs/heads/<branchName>refs/heads/master, refs/heads/feature1/master, ... <remoteRepoName>/<branchName>refs/heads/<branchName>.origin/master remotes/<remoteRepoName>/<branchName>remotes/origin/master refs/remotes/<remoteRepoName>/<branchName>refs/remotes/origin/master <tagName>refs/tags/<tagName> instead.git-2.3.0 refs/tags/<tagName>refs/tags/git-2.3.0 <commitId>5062ac843f2b947733e6a3b105977056821bd352, 5062ac84, ... ${ENV_VARIABLE}${TREEISH}, refs/tags/${TAGNAME}, ... <Wildcards>REPOSITORYNAME/BRANCH. In addition, BRANCH is recognized as a shorthand of */BRANCH, '*' is recognized as a wildcard, and '**' is recognized as wildcard that includes the separator '/'. Therefore, origin/branches* would match origin/branches-foo but not origin/branches/foo, while origin/branches** would match both origin/branches-foo and origin/branches/foo. :<regular expression>:regexp. Regular expression syntax in branches to build will only build those branches whose names match the regular expression.:^(?!(origin/prefix)).*
origin or origin/master or origin/featureorigin/prefix or origin/prefix_123 or origin/prefix-abc:origin/release-\d{8}
origin/release-20150101origin/release-2015010 or origin/release-201501011 or origin/release-20150101-something:^(?!origin/master$|origin/develop$).*
origin/branch1 or origin/branch-2 or origin/master123 or origin/develop-123origin/master or origin/developStringbrowser
$class: 'AssemblaWeb'$class: 'AssemblaWeb'repoUrl
String$class: 'BacklogGitRepositoryBrowser'$class: 'BacklogGitRepositoryBrowser'repoName
StringrepoUrl
StringbitbucketServerbitbucketServerrepoUrl
String$class: 'BitbucketWeb'$class: 'BitbucketWeb'repoUrl
String$class: 'CGit'$class: 'CGit'repoUrl
String$class: 'FisheyeGitRepositoryBrowser'$class: 'FisheyeGitRepositoryBrowser'repoUrl
String$class: 'GitBlitRepositoryBrowser'$class: 'GitBlitRepositoryBrowser'repoUrl
StringprojectName
String$class: 'GitBucketBrowser'$class: 'GitBucketBrowser'url
String$class: 'GitLab'$class: 'GitLab'repoUrl
Stringversion (optional)
String$class: 'GitLabBrowser'$class: 'GitLabBrowser'https://gitLab.example.com then the URL for bob's skunkworks project might be https://gitLab.example.com/bob/skunkworks.
projectUrl
https://gitLab.example.com then the URL for bob's skunkworks project might be https://gitLab.example.com/bob/skunkworks
String$class: 'GitList'$class: 'GitList'repoUrl
String$class: 'GitWeb'$class: 'GitWeb'repoUrl
String$class: 'GiteaBrowser'$class: 'GiteaBrowser'repoUrl
https://gitea.example.com then the URL for bob's skunkworks project repository might be https://gitea.example.com/bob/skunkworks
String$class: 'GithubWeb'$class: 'GithubWeb'repoUrl
String$class: 'Gitiles'$class: 'Gitiles'repoUrl
String$class: 'GitoriousWeb'$class: 'GitoriousWeb'repoUrl
String$class: 'GogsGit'$class: 'GogsGit'repoUrl
String$class: 'KilnGit'$class: 'KilnGit'repoUrl
String$class: 'Phabricator'$class: 'Phabricator'repoUrl
Stringrepo
String$class: 'RedmineWeb'$class: 'RedmineWeb'repoUrl
String$class: 'RhodeCode'$class: 'RhodeCode'repoUrl
String$class: 'ScmManagerGitRepositoryBrowser'$class: 'ScmManagerGitRepositoryBrowser'repoUrl
String$class: 'Stash'$class: 'Stash'repoUrl
String$class: 'TFS2013GitRepositoryBrowser'$class: 'TFS2013GitRepositoryBrowser'repoUrl
If TFS is also used as the repository server, this can usually be left blank.
String$class: 'TracGitRepositoryBrowser'$class: 'TracGitRepositoryBrowser'$class: 'TuleapBrowser'$class: 'TuleapBrowser'repositoryUrl
String$class: 'ViewGitWeb'$class: 'ViewGitWeb'repoUrl
StringprojectName
StringgitTool
Absolute path to the git executable.
This is different from other Jenkins tool definitions. Rather than providing the directory that contains the executable, you must provide the complete path to the executable. Setting '/usr/bin/git' would be correct, while setting '/usr/bin/' is not correct.
Stringextensions
Extensions add new behavior or modify existing plugin behavior for different uses. Extensions help users more precisely tune plugin behavior to meet their needs.
Extensions include:
$class: 'AuthorInChangelog'$class: 'AuthorInChangelog'$class: 'BuildChooserSetting'$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: 'AlternativeBuildChooser'$class: 'AncestryBuildChooser'$class: 'AncestryBuildChooser'maximumAgeInDays
intancestorCommitSha1
String$class: 'DefaultBuildChooser'$class: 'DefaultBuildChooser'$class: 'DeflakeGitBuildChooser'$class: 'DeflakeGitBuildChooser'$class: 'GerritTriggerBuildChooser'$class: 'GerritTriggerBuildChooser'$class: 'InverseBuildChooser'$class: 'InverseBuildChooser'$class: 'BuildSingleRevisionOnly'$class: 'BuildSingleRevisionOnly'$class: 'ChangelogToBranch'$class: 'ChangelogToBranch'options
compareRemotecompareRemote
origin, that contains the branch you specify below.
StringcompareTargetcompareTarget
String$class: 'CheckoutOption'$class: 'CheckoutOption'timeout
int$class: 'CleanBeforeCheckout'$class: '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 (optional)
.git directories.
boolean$class: 'CleanCheckout'$class: 'CleanCheckout'.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 (optional)
.git directories.
boolean$class: 'CloneOption'$class: 'CloneOption'shallow
booleannoTags
booleanreference
Stringtimeout
intdepth (optional)
inthonorRefspec (optional)
boolean$class: 'CodeCommitURLHelper'$class: 'CodeCommitURLHelper'credentialId
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.
StringrepositoryName
String$class: 'DisableRemotePoll'$class: 'DisableRemotePoll'$class: 'ExcludeFromChangeSet'$class: 'ExcludeFromChangeSet'$class: 'ExcludeFromPoll'$class: 'ExcludeFromPoll'$class: 'GitLFSPull'$class: 'GitLFSPull'$class: 'GitSCMChecksExtension'$class: 'GitSCMChecksExtension'verboseConsoleLog (optional)
boolean$class: 'GitSCMStatusChecksExtension'$class: 'GitSCMStatusChecksExtension'name (optional)
Stringskip (optional)
booleanskipProgressUpdates (optional)
booleansuppressLogs (optional)
booleanunstableBuildNeutral (optional)
boolean$class: 'GitTagMessageExtension'$class: 'GitTagMessageExtension'useMostRecentTag (optional)
boolean$class: 'IgnoreNotifyCommit'$class: 'IgnoreNotifyCommit'$class: 'LocalBranch'$class: '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'$class: 'MessageExclusion'excludedMessage
.*\[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.
String$class: 'PathRestriction'$class: 'PathRestriction'includedRegions
myapp/src/main/web/.*\.html
myapp/src/main/web/.*\.jpeg
myapp/src/main/web/.*\.gif
The 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.
StringexcludedRegions
myapp/src/main/web/.*\.html
myapp/src/main/web/.*\.jpeg
myapp/src/main/web/.*\.gif
The example above illustrates that if only html/jpeg/gif files have been committed to the SCM a build will not occur.
String$class: 'PerBuildTag'$class: 'PerBuildTag'$class: 'PreBuildMerge'$class: 'PreBuildMerge'options
mergeTargetmergeTarget
master.
StringfastForwardModefastForwardMode (optional)
FF, FF_ONLY, NO_FFmergeRemotemergeRemote (optional)
origin, that contains the branch you specify below. If left blank, it'll default to the name of the first repository configured above.
StringmergeStrategymergeStrategy (optional)
DEFAULT, RESOLVE, RECURSIVE, OCTOPUS, OURS, SUBTREE, RECURSIVE_THEIRSpretestedIntegrationpretestedIntegrationgitIntegrationStrategy
accumulatedaccumulatedsquashsquashintegrationBranch
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>
StringrepoName
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
String$class: 'PruneStaleBranch'$class: 'PruneStaleBranch'pruneTagspruneTagspruneTags
boolean$class: 'RelativeTargetDirectory'$class: 'RelativeTargetDirectory'relativeTargetDir
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.
String$class: 'ScmName'$class: 'ScmName'Unique name for this SCM. Needed when using Git within the Multi SCM plugin.
name
String$class: 'SparseCheckoutPaths'$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
pathpath
String$class: 'SubmoduleOption'$class: 'SubmoduleOption'disableSubmodules
booleanrecursiveSubmodules
booleantrackingSubmodules
booleanreference
git init --bare git remote add SubProject1 https://gitrepo.com/subproject1 git remote add SubProject2 https://gitrepo.com/subproject2 git fetch --all
Stringtimeout
intparentCredentials
booleandepth (optional)
intshallow (optional)
booleanthreads (optional)
int$class: 'UserExclusion'$class: 'UserExclusion'excludedUsers
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.
String$class: 'UserIdentity'$class: 'UserIdentity'name
If given, "GIT_COMMITTER_NAME=[this]" and "GIT_AUTHOR_NAME=[this]" are set for builds. This overrides whatever is in the global settings.
Stringemail
If given, "GIT_COMMITTER_EMAIL=[this]" and "GIT_AUTHOR_EMAIL=[this]" are set for builds. This overrides whatever is in the global settings.
String$class: 'WipeWorkspace'$class: 'WipeWorkspace'doGenerateSubmoduleConfigurations (optional)
Removed facility that was intended to test combinations of git submodule versions. Removed in git plugin 4.6.0. Ignores the user provided value and always uses false as its value.
booleansubmoduleCfg (optional)
Removed facility that was intended to test combinations of git submodule versions. Removed in git plugin 4.6.0. Ignores the user provided value(s) and always uses empty values.
submoduleNamesubmoduleName
Removed in git plugin 4.6.0.
Stringbranchesbranches
Removed in git plugin 4.6.0.
String$class: 'HarvestSCM'$class: 'HarvestSCM'broker
StringpasswordFile
StringuserId
Stringpassword
StringprojectName
Stringstate
StringviewPath
StringclientPath
StringprocessName
StringrecursiveSearch
StringuseSynchronize
booleanextraOptions
String$class: 'IntegritySCM'$class: 'IntegritySCM'serverConfig
StringconfigPath
StringconfigurationName
StringCPBasedMode (optional)
booleanalternateWorkspace (optional)
Stringbrowser (optional)
$class: 'IntegrityWebUI'$class: 'IntegrityWebUI'url
StringcheckoutThreadPoolSize (optional)
intcheckoutThreadTimeout (optional)
intcheckpointBeforeBuild (optional)
booleancheckpointLabel (optional)
StringcleanCopy (optional)
booleandeleteNonMembers (optional)
booleanexcludeList (optional)
StringfetchChangedWorkspaceFiles (optional)
booleanincludeList (optional)
StringlineTerminator (optional)
StringlocalClient (optional)
booleanpassword (optional)
StringrestoreTimestamp (optional)
booleansandboxScope (optional)
StringskipAuthorInfo (optional)
booleanuserName (optional)
String$class: 'IspwConfiguration'$class: 'IspwConfiguration'connectionId
StringcredentialsId
StringserverConfig
StringserverStream
StringserverApplication
StringserverLevel
StringlevelOption
StringcomponentType
StringfolderName
StringispwDownloadAll
booleantargetFolder
StringispwDownloadIncl
booleanispwDownloadWithCompileOnly
boolean$class: 'IspwContainerConfiguration'$class: 'IspwContainerConfiguration'connectionId
StringcredentialsId
StringserverConfig
StringcontainerName
StringcontainerType
StringserverLevel
StringcomponentType
StringispwDownloadAll
booleantargetFolder
StringispwDownloadIncl
boolean$class: 'MercurialSCM'$class: 'MercurialSCM'source
Stringbrowser (optional)
$class: 'FishEye'$class: 'FishEye'url
String$class: 'GoogleCode'$class: 'GoogleCode'url
String$class: 'HgWeb'$class: 'HgWeb'url
String$class: 'Kallithea'$class: 'Kallithea'url
String$class: 'KilnHG'$class: 'KilnHG'url
String$class: 'RhodeCode'$class: 'RhodeCode'url
String$class: 'RhodeCodeLegacy'$class: 'RhodeCodeLegacy'url
String$class: 'ScmManager'$class: 'ScmManager'url
http://YOURSCMMANAGER/scm/repo/NAMESPACE/NAME/).
Stringclean (optional)
booleancredentialsId (optional)
StringdisableChangeLog (optional)
booleaninstallation (optional)
Stringmodules (optional)
Stringrevision (optional)
default branch.)
StringrevisionType (optional)
BRANCH, TAG, CHANGESET, REVSETsubdir (optional)
my/sources (use forward slashes). If changing this entry, you probably want to clean the workspace first.
String$class: 'MergeBotUpdater'$class: 'MergeBotUpdater'$class: 'MultiSCM'$class: 'MultiSCM'scmList
$class: 'AWSCodePipelineSCM'$class: 'AWSCodePipelineSCM'name
StringclearWorkspace
booleanregion
StringawsAccessKey
In order to integrate with AWS CodePipeline, you must authorize access to the pipeline and its related artifacts. If you installed Jenkins on a supported Amazon EC2 instance type, such as Amazon Linux, you can install the AWS CLI and configure a profile with the required credentials. This is the preferred method. In all other cases, you can store AWS credentials in these fields. You should securely configure your Jenkins instance to use HTTPS so that these credentials are not sent unencrypted. For more information, see AWS CodePipeline Integration for Other Products and Services.
StringawsSecretKey
>In order to integrate with AWS CodePipeline, you must authorize access to the pipeline and its related artifacts. If you installed Jenkins on a supported Amazon EC2 instance type, such as Amazon Linux, you can install the AWS CLI and configure a profile with the required credentials. This is the preferred method. In all other cases, you can store AWS credentials in these fields. You should securely configure your Jenkins instance to use HTTPS so that these credentials are not sent unencrypted. For more information, see AWS CodePipeline Integration for Other Products and Services.
StringproxyHost
You might need a proxy host address if you are hosting Jenkins on a private network. The proxy name can be an IP address or DNS address. The AWS CodePipeline Plugin for Jenkins requires internet access. If access is not configured, you might see errors in the AWS CodePipeline Polling Log.
StringproxyPort
You might need a proxy port for your proxy host address if you are hosting Jenkins on a private network. The proxy port is a number, might be on port 8080, 3128, or 8443, depending on your network protocols and security settings. If access is not configured, you might see errors in the AWS CodePipeline Polling Log.
Stringcategory
This is the category of the action type in AWS CodePipeline, and is usually either Build or Test. To see an example usage, see Install and Configure the AWS CodePipeline Plugin for Jenkins.
Stringprovider
This is the provider name of the action type in AWS CodePipeline. You must provide this exact string when adding an action for Jenkins in AWS CodePipeline. To see an example usage, see Install and Configure the AWS CodePipeline Plugin for Jenkins.
Stringversion
Leave the default as 1.
Stringaccurevaccurevdepot
Stringstream
StringserverName (optional)
StringserverUUID (optional)
StringwspaceORreftree (optional)
StringaccurevTool (optional)
Stringcleanreftree (optional)
booleandirectoryOffset (optional)
StringdontPopContent (optional)
booleanfilterForPollSCM (optional)
StringignoreStreamParent (optional)
booleanreftree (optional)
StringsnapshotNameFormat (optional)
StringsubPath (optional)
StringsubPathOnly (optional)
booleansynctime (optional)
booleanuseSnapshot (optional)
booleanworkspace (optional)
String$class: 'BazaarSCM'$class: 'BazaarSCM'source
Stringcleantree
booleanbrowser
$class: 'Loggerhead'$class: 'Loggerhead'url
String$class: 'OpenGrok'$class: 'OpenGrok'url
StringrootModule
Stringcheckout
boolean$class: 'BitKeeperSCM'$class: 'BitKeeperSCM'parent
StringlocalRepository
StringusePull
booleanquiet
booleanBbSBbSid
Stringbranches
namename
Specify the branches if you'd like to track a specific branch in a repository. If left blank, all branches will be examined for changes and built.
The safest way is to use the refs/heads/<branchName> syntax. This way the expected branch is unambiguous.
If your branch name has a / in it make sure to use the full reference above. When not presented with a full path the plugin will only use the part of the string right of the last slash. Meaning foo/bar will actually match bar.
If you use a wildcard branch specifier, with a slash (e.g. release/), you'll need to specify the origin repository in the branch names to make sure changes are picked up. So e.g. origin/release/
Possible options:
<branchName>refs/heads/<branchName>.master, feature1, ... refs/heads/<branchName>refs/heads/master, refs/heads/feature1/master, ... <remoteRepoName>/<branchName>refs/heads/<branchName>.origin/master remotes/<remoteRepoName>/<branchName>remotes/origin/master refs/remotes/<remoteRepoName>/<branchName>refs/remotes/origin/master <tagName>refs/tags/<tagName> instead.git-2.3.0 refs/tags/<tagName>refs/tags/git-2.3.0 <commitId>5062ac843f2b947733e6a3b105977056821bd352, 5062ac84, ... ${ENV_VARIABLE}${TREEISH}, refs/tags/${TAGNAME}, ... <Wildcards>REPOSITORYNAME/BRANCH. In addition, BRANCH is recognized as a shorthand of */BRANCH, '*' is recognized as a wildcard, and '**' is recognized as wildcard that includes the separator '/'. Therefore, origin/branches* would match origin/branches-foo but not origin/branches/foo, while origin/branches** would match both origin/branches-foo and origin/branches/foo. :<regular expression>:regexp. Regular expression syntax in branches to build will only build those branches whose names match the regular expression.:^(?!(origin/prefix)).*
origin or origin/master or origin/featureorigin/prefix or origin/prefix_123 or origin/prefix-abc:origin/release-\d{8}
origin/release-20150101origin/release-2015010 or origin/release-201501011 or origin/release-20150101-something:^(?!origin/master$|origin/develop$).*
origin/branch1 or origin/branch-2 or origin/master123 or origin/develop-123origin/master or origin/developStringcredentialsId
When running a job, Jenkins requires credentials to authenticate with Bitbucket Server. For example, to checkout the source code for builds. To do this, it needs credentials with access to the projects and repositories you want it to build from.
You can provide Jenkins with credentials here by:
In addition, you can provide Jenkins with SSH credentials below. If you do, Jenkins will use them for clone operations instead of the credentials you select here.
StringsshCredentialsId
If specified, Jenkins will use these credentials to check out the source code for builds. If no SSH credentials are specified, Jenkins will use the basic credentials instead.
To provide Jenkins with SSH credentials, you can:
Stringextensions
$class: 'AuthorInChangelog'$class: 'AuthorInChangelog'$class: 'BuildChooserSetting'$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: 'AlternativeBuildChooser'$class: 'AncestryBuildChooser'$class: 'AncestryBuildChooser'maximumAgeInDays
intancestorCommitSha1
String$class: 'DefaultBuildChooser'$class: 'DefaultBuildChooser'$class: 'DeflakeGitBuildChooser'$class: 'DeflakeGitBuildChooser'$class: 'GerritTriggerBuildChooser'$class: 'GerritTriggerBuildChooser'$class: 'InverseBuildChooser'$class: 'InverseBuildChooser'$class: 'BuildSingleRevisionOnly'$class: 'BuildSingleRevisionOnly'$class: 'ChangelogToBranch'$class: 'ChangelogToBranch'options
compareRemotecompareRemote
origin, that contains the branch you specify below.
StringcompareTargetcompareTarget
String$class: 'CheckoutOption'$class: 'CheckoutOption'timeout
int$class: 'CleanBeforeCheckout'$class: '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 (optional)
.git directories.
boolean$class: 'CleanCheckout'$class: 'CleanCheckout'.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 (optional)
.git directories.
boolean$class: 'CloneOption'$class: 'CloneOption'shallow
booleannoTags
booleanreference
Stringtimeout
intdepth (optional)
inthonorRefspec (optional)
boolean$class: 'CodeCommitURLHelper'$class: 'CodeCommitURLHelper'credentialId
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.
StringrepositoryName
String$class: 'DisableRemotePoll'$class: 'DisableRemotePoll'$class: 'ExcludeFromChangeSet'$class: 'ExcludeFromChangeSet'$class: 'ExcludeFromPoll'$class: 'ExcludeFromPoll'$class: 'GitLFSPull'$class: 'GitLFSPull'$class: 'GitSCMChecksExtension'$class: 'GitSCMChecksExtension'verboseConsoleLog (optional)
boolean$class: 'GitSCMStatusChecksExtension'$class: 'GitSCMStatusChecksExtension'name (optional)
Stringskip (optional)
booleanskipProgressUpdates (optional)
booleansuppressLogs (optional)
booleanunstableBuildNeutral (optional)
boolean$class: 'GitTagMessageExtension'$class: 'GitTagMessageExtension'useMostRecentTag (optional)
boolean$class: 'IgnoreNotifyCommit'$class: 'IgnoreNotifyCommit'$class: 'LocalBranch'$class: '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'$class: 'MessageExclusion'excludedMessage
.*\[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.
String$class: 'PathRestriction'$class: 'PathRestriction'includedRegions
myapp/src/main/web/.*\.html
myapp/src/main/web/.*\.jpeg
myapp/src/main/web/.*\.gif
The 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.
StringexcludedRegions
myapp/src/main/web/.*\.html
myapp/src/main/web/.*\.jpeg
myapp/src/main/web/.*\.gif
The example above illustrates that if only html/jpeg/gif files have been committed to the SCM a build will not occur.
String$class: 'PerBuildTag'$class: 'PerBuildTag'$class: 'PreBuildMerge'$class: 'PreBuildMerge'options
mergeTargetmergeTarget
master.
StringfastForwardModefastForwardMode (optional)
FF, FF_ONLY, NO_FFmergeRemotemergeRemote (optional)
origin, that contains the branch you specify below. If left blank, it'll default to the name of the first repository configured above.
StringmergeStrategymergeStrategy (optional)
DEFAULT, RESOLVE, RECURSIVE, OCTOPUS, OURS, SUBTREE, RECURSIVE_THEIRSpretestedIntegrationpretestedIntegrationgitIntegrationStrategy
accumulatedaccumulatedsquashsquashintegrationBranch
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>
StringrepoName
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
String$class: 'PruneStaleBranch'$class: 'PruneStaleBranch'pruneTagspruneTagspruneTags
boolean$class: 'RelativeTargetDirectory'$class: 'RelativeTargetDirectory'relativeTargetDir
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.
String$class: 'ScmName'$class: 'ScmName'Unique name for this SCM. Needed when using Git within the Multi SCM plugin.
name
String$class: 'SparseCheckoutPaths'$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
pathpath
String$class: 'SubmoduleOption'$class: 'SubmoduleOption'disableSubmodules
booleanrecursiveSubmodules
booleantrackingSubmodules
booleanreference
git init --bare git remote add SubProject1 https://gitrepo.com/subproject1 git remote add SubProject2 https://gitrepo.com/subproject2 git fetch --all
Stringtimeout
intparentCredentials
booleandepth (optional)
intshallow (optional)
booleanthreads (optional)
int$class: 'UserExclusion'$class: 'UserExclusion'excludedUsers
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.
String$class: 'UserIdentity'$class: 'UserIdentity'name
If given, "GIT_COMMITTER_NAME=[this]" and "GIT_AUTHOR_NAME=[this]" are set for builds. This overrides whatever is in the global settings.
Stringemail
If given, "GIT_COMMITTER_EMAIL=[this]" and "GIT_AUTHOR_EMAIL=[this]" are set for builds. This overrides whatever is in the global settings.
String$class: 'WipeWorkspace'$class: 'WipeWorkspace'gitTool
StringprojectName
Enter the name of the Bitbucket Server project containing the repository you want Jenkins to build from. To find a project, start typing. If it doesn't appear in the search results, the credentials that you've chosen may not have read access to it and you'll need to provide different credentials.
To get Jenkins to build from a personal repository, enter a tilde (~) followed by repository owner's username. For example, ~jsmith.
StringrepositoryName
Enter the Bitbucket Server repository you want Jenkins to build from. To find a repository, start typing. If it doesn't appear in the search results, the credentials that you've chosen may not have read access to it and you'll need to provide different credentials.
To get Jenkins to build from a personal repository, enter its slug. This is the URL-friendly version of the repository name. For example, a repository called my example repo will have the slug my-example-repo, and you can see this in its URL, https://bitbucketserver.mycompany.com/myproject/my-example-repo.
StringserverId
Choose the Bitbucket Server instance containing the repository you want Jenkins to build from. If you can't find your instance, check this plugin's configuration and try again.
StringmirrorName
Choose the location that Jenkins should clone from when running this build. This can be the primary server or a mirror if one is available. To see available mirrors, first choose a Bitbucket Server project and repository.
String$class: 'BlameSubversionSCM'$class: 'BlameSubversionSCM'if it is false and the build is not triggered by upstream job,
the plugin will not collect any svn info from upstream job.
else the plugin will collect svn info from latest upstream job
alwaysCollectSVNInfo
boolean$class: 'CCUCMScm'$class: 'CCUCMScm'loadModule
Stringnewest
booleanmode
$class: 'PollChildMode'$class: 'PollChildMode'levelToPoll
Stringcomponent (optional)
StringcreateBaseline (optional)
Check this if you want create a baseline after a completed deliver.
This is only applicable for child and sibling poll mode.
booleannewest (optional)
boolean$class: 'PollRebaseMode'$class: 'PollRebaseMode'levelToPoll
Stringcomponent (optional)
StringcreateBaseline (optional)
booleanexcludeList (optional)
String$class: 'PollSelfMode'$class: 'PollSelfMode'levelToPoll
Stringcomponent (optional)
Stringnewest (optional)
boolean$class: 'PollSiblingMode'$class: 'PollSiblingMode'levelToPoll
Stringcomponent (optional)
StringcreateBaseline (optional)
Check this if you want create a baseline after a completed deliver.
This is only applicable for child and sibling poll mode.
booleannewest (optional)
booleanuseHyperLinkForPolling (optional)
boolean$class: 'PollSubscribeMode'$class: 'PollSubscribeMode'levelToPoll
StringcomponentsToMonitor
componentSelectioncomponentSelection
StringjobsToMonitor
jobnamejobname
Stringignoresignores
StringjobNamejobName (optional)
StringcascadePromotion (optional)
booleancomponent (optional)
Stringnewest (optional)
booleanstream
StringtreatUnstable
StringnameTemplate
StringforceDeliver
booleanrecommend
booleanmakeTag
booleansetDescription
booleanbuildProject
StringremoveViewPrivateFiles
booleantrimmedChangeSet
booleandiscard
boolean$class: 'CVSSCM'$class: 'CVSSCM'repositories
cvsRootcvsRoot
StringpasswordRequiredpasswordRequired
booleanpasswordpassword
StringrepositoryItemsrepositoryItems
locationlocation
$class: 'BranchRepositoryLocation'$class: 'BranchRepositoryLocation'branchName
StringuseHeadIfNotFound
boolean$class: 'HeadRepositoryLocation'$class: 'HeadRepositoryLocation'$class: 'TagRepositoryLocation'$class: 'TagRepositoryLocation'tagName
StringuseHeadIfNotFound
booleanmodulesmodules
remoteNameremoteName
StringlocalNamelocalName
StringprojectsetFileNameprojectsetFileName
StringexcludedRegionsexcludedRegions
src/main/web/.*\.html src/main/web/.*\.jpeg 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. More information on regular expressions can be found here.
patternpattern
StringcompressionLevelcompressionLevel
intrepositoryBrowserrepositoryBrowser
$class: 'FishEyeCVS'$class: 'FishEyeCVS'url
String$class: 'OpenGrok'$class: 'OpenGrok'url
String$class: 'ViewCVS'$class: 'ViewCVS'url
StringcanUseUpdate
booleanlegacy
If you have multiple modules to check out, this option is forced (otherwise they'll overlap.)
This affects other path specifiers, such as artifact archivers --- you now specify "build/foo.jar" instead of "foo/build/foo.jar".
booleanskipChangeLog
booleanpruneEmptyDirectories
booleandisableCvsQuiet
booleancleanOnFailedUpdate
booleanforceCleanCopy
booleancheckoutCurrentTimestamp
The build quiet period is designed to assist with CVS checkouts by waiting for a specific period of time without commits. Normally you want the checkout to reflect the time when the quiet period was exited successfully. Select this option if you need to re-enable the legacy behaviour of Jenkins, i.e. using the time that the build started checking out as the timestamp for the checkout operation. Note: enabling this option can result in the quiet period being defeated especially in those cases where the build is not able to start immediately after exiting the quiet period.
boolean$class: 'ClearCaseSCM'$class: 'ClearCaseSCM'branch
Stringlabel
StringextractConfigSpec
booleanconfigSpecFileName
StringrefreshConfigSpec
booleanrefreshConfigSpecCommand
StringconfigSpec
StringviewTag
Stringuseupdate
booleanextractLoadRules
booleanloadRules
StringuseOtherLoadRulesForPolling
booleanloadRulesForPolling
Stringusedynamicview
booleanviewdrive
Stringmkviewoptionalparam
StringfilterOutDestroySubBranchEvent
booleandoNotUpdateConfigSpec
booleanrmviewonrename
booleanexcludedRegions
StringmultiSitePollBuffer
StringuseTimeRule
booleancreateDynView
booleanviewPath
Stringchangeset
ALL, BRANCH, NONE, UPDTviewStorage
Three strategies are currently available to manage view storage location.
$class: 'DefaultViewStorage'$class: 'DefaultViewStorage'$class: 'ServerViewStorage'$class: 'ServerViewStorage'assignedLabelString
Label expression used to populate view storage location dropdown.
Stringserver
The view storage location that will be passed to the -stgloc option.
The list of available servers is retrieved using cleartool lsstgloc -view
Note that auto is always available.
String$class: 'SpecificViewStorage'$class: 'SpecificViewStorage'winStorageDir
StringunixStorageDir
String$class: 'ClearCaseUcmBaselineSCM'$class: 'ClearCaseUcmBaselineSCM'$class: 'ClearCaseUcmSCM'$class: 'ClearCaseUcmSCM'stream
Stringloadrules
StringviewTag
Stringusedynamicview
booleanviewdrive
Stringmkviewoptionalparam
StringfilterOutDestroySubBranchEvent
booleanuseUpdate
booleanrmviewonrename
booleanexcludedRegions
StringmultiSitePollBuffer
StringoverrideBranchName
StringcreateDynView
booleanfreezeCode
booleanrecreateView
booleanallocateViewName
booleanviewPath
StringuseManualLoadRules
booleanchangeset
ALL, BRANCH, NONE, UPDTviewStorage
Three strategies are currently available to manage view storage location.
$class: 'DefaultViewStorage'$class: 'DefaultViewStorage'$class: 'ServerViewStorage'$class: 'ServerViewStorage'assignedLabelString
Label expression used to populate view storage location dropdown.
Stringserver
The view storage location that will be passed to the -stgloc option.
The list of available servers is retrieved using cleartool lsstgloc -view
Note that auto is always available.
String$class: 'SpecificViewStorage'$class: 'SpecificViewStorage'winStorageDir
StringunixStorageDir
StringbuildFoundationBaseline
If checked, instead of creating a view on the current stream, the job will look up the current foundation baselines for the given stream and work in readonly on these baselines. If polling is enabled, the build will be triggered every time a new foundation baseline is detected on the given stream.
boolean$class: 'CloneWorkspaceSCM'$class: 'CloneWorkspaceSCM'parentJobName
Stringcriteria
String$class: 'CmvcSCM'$class: 'CmvcSCM'family
Stringbecome
Stringreleases
StringcheckoutScript
StringtrackViewReportWhereClause
String$class: 'ConfigurationRotator'$class: 'ConfigurationRotator'acrs
$class: 'ClearCaseUCM'$class: 'ClearCaseUCM'pvobName
Stringcontribute
Contribute data to a global database. Defined in the Compatibility Action Storage Plugin.
booleantargets
baselineNamebaselineName
Stringlevellevel
INITIAL, BUILT, TESTED, RELEASED, REJECTEDfixedfixed
booleanuseNewest (optional)
boolean$class: 'Git'$class: 'Git'targets
namename
Stringrepositoryrepository
Stringbranchbranch
StringcommitIdcommitId
Stringfixedfixed
booleanuseNewest (optional)
boolean$class: 'CvsProjectset'$class: 'CvsProjectset'repositories
cvsRootcvsRoot
StringpasswordRequiredpasswordRequired
booleanpasswordpassword
StringrepositoryItemsrepositoryItems
locationlocation
$class: 'BranchRepositoryLocation'$class: 'BranchRepositoryLocation'branchName
StringuseHeadIfNotFound
boolean$class: 'HeadRepositoryLocation'$class: 'HeadRepositoryLocation'$class: 'TagRepositoryLocation'$class: 'TagRepositoryLocation'tagName
StringuseHeadIfNotFound
booleanmodulesmodules
remoteNameremoteName
StringlocalNamelocalName
StringprojectsetFileNameprojectsetFileName
StringexcludedRegionsexcludedRegions
src/main/web/.*\.html src/main/web/.*\.jpeg 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. More information on regular expressions can be found here.
patternpattern
StringcompressionLevelcompressionLevel
intrepositoryBrowserrepositoryBrowser
$class: 'FishEyeCVS'$class: 'FishEyeCVS'url
String$class: 'OpenGrok'$class: 'OpenGrok'url
String$class: 'ViewCVS'$class: 'ViewCVS'url
StringcanUseUpdate
booleanusername
Stringpassword
Stringbrowser
$class: 'FishEyeCVS'$class: 'FishEyeCVS'url
String$class: 'OpenGrok'$class: 'OpenGrok'url
String$class: 'ViewCVS'$class: 'ViewCVS'url
StringskipChangeLog
booleanpruneEmptyDirectories
booleandisableCvsQuiet
booleancleanOnFailedUpdate
booleanforceCleanCopy
boolean$class: 'DarcsScm'$class: 'DarcsScm'source
StringlocalDir
Stringclean
booleanbrowser
$class: 'DarcsWeb'$class: 'DarcsWeb'url
Stringrepo
String$class: 'Darcsden'$class: 'Darcsden'url
String$class: 'DimensionsSCM'$class: 'DimensionsSCM'project
StringcredentialsType
StringuserName
Stringpassword
StringpluginServer
StringuserServer
StringkeystoreServer
StringpluginDatabase
StringuserDatabase
StringkeystoreDatabase
StringkeystorePath
StringcertificateAlias
StringcredentialsId
StringcertificatePassword
StringkeystorePassword
StringcertificatePath
StringremoteCertificatePassword
StringsecureAgentAuth
booleancanJobDelete (optional)
booleancanJobExpand (optional)
booleancanJobForce (optional)
booleancanJobNoMetadata (optional)
booleancanJobNoTouch (optional)
booleancanJobRevert (optional)
booleancanJobUpdate (optional)
booleaneol (optional)
Stringfolders (optional)
valuevalue
StringpathsToExclude (optional)
valuevalue
Stringpermissions (optional)
StringtimeZone (optional)
StringwebUrl (optional)
String$class: 'DrushMakefileSCM'$class: 'DrushMakefileSCM'makefile
Specify the content of the Makefile. Support for YAML Makefiles depends on the version of Drush you have installed.
This example will generate a vanilla Drupal 7.38:
api=2
core=7.x
projects[drupal][version]=7.38
Stringroot
String$class: 'EndevorConfiguration'$class: 'EndevorConfiguration'connectionId
StringfilterPattern
StringfileExtension
StringcredentialsId
StringtargetFolder
Stringfilesystemfilesystempath
The file path for the source code.
e.g. \\Server1\project1\src or c:\myproject\src
Note for distributed build environment, please make sure the path is accessible on remote node(s)
StringclearWorkspace
If true, the system will delete all existing files/sub-folders in workspace before checking-out. Poll changes will not be affected by this setting.
booleancopyHidden
If true, the system will copy hidden files and folders as well. Default is false.
booleanfilterSettings
includeFilterincludeFilter
booleanselectorsselectors
You can apply wildcard filter(s) when detecting changes and copying files. By default, the system will filter out hidden files, on Unix, that means files/folder starting with ".", on Windows, that means files/folders with "hidden" attribute. You may want to filter out, e.g. files with ".tmp" extension.
Note: filters are applied on both sides, source and destination (i.e. the workspace). E.g. if you filter out ".tmp" files, all ".tmp" files currently in workspace will not be removed.
wildcardwildcard
ANT style wildcard.
To include just *.java, set filter type to "Include" and type add "*.java" (without quote) in the wildcard. To exclude *.exe" and all JUnit test cases, set filter type to "Exclude" and add two wildcard, one for "*.dll" and one for "*Test*"
To exclude a directory, set filter to "**/dir_to_exclude/**"
Note: (1) the wildcard is case insensitive, (2) all backslashes (\) will be replaced with slashes (/)
String$class: 'FeatureBranchAwareMercurialSCM'$class: 'FeatureBranchAwareMercurialSCM'installation
Stringsource
Stringbranch
Stringmodules
Stringsubdir
my/sources (use forward slashes). If changing this entry, you probably want to clean the workspace first.
Stringbrowser
$class: 'FishEye'$class: 'FishEye'url
String$class: 'GoogleCode'$class: 'GoogleCode'url
String$class: 'HgWeb'$class: 'HgWeb'url
String$class: 'Kallithea'$class: 'Kallithea'url
String$class: 'KilnHG'$class: 'KilnHG'url
String$class: 'RhodeCode'$class: 'RhodeCode'url
String$class: 'RhodeCodeLegacy'$class: 'RhodeCodeLegacy'url
String$class: 'ScmManager'$class: 'ScmManager'url
http://YOURSCMMANAGER/scm/repo/NAMESPACE/NAME/).
Stringclean
booleanbranchPattern
String$class: 'GeneXusServerSCM'$class: 'GeneXusServerSCM'gxInstallationId
StringserverURL
StringcredentialsId
Credentials to use when authenticating to the GeneXus Server.
Select the credentials you want to use or click "Add" to enter a new user/password pair.
StringkbName
StringkbVersion
Name of the Version that will be selected when creating a local copy of the Knowledge Base.
If you leave it blank the 'Trunk' version will be selected by default.
StringlocalKbPath
Path to the local Knowledge Base to use as working copy.
If you leave it blank the default ${WORKSPACE}\KBname will apply.
StringlocalKbVersion
Name of the Version in the local Knowledge Base that is linked to the Version in the server.
If you leave it blank the 'Trunk' version will be selected by default.
StringkbDbServerInstance
StringkbDbCredentialsId
Credentials to use when to connecting to SQL Server.
Select "none" for Windows Authentication.
StringkbDbName
Name of the SQL Server database used for the local Knowledge Base.
Leave it blank to use the default database name.
StringkbDbInSameFolder
Create the database files in the same folder as the Knowledge Base when checking out. Default is 'true'.
If kbDbInSameFolder is true or not set, then the database files will be created in the same folder as the Knowledge Base. If kbDbInSameFolder is false, then the database files will be created in the default folder configured for the SQL Server at kbDbServerInstance (optional).
boolean$class: 'GitSCM'$class: 'GitSCM'The git plugin provides fundamental git operations for Jenkins projects. It can poll, fetch, checkout, and merge contents of git repositories.
The git plugin provides an SCM implementation to be used with the Pipeline SCM checkout step. The Pipeline Syntax Snippet Generator guides the user to select git plugin checkout options and provides online help for each of the options.
userRemoteConfigs
${SUPER_PROJECT_URL}/${SUBMODULE}, rather than relying on information from .gitmodules.urlurl
git clone command.
Stringnamename
origin, to uniquely identify this repository among other remote repositories. This is the same "name" that you use in your git remote command. If left empty, Jenkins will generate unique names for you.
You normally want to specify this when you have multiple remote repositories.
Stringrefspecrefspec
git fetch, which retrieves all the branch heads as remotes/REPOSITORYNAME/BRANCHNAME. This default behaviour is OK for most cases.
In other words, the default refspec is "+refs/heads/*:refs/remotes/REPOSITORYNAME/*" where REPOSITORYNAME is the value you specify in the above "name of repository" textbox.
When do you want to modify this value? A good example is when you want to just retrieve one branch. For example, +refs/heads/master:refs/remotes/origin/master would only retrieve the master branch and nothing else.
The plugin uses a default refspec for its initial fetch, unless the "Advanced Clone Option" is set to honor refspec. This keeps compatibility with previous behavior, and allows the job definition to decide if the refspec should be honored on initial clone.
Multiple refspecs can be entered by separating them with a space character. +refs/heads/master:refs/remotes/origin/master +refs/heads/develop:refs/remotes/origin/develop retrieves the master branch and the develop branch and nothing else.
See the refspec definition in Git user manual for more details.
StringcredentialsIdcredentialsId
Stringbranches
namename
Specify the branches if you'd like to track a specific branch in a repository. If left blank, all branches will be examined for changes and built.
The safest way is to use the refs/heads/<branchName> syntax. This way the expected branch is unambiguous.
If your branch name has a / in it make sure to use the full reference above. When not presented with a full path the plugin will only use the part of the string right of the last slash. Meaning foo/bar will actually match bar.
If you use a wildcard branch specifier, with a slash (e.g. release/), you'll need to specify the origin repository in the branch names to make sure changes are picked up. So e.g. origin/release/
Possible options:
<branchName>refs/heads/<branchName>.master, feature1, ... refs/heads/<branchName>refs/heads/master, refs/heads/feature1/master, ... <remoteRepoName>/<branchName>refs/heads/<branchName>.origin/master remotes/<remoteRepoName>/<branchName>remotes/origin/master refs/remotes/<remoteRepoName>/<branchName>refs/remotes/origin/master <tagName>refs/tags/<tagName> instead.git-2.3.0 refs/tags/<tagName>refs/tags/git-2.3.0 <commitId>5062ac843f2b947733e6a3b105977056821bd352, 5062ac84, ... ${ENV_VARIABLE}${TREEISH}, refs/tags/${TAGNAME}, ... <Wildcards>REPOSITORYNAME/BRANCH. In addition, BRANCH is recognized as a shorthand of */BRANCH, '*' is recognized as a wildcard, and '**' is recognized as wildcard that includes the separator '/'. Therefore, origin/branches* would match origin/branches-foo but not origin/branches/foo, while origin/branches** would match both origin/branches-foo and origin/branches/foo. :<regular expression>:regexp. Regular expression syntax in branches to build will only build those branches whose names match the regular expression.:^(?!(origin/prefix)).*
origin or origin/master or origin/featureorigin/prefix or origin/prefix_123 or origin/prefix-abc:origin/release-\d{8}
origin/release-20150101origin/release-2015010 or origin/release-201501011 or origin/release-20150101-something:^(?!origin/master$|origin/develop$).*
origin/branch1 or origin/branch-2 or origin/master123 or origin/develop-123origin/master or origin/developStringbrowser
$class: 'AssemblaWeb'$class: 'AssemblaWeb'repoUrl
String$class: 'BacklogGitRepositoryBrowser'$class: 'BacklogGitRepositoryBrowser'repoName
StringrepoUrl
StringbitbucketServerbitbucketServerrepoUrl
String$class: 'BitbucketWeb'$class: 'BitbucketWeb'repoUrl
String$class: 'CGit'$class: 'CGit'repoUrl
String$class: 'FisheyeGitRepositoryBrowser'$class: 'FisheyeGitRepositoryBrowser'repoUrl
String$class: 'GitBlitRepositoryBrowser'$class: 'GitBlitRepositoryBrowser'repoUrl
StringprojectName
String$class: 'GitBucketBrowser'$class: 'GitBucketBrowser'url
String$class: 'GitLab'$class: 'GitLab'repoUrl
Stringversion (optional)
String$class: 'GitLabBrowser'$class: 'GitLabBrowser'https://gitLab.example.com then the URL for bob's skunkworks project might be https://gitLab.example.com/bob/skunkworks.
projectUrl
https://gitLab.example.com then the URL for bob's skunkworks project might be https://gitLab.example.com/bob/skunkworks
String$class: 'GitList'$class: 'GitList'repoUrl
String$class: 'GitWeb'$class: 'GitWeb'repoUrl
String$class: 'GiteaBrowser'$class: 'GiteaBrowser'repoUrl
https://gitea.example.com then the URL for bob's skunkworks project repository might be https://gitea.example.com/bob/skunkworks
String$class: 'GithubWeb'$class: 'GithubWeb'repoUrl
String$class: 'Gitiles'$class: 'Gitiles'repoUrl
String$class: 'GitoriousWeb'$class: 'GitoriousWeb'repoUrl
String$class: 'GogsGit'$class: 'GogsGit'repoUrl
String$class: 'KilnGit'$class: 'KilnGit'repoUrl
String$class: 'Phabricator'$class: 'Phabricator'repoUrl
Stringrepo
String$class: 'RedmineWeb'$class: 'RedmineWeb'repoUrl
String$class: 'RhodeCode'$class: 'RhodeCode'repoUrl
String$class: 'ScmManagerGitRepositoryBrowser'$class: 'ScmManagerGitRepositoryBrowser'repoUrl
String$class: 'Stash'$class: 'Stash'repoUrl
String$class: 'TFS2013GitRepositoryBrowser'$class: 'TFS2013GitRepositoryBrowser'repoUrl
If TFS is also used as the repository server, this can usually be left blank.
String$class: 'TracGitRepositoryBrowser'$class: 'TracGitRepositoryBrowser'$class: 'TuleapBrowser'$class: 'TuleapBrowser'repositoryUrl
String$class: 'ViewGitWeb'$class: 'ViewGitWeb'repoUrl
StringprojectName
StringgitTool
Absolute path to the git executable.
This is different from other Jenkins tool definitions. Rather than providing the directory that contains the executable, you must provide the complete path to the executable. Setting '/usr/bin/git' would be correct, while setting '/usr/bin/' is not correct.
Stringextensions
Extensions add new behavior or modify existing plugin behavior for different uses. Extensions help users more precisely tune plugin behavior to meet their needs.
Extensions include:
$class: 'AuthorInChangelog'$class: 'AuthorInChangelog'$class: 'BuildChooserSetting'$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: 'AlternativeBuildChooser'$class: 'AncestryBuildChooser'$class: 'AncestryBuildChooser'maximumAgeInDays
intancestorCommitSha1
String$class: 'DefaultBuildChooser'$class: 'DefaultBuildChooser'$class: 'DeflakeGitBuildChooser'$class: 'DeflakeGitBuildChooser'$class: 'GerritTriggerBuildChooser'$class: 'GerritTriggerBuildChooser'$class: 'InverseBuildChooser'$class: 'InverseBuildChooser'$class: 'BuildSingleRevisionOnly'$class: 'BuildSingleRevisionOnly'$class: 'ChangelogToBranch'$class: 'ChangelogToBranch'options
compareRemotecompareRemote
origin, that contains the branch you specify below.
StringcompareTargetcompareTarget
String$class: 'CheckoutOption'$class: 'CheckoutOption'timeout
int$class: 'CleanBeforeCheckout'$class: '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 (optional)
.git directories.
boolean$class: 'CleanCheckout'$class: 'CleanCheckout'.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 (optional)
.git directories.
boolean$class: 'CloneOption'$class: 'CloneOption'shallow
booleannoTags
booleanreference
Stringtimeout
intdepth (optional)
inthonorRefspec (optional)
boolean$class: 'CodeCommitURLHelper'$class: 'CodeCommitURLHelper'credentialId
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.
StringrepositoryName
String$class: 'DisableRemotePoll'$class: 'DisableRemotePoll'$class: 'ExcludeFromChangeSet'$class: 'ExcludeFromChangeSet'$class: 'ExcludeFromPoll'$class: 'ExcludeFromPoll'$class: 'GitLFSPull'$class: 'GitLFSPull'$class: 'GitSCMChecksExtension'$class: 'GitSCMChecksExtension'verboseConsoleLog (optional)
boolean$class: 'GitSCMStatusChecksExtension'$class: 'GitSCMStatusChecksExtension'name (optional)
Stringskip (optional)
booleanskipProgressUpdates (optional)
booleansuppressLogs (optional)
booleanunstableBuildNeutral (optional)
boolean$class: 'GitTagMessageExtension'$class: 'GitTagMessageExtension'useMostRecentTag (optional)
boolean$class: 'IgnoreNotifyCommit'$class: 'IgnoreNotifyCommit'$class: 'LocalBranch'$class: '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'$class: 'MessageExclusion'excludedMessage
.*\[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.
String$class: 'PathRestriction'$class: 'PathRestriction'includedRegions
myapp/src/main/web/.*\.html
myapp/src/main/web/.*\.jpeg
myapp/src/main/web/.*\.gif
The 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.
StringexcludedRegions
myapp/src/main/web/.*\.html
myapp/src/main/web/.*\.jpeg
myapp/src/main/web/.*\.gif
The example above illustrates that if only html/jpeg/gif files have been committed to the SCM a build will not occur.
String$class: 'PerBuildTag'$class: 'PerBuildTag'$class: 'PreBuildMerge'$class: 'PreBuildMerge'options
mergeTargetmergeTarget
master.
StringfastForwardModefastForwardMode (optional)
FF, FF_ONLY, NO_FFmergeRemotemergeRemote (optional)
origin, that contains the branch you specify below. If left blank, it'll default to the name of the first repository configured above.
StringmergeStrategymergeStrategy (optional)
DEFAULT, RESOLVE, RECURSIVE, OCTOPUS, OURS, SUBTREE, RECURSIVE_THEIRSpretestedIntegrationpretestedIntegrationgitIntegrationStrategy
accumulatedaccumulatedsquashsquashintegrationBranch
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>
StringrepoName
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
String$class: 'PruneStaleBranch'$class: 'PruneStaleBranch'pruneTagspruneTagspruneTags
boolean$class: 'RelativeTargetDirectory'$class: 'RelativeTargetDirectory'relativeTargetDir
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.
String$class: 'ScmName'$class: 'ScmName'Unique name for this SCM. Needed when using Git within the Multi SCM plugin.
name
String$class: 'SparseCheckoutPaths'$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
pathpath
String$class: 'SubmoduleOption'$class: 'SubmoduleOption'disableSubmodules
booleanrecursiveSubmodules
booleantrackingSubmodules
booleanreference
git init --bare git remote add SubProject1 https://gitrepo.com/subproject1 git remote add SubProject2 https://gitrepo.com/subproject2 git fetch --all
Stringtimeout
intparentCredentials
booleandepth (optional)
intshallow (optional)
booleanthreads (optional)
int$class: 'UserExclusion'$class: 'UserExclusion'excludedUsers
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.
String$class: 'UserIdentity'$class: 'UserIdentity'name
If given, "GIT_COMMITTER_NAME=[this]" and "GIT_AUTHOR_NAME=[this]" are set for builds. This overrides whatever is in the global settings.
Stringemail
If given, "GIT_COMMITTER_EMAIL=[this]" and "GIT_AUTHOR_EMAIL=[this]" are set for builds. This overrides whatever is in the global settings.
String$class: 'WipeWorkspace'$class: 'WipeWorkspace'doGenerateSubmoduleConfigurations (optional)
Removed facility that was intended to test combinations of git submodule versions. Removed in git plugin 4.6.0. Ignores the user provided value and always uses false as its value.
booleansubmoduleCfg (optional)
Removed facility that was intended to test combinations of git submodule versions. Removed in git plugin 4.6.0. Ignores the user provided value(s) and always uses empty values.
submoduleNamesubmoduleName
Removed in git plugin 4.6.0.
Stringbranchesbranches
Removed in git plugin 4.6.0.
String$class: 'HarvestSCM'$class: 'HarvestSCM'broker
StringpasswordFile
StringuserId
Stringpassword
StringprojectName
Stringstate
StringviewPath
StringclientPath
StringprocessName
StringrecursiveSearch
StringuseSynchronize
booleanextraOptions
String$class: 'IntegritySCM'$class: 'IntegritySCM'serverConfig
StringconfigPath
StringconfigurationName
StringCPBasedMode (optional)
booleanalternateWorkspace (optional)
Stringbrowser (optional)
$class: 'IntegrityWebUI'$class: 'IntegrityWebUI'url
StringcheckoutThreadPoolSize (optional)
intcheckoutThreadTimeout (optional)
intcheckpointBeforeBuild (optional)
booleancheckpointLabel (optional)
StringcleanCopy (optional)
booleandeleteNonMembers (optional)
booleanexcludeList (optional)
StringfetchChangedWorkspaceFiles (optional)
booleanincludeList (optional)
StringlineTerminator (optional)
StringlocalClient (optional)
booleanpassword (optional)
StringrestoreTimestamp (optional)
booleansandboxScope (optional)
StringskipAuthorInfo (optional)
booleanuserName (optional)
String$class: 'IspwConfiguration'$class: 'IspwConfiguration'connectionId
StringcredentialsId
StringserverConfig
StringserverStream
StringserverApplication
StringserverLevel
StringlevelOption
StringcomponentType
StringfolderName
StringispwDownloadAll
booleantargetFolder
StringispwDownloadIncl
booleanispwDownloadWithCompileOnly
boolean$class: 'IspwContainerConfiguration'$class: 'IspwContainerConfiguration'connectionId
StringcredentialsId
StringserverConfig
StringcontainerName
StringcontainerType
StringserverLevel
StringcomponentType
StringispwDownloadAll
booleantargetFolder
StringispwDownloadIncl
boolean$class: 'MercurialSCM'$class: 'MercurialSCM'source
Stringbrowser (optional)
$class: 'FishEye'$class: 'FishEye'url
String$class: 'GoogleCode'$class: 'GoogleCode'url
String$class: 'HgWeb'$class: 'HgWeb'url
String$class: 'Kallithea'$class: 'Kallithea'url
String$class: 'KilnHG'$class: 'KilnHG'url
String$class: 'RhodeCode'$class: 'RhodeCode'url
String$class: 'RhodeCodeLegacy'$class: 'RhodeCodeLegacy'url
String$class: 'ScmManager'$class: 'ScmManager'url
http://YOURSCMMANAGER/scm/repo/NAMESPACE/NAME/).
Stringclean (optional)
booleancredentialsId (optional)
StringdisableChangeLog (optional)
booleaninstallation (optional)
Stringmodules (optional)
Stringrevision (optional)
default branch.)
StringrevisionType (optional)
BRANCH, TAG, CHANGESET, REVSETsubdir (optional)
my/sources (use forward slashes). If changing this entry, you probably want to clean the workspace first.
String$class: 'MergeBotUpdater'$class: 'MergeBotUpdater'$class: 'MultiSCM'$class: 'MultiSCM'nonenone$class: 'OpenShiftImageStreams'$class: 'OpenShiftImageStreams'imageStreamName
Stringtag
StringapiURL
Stringnamespace
StringauthToken
Stringverbose
String$class: 'PdsConfiguration'$class: 'PdsConfiguration'connectionId
StringfilterPattern
StringfileExtension
StringcredentialsId
StringtargetFolder
Stringperforceperforcecredential
Select the appropriate credential for the Perforce connection. Perforce Credentials are defined in the Jenkins Credentials plugin here.
There are two types:
Stringworkspace
Select the appropriate Perforce workspace behaviour from the list. Not all modes will suit all Jenkins Job build types.
There are five types:
manualSpecmanualSpeccharset
The character set used by Jenkins when syncing files from the Perforce server. This should be set to 'none' unless connected to a Unicode enabled Perforce server.
StringpinHost
booleanname
Specify the name of the Perforce workspace to be used as the Jenkins build workspace. If the workspace does not yet exist, the configuration will be saved in Jenkins; the workspace is created only when it is to be used. If the workspace exists and you are connected to a Perforce server the auto-text fill should list suitable workspaces; updates are only applied when the workspace is used.
Stringspec
allwriteallwrite
booleanclobberclobber
booleancompresscompress
booleanlockedlocked
booleanmodtimemodtime
booleanrmdirrmdir
booleanstreamNamestreamName
Stringlineline
Set line-ending character(s) for client text files.
linefeed: UNIX style.
carriage return: Macintosh style. (obsolete)
carriage return-linefeed: Windows style.
hybrid: writes UNIX style but reads UNIX, Mac or Windows style.
Stringviewview
Lines to map depot files into the client workspace.
The variable ${P4_CLIENT} will expand to the client name, for example, a simple mapping:
//depot/... //${P4_CLIENT}/...
Maps files in the depot to files in your client workspace. Defines the files that you want in your client workspace and specifies where you want them to reside. The default view maps all depot files onto the client. See 'p4 help views' for view syntax. A new view takes effect on the next 'p4 sync'.
To support migration from the old Perforce plugin, a View Mapping can be inserted from a file in Perforce. Add the depot path to the "View Mappings" field Prefix "@" (this only applies to the "Manual" Workspace behaviour).
StringchangeViewchangeView
Stringtypetype
Type of client: writeable/readonly/partitioned/graph
By default all clients are 'writeable', certain clients are short lived and perform long sync and build cycles. Over time these build clients can fragment the 'db.have' table which is used to track what files a client has synced. Setting a type of 'readonly' gives the client its own personal 'db.have' database table. A 'readonly' client cannot 'edit' or 'submit' files, however for build automation this is not usually a requirement and the performance tradeoff is worth considering if your build automation is causing issues with the 'db.have' table. This option requires that an administrator has first configured the 'client.readonly.dir' setting. If it is necessary to submit changes as part of your build, you may specify a 'partitioned' client: like a 'reaonly' client, this type also has a separate 'db.have' table under the 'client.readonly.dir' directory, but allows journalled 'edit' and 'submit' of files.
StringserverIDserverID
Stringbackupbackup
Client's participation in backup enable/disable. If not specified backup of a writable client defaults to enabled.
booleancleanup
booleansyncID (optional)
StringspecFileSpecspecFileSpeccharset
The character set used by Jenkins when syncing files from the Perforce server. This should be set to 'none' unless connected to a Unicode enabled Perforce server.
StringpinHost
booleanname
Specify the name of the Perforce workspace to be used as the Jenkins build workspace. If the workspace does not yet exist, the configuration will be saved in Jenkins; the workspace is created only when it is to be used. If the workspace exists and you are connected to a Perforce server the auto-text fill should list suitable workspaces; updates are only applied when the workspace is used.
StringspecPath
StringsyncID (optional)
StringstaticSpecstaticSpeccharset
The character set used by Jenkins when syncing files from the Perforce server. This should be set to 'none' unless connected to a Unicode enabled Perforce server.
StringpinHost
booleanname
Specify the name of an existing workspace in Perforce to be used as the Jenkins build workspace. If connected to a Perforce server the auto-text fill should list suitable workspaces
StringsyncID (optional)
StringstreamSpecstreamSpeccharset
The character set used by Jenkins when syncing files from the Perforce server. This should be set to 'none' unless connected to a Unicode enabled Perforce server.
StringpinHost
booleanstreamName
Specify the full Perforce depot path for the given stream. If connected to a Perforce server the auto-text fill should list possible streams.
For example: //stream-depot/main-streamStringformat
Jenklin slave nodes must each use a unique Perforce workspace. The format string configures the workspace name by substituting the specified variables: (at least one variable must be used)
Variables can be taken from the Jenkins Environment or Parameterized builds
StringsyncID (optional)
StringtemplateSpectemplateSpeccharset
The character set used by Jenkins when syncing files from the Perforce server. This should be set to 'none' unless connected to a Unicode enabled Perforce server.
StringpinHost
booleantemplateName
Specify the name of an existing workspace in Perforce used to create or update a Jenkins build workspace. If connected to a Perforce server the auto-text fill should list suitable workspaces
Stringformat
Jenklin slave nodes must each use a unique Perforce workspace. The format string configures the workspace name by substituting the specified variables: (at least one variable must be used)
Variables can be taken from the Jenkins Environment or Parameterized builds
StringsyncID (optional)
Stringfilter
latestlatestlatestChange
booleanpathFilterpathFilterpath
Changes can be filtered to not trigger a build; if all the files within a change match the specified path, the build is filtered.
For example, with a Filter of " //depot/main/tests ":
Case A (change will be filtered):
Files:
//depot/main/tests/index.xml //depot/main/tests/001/test.xml //depot/main/tests/002/test.xml Case B (change will not be filtered, as build.xml is outside of the filter):
Files:
//depot/main/src/build.xml //depot/main/tests/004/test.xml //depot/main/tests/005/test.xml This is not Perforce syntax. Use of ... and * patterns are not supported. Only paths to directories are supported.
StringviewPatternviewPatternpatternText
Changes can be filtered to not trigger a build; if none of the files within a change match a Java pattern (regular expression) listed, the build is filtered.
For example, with the following regular expressions:
//depot/main/tests.*
//depot/main/src/.*\.cpp
//depot/main/build/.*(?:\.rb|\.py|\.bat|Jenkinsfile)
//depot/main/lib/(?!Lib1|Lib2).*
Case A (change will not be filtered, as these files match our first pattern on "tests"):
Files:
//depot/main/tests/CONTRIUBTING.md //depot/main/tests/001/index.xml Case B (Be careful with incomplete file paths! Change will NOT be filtered,
as this file matches a pattern which was likely intended as describing a "tests/" directory.)
Files:
//depot/main/tests.doc Case C (change will NOT be filtered, as all files match our fourth pattern looking for script files in 'build/'):
Files:
//depot/main/build/rbs/deploy_server.rb //depot/main/build/deploy/deploy.bat //depot/main/build/Jenkinsfile Case D (change will be filtered, as no file matches our second pattern for ".cpp" files under "main/src"):
Files:
//depot/main/src/howto.doc //depot/main/src/oldmain.c //depot/main/src/art/splash.bmp //depot/main/src/bt/funnelcake.php Case E (change will be filtered. Lib1 is included in a negative lookahead, and thus is excluded.)
Files:
//depot/main/lib/Lib1/build.xml StringcaseSensitive
booleanincrementalincrementalperChange
When enabled, only the one, oldest changelist returned by polling is built.
If P4_INCREMENTAL environment variable (or build parameter) is set to "false", polling per change is ignored and all changelists are built.
booleanuserFilteruserFilteruser
Changes can be filtered to not trigger a build; if the owner of a change matches the specified name, the build is filtered.
StringviewFilterviewFilterviewMask
Changes can be filtered to not trigger a build; if none of the files within a change are contained in the view mask, the build is filtered.
For example, with a View Mask Filter of:
//depot/main/tests
-//depot/main/tests/001
Case A (change will not be filtered, as index.xml is in the view mask):
Files:
//depot/main/tests/index.xml //depot/main/tests/001/test.xml Case B (change will not be filtered, as index.xml is in the view mask):
Files:
//depot/main/test/index.xml //depot/main/src/build.xml Case C (change will be filtered, as no file is in the view mask):
Files:
//depot/main/src/build.xml Case D (change will be filtered, as no file is in the view mask):
Files:
//depot/main/src/build.xml //depot/main/tests/001/test.xml Stringpopulate
Perforce will populate the workspace with the file revisions needed for the build. The different options effect the way the workspace is cleaned and the file revisions are updated.
There are three options:
autoCleanautoCleanreplace
Perforce will check out and overwrite any depot files which are either missing from workspace, or have been modified locally.
booleandelete
Perforce will delete any local files that are not in the depot.
booleantidy
booleanmodtime
booleanquiet
Enables the -q flag for all applicable Perforce operations. Summary details will still be displayed.
booleanpin
When a build is triggered by Polling, Build Now or an external Action, the workspace will sync only to the specified label. Any other specified change or label will be ignored.
Supports variable expansion e.g. ${VAR}. If 'now' is used, or a variable that expands to 'now', then the latest change is used (within the scope of the workspace view).
Stringparallel
enableenable
booleanpathpath
Stringthreadsthreads
Stringminfilesminfiles
Stringminbytesminbytes
StringpreviewOnlypreviewOnlyquiet
Enables the -q flag for all applicable Perforce operations. Summary details will still be displayed.
booleanpin
StringflushOnlyflushOnlyquiet
booleanpin
When a build is triggered by Polling, Build Now or an external Action, the workspace will flush only to the specified label or changelist number. Any other specified change or label will be ignored.
Supports variable expansion e.g. ${VAR}. If 'now' is used, or a variable that expands to 'now', then the latest change is used (within the scope of the workspace view).
StringforceCleanforceCleanhave
booleanquiet
Enables the -q flag for all applicable Perforce operations. Summary details will still be displayed.
booleanpin
When a build is triggered by Polling, Build Now or an external Action, the workspace will sync only to the specified label. Any other specified change or label will be ignored.
Supports variable expansion e.g. ${VAR}. If 'now' is used, or a variable that expands to 'now', then the latest change is used (within the scope of the workspace view).
Stringparallel
enableenable
booleanpathpath
Stringthreadsthreads
Stringminfilesminfiles
Stringminbytesminbytes
StringgraphCleangraphCleanquiet
Enables the -q flag for all applicable Perforce operations. Summary details will still be displayed.
booleanpin
When a build is triggered by Polling, Build Now or an external Action, the workspace will sync only to the specified label. Any other specified change or label will be ignored.
Supports variable expansion e.g. ${VAR}. If 'now' is used, or a variable that expands to 'now', then the latest change is used (within the scope of the workspace view).
Stringparallel
enableenable
booleanpathpath
Stringthreadsthreads
Stringminfilesminfiles
Stringminbytesminbytes
StringsyncOnlysyncOnlyrevert
booleanhave
booleanforce
booleanmodtime
booleanquiet
Enables the -q flag for all applicable Perforce operations. Summary details will still be displayed.
booleanpin
When a build is triggered by Polling, Build Now or an external Action, the workspace will sync only to the specified label. Any other specified change or label will be ignored.
Supports variable expansion e.g. ${VAR}. If 'now' is used, or a variable that expands to 'now', then the latest change is used (within the scope of the workspace view).
Stringparallel
enableenable
booleanpathpath
Stringthreadsthreads
Stringminfilesminfiles
Stringminbytesminbytes
Stringbrowser
fishEyefishEyeurl
StringrootModule
StringopenGrokopenGrokurl
StringdepotPath
StringprojectName
Stringp4Webp4Weburl
Stringswarmswarmurl
String$class: 'PlasticSCM'$class: 'PlasticSCM'selector
Stringcleanup
MINIMAL, STANDARD, FULL, DELETEuseMultipleWorkspaces
booleanadditionalWorkspaces
selectorselector
Stringcleanupcleanup
MINIMAL, STANDARD, FULL, DELETEdirectorydirectory
Stringdirectory
String$class: 'ProxySCM'$class: 'ProxySCM'projectName
String$class: 'PvcsScm'$class: 'PvcsScm'projectRoot
StringarchiveRoot
StringchangeLogPrefixFudge
StringmoduleDir
StringloginId
StringpvcsWorkspace
StringpromotionGroup
StringversionLabel
StringcleanCopy
boolean$class: 'RTCScm'$class: 'RTCScm'overrideGlobal
The build toolkit location and Jazz Repository connection can be defined globally or overridden. If not defined globally, it must be overridden.
booleanbuildTool
The RTC build toolkit to use when performing builds. The toolkits available are defined in the system configuration (with the other tools like Ant and Java). The build toolkit is also necessary on the Master for polling and validating the job configuration unless the "Avoid using build toolkit on Master" option is enabled.
StringserverURI
The Jazz Repository connection URI for the Rational Team Concert (RTC) server
Stringtimeout
The timeout period in seconds for Jazz repository requests made during the build.
intuserId
The build user id. Either credentials or a user id and password information should be supplied.
Stringpassword
The Jazz Repository password for the build user. The use of a password is not secure, it can be easily discovered by anyone with access to this page. Credentials, a password file or a password should be supplied.
class hudson.util.SecretpasswordFile
The path to the file containing the obfuscated Jazz Repository password for the build user. Credentials, a password file or a password should be supplied.
StringcredentialsId
Credentials to use for the build user. A user name and password credential for the Jazz Repository should be configured.
StringbuildType
valuevalue
StringbuildDefinitionbuildDefinition
StringbuildWorkspacebuildWorkspace
StringbuildSnapshotbuildSnapshot
StringbuildStreambuildStream
StringacceptBeforeLoadacceptBeforeLoad (optional)
booleanaddLinksToWorkItemsaddLinksToWorkItems (optional)
booleanbuildSnapshotContextbuildSnapshotContext (optional)
snapshotOwnerTypesnapshotOwnerType
StringprocessAreaOfOwningStreamprocessAreaOfOwningStream
StringowningStreamowningStream
StringowningWorkspaceowningWorkspace
StringclearLoadDirectoryclearLoadDirectory (optional)
booleancomponentLoadConfigcomponentLoadConfig (optional)
StringcomponentsToExcludecomponentsToExclude (optional)
StringcreateFoldersForComponentscreateFoldersForComponents (optional)
booleancurrentSnapshotOwnerTypecurrentSnapshotOwnerType (optional)
StringcustomizedSnapshotNamecustomizedSnapshotName (optional)
StringgenerateChangelogWithGoodBuildgenerateChangelogWithGoodBuild (optional)
booleanloadDirectoryloadDirectory (optional)
StringloadPolicyloadPolicy (optional)
StringoverrideDefaultSnapshotNameoverrideDefaultSnapshotName (optional)
booleanpathToLoadRuleFilepathToLoadRuleFile (optional)
StringpollingOnlypollingOnly (optional)
booleanpollingOnlyDatapollingOnlyData (optional)
snapshotUUIDsnapshotUUID
StringprocessAreaprocessArea (optional)
StringuseDynamicLoadRulesuseDynamicLoadRules (optional)
booleanavoidUsingToolkit
Where possible avoid using the Build toolkit when performing tasks on the Master. This is still in the experimental stage. You will require an RTC 5.0 server which provides some of the services used.
The Build toolkit will not be used when polling RTC and terminating the RTC Build. The toolkit is still required though. It is used for other configuration tasks on the Master (i.e. validating the connection to RTC, the build definition or workspace). It is also used for checkout tasks typically performed on agent nodes.
boolean$class: 'SCLMSCM'$class: 'SCLMSCM'server
Stringport
intcredentialsId
StringJESINTERFACELEVEL1
booleanFTPActiveMode
booleanproject
Stringalternate
Stringgroup
Stringtypes
StringcustJobStep
booleanJobStep
StringcustJobHeader
booleanJobHeader
String$class: 'ShellScriptSCM'$class: 'ShellScriptSCM'checkoutShell
StringpollingShell
StringuseCheckoutForPolling
boolean$class: 'SimpleClearCaseSCM'$class: 'SimpleClearCaseSCM'loadRules
/vobs/structure/package/product/subproduct
/vobs/structure/package/product/anothersubproduct.
Stringviewname
Stringbranch
Stringfilter
boolean$class: 'StarTeamSCM'$class: 'StarTeamSCM'hostname
Stringport
intprojectname
Stringviewname
Stringfoldername
Stringusername
Stringpassword
Stringlabelname
Stringpromotionstate
boolean$class: 'StoreSCM'$class: 'StoreSCM'scriptName
StringrepositoryName
Stringpundles
pundleTypepundleType
PACKAGE, BUNDLEnamename
StringversionRegex
StringminimumBlessingLevel
StringgenerateParcelBuilderInputFile
booleanparcelBuilderInputFilename
String$class: 'SubversionSCM'$class: 'SubversionSCM'locations
remoteremote
StringcredentialsIdcredentialsId
Stringlocallocal
.) may be used to check out the project directly into the workspace rather than into a subdirectory.
StringdepthOptiondepthOption
StringignoreExternalsOptionignoreExternalsOption
svn:externals to gain read access to the entire Subversion repository. This can happen if you follow the normal practice of giving Jenkins credentials with read access to the entire Subversion repository. You will also need to provide the credentials to use when checking/polling out the svn:externals using the Additional Credentials option.
booleancancelProcessOnExternalsFailcancelProcessOnExternalsFail
booleanworkspaceUpdater
$class: 'CheckoutUpdater'$class: 'CheckoutUpdater'$class: 'NoopUpdater'$class: 'NoopUpdater'$class: 'UpdateUpdater'$class: 'UpdateUpdater'$class: 'UpdateWithCleanUpdater'$class: 'UpdateWithCleanUpdater'$class: 'UpdateWithRevertUpdater'$class: 'UpdateWithRevertUpdater'browser
$class: 'Assembla'$class: 'Assembla'spaceName
String$class: 'BacklogRepositoryBrowser'$class: 'BacklogRepositoryBrowser'url
When no value is set, project of "Backlog URL" set above is used.
String$class: 'Phabricator'$class: 'Phabricator'url
Stringrepo
String$class: 'PolarionRepositoryBrowser'$class: 'PolarionRepositoryBrowser'url
Stringlocation
String$class: 'RedmineRepositoryBrowser'$class: 'RedmineRepositoryBrowser'repositoryId
String$class: 'SVNWeb'$class: 'SVNWeb'url
String$class: 'ScmManagerSvnRepositoryBrowser'$class: 'ScmManagerSvnRepositoryBrowser'repoUrl
String$class: 'TeamForge'$class: 'TeamForge'connectionFactory
urlurl
This should be the URL of your CollabNet TeamForge site. It should be of the form 'https://forge.collab.net'.
Stringusernameusername
The user who will upload the files.
Stringpasswordpassword
The password for the user specified above. If incorrectly given, the login to the CollabNet TeamForge server will fail.
Stringproject
Stringrepo
String$class: 'TracRepositoryBrowser'$class: 'TracRepositoryBrowser'$class: 'ViewVCRepositoryBrowser'$class: 'ViewVCRepositoryBrowser'url
Stringlocation
String$class: 'VisualSVN'$class: 'VisualSVN'url
StringexcludedRegions
/trunk/myapp/src/main/web/.*\.html /trunk/myapp/src/main/web/.*\.jpeg /trunk/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. More information on regular expressions can be found here.
StringexcludedUsers
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.
StringexcludedRevprop
StringexcludedCommitMessages
StringincludedRegions
/trunk/myapp/c/library1/.* /trunk/myapp/c/library2/.*If /trunk/myapp is checked out, the build will only occur when there are changes to either the c/library1 and c/library2 subtrees. If there are also excluded regions specified, then a file is not ignored when it is in the included list and not in the excluded list. More information on regular expressions can be found here.
StringignoreDirPropChanges
booleanfilterChangelog
booleanadditionalCredentials
If there are additional credentials required in order to obtain a complete checkout of the source, they can be provided here.
The realm is how the repository self-identifies to a client. It usually has the following format:
<proto://host:port> Realm Name
proto is the protocol, e.g. http or svn.host is the host how it's accessed by Jenkins, e.g. as IP address 192.168.1.100, host name svnserver, or host name and domain svn.example.org.port is the port, even if not explicitly specified. By default, this is 80 for HTTP, 443 for HTTPS, 3690 for the svn protocol.Realm Name is how the repository self-identifies. Common options include VisualSVN Server, Subversion Authentication or the UUID of the repository.To find out the realm, you could do any of the following:
Realm Name (see above) in the authentication dialog.svn program.
svn info https://svnserver/repo and it will tell you the realm when asking you to enter a password, e.g.: Authentication realm: <svn://svnserver:3690> VisualSVN Server.~/.subversion/auth/svn/simple; it will be two lines below the line svn:realmstring.svn+ssh protocol, the realm has the format username@svn+ssh://host:port – note that the username is before the svn+ssh:// (unlike the URL used for normal SVN operations), and that there are no angle brackets and no realm name. For this protocol the default port is 22.Make sure to enter the realm exactly as shown, starting with a < (except for repositories accessed via svn+ssh – see above).
realmrealm
<scheme://hostname(:port)> name, while for servers accessed via svn+ssh it is of the format (username@)svn+ssh://hostname(:port).
StringcredentialsIdcredentialsId
StringquietOperation
Mimics subversion command line --quiet parameter for check out / update operations to help keep the output shorter. Prints nothing, or only summary information.
boolean$class: 'SurroundSCM'$class: 'SurroundSCM'server
StringserverPort
Stringbranch
Stringrepository
StringcredentialsId
StringrsaKey (optional)
rsaKeyFileIdrsaKeyFileId (optional)
StringrsaKeyFilePathrsaKeyFilePath (optional)
StringrsaKeyTypersaKeyType (optional)
NoKey, Path, IDrsaKeyValuersaKeyValue (optional)
StringrsaKeyFileId (optional)
StringrsaKeyFilePath (optional)
StringrsaKeyPath (optional)
String$class: 'SynergySCM'$class: 'SynergySCM'project
Stringdatabase
Stringrelease
Stringpurpose
Stringusername
Stringpassword
Stringengine
StringoldProject
Stringbaseline
StringoldBaseline
StringccmHome
StringremoteClient
booleandetectConflict
booleanreplaceSubprojects
booleancheckForUpdateWarnings
booleanleaveSessionOpen
booleanmaintainWorkarea
booleancheckTaskModifiedObjects
boolean$class: 'VaultSCM'$class: 'VaultSCM'serverName
Stringpath
StringuserName
Stringpassword
StringrepositoryName
StringvaultName
StringsslEnabled
booleanuseNonWorkingFolder
booleanmerge
StringfileTime
StringmakeWritableEnabled
booleanverboseEnabled
boolean$class: 'hudson.plugins.gradle_repo.RepoScm'$class: 'hudson.plugins.gradle_repo.RepoScm'repositoryUrl
Stringbranch
String$class: 'hudson.plugins.repo.RepoScm'$class: 'hudson.plugins.repo.RepoScm'manifestRepositoryUrl
StringcleanFirst (optional)
booleancurrentBranch (optional)
booleandepth (optional)
intdestinationDir (optional)
StringextraEnvVars (optional)
java.util.Map<java.lang.String, java.lang.String>fetchSubmodules (optional)
booleanforceSync (optional)
booleanignoreProjects (optional)
Stringjobs (optional)
intlocalManifest (optional)
StringmanifestBranch (optional)
StringmanifestFile (optional)
StringmanifestGroup (optional)
StringmanifestPlatform (optional)
StringmanifestSubmodules (optional)
booleanmirrorDir (optional)
StringnoCloneBundle (optional)
booleannoTags (optional)
booleanquiet (optional)
booleanrepoBranch (optional)
StringrepoUrl (optional)
StringresetFirst (optional)
booleanshowAllChanges (optional)
booleantrace (optional)
booleanworktree (optional)
booleannonenone$class: 'OpenShiftImageStreams'$class: 'OpenShiftImageStreams'imageStreamName
Stringtag
StringapiURL
Stringnamespace
StringauthToken
Stringverbose
String$class: 'PdsConfiguration'$class: 'PdsConfiguration'connectionId
StringfilterPattern
StringfileExtension
StringcredentialsId
StringtargetFolder
Stringperforceperforcecredential
Select the appropriate credential for the Perforce connection. Perforce Credentials are defined in the Jenkins Credentials plugin here.
There are two types:
Stringworkspace
Select the appropriate Perforce workspace behaviour from the list. Not all modes will suit all Jenkins Job build types.
There are five types:
manualSpecmanualSpeccharset
The character set used by Jenkins when syncing files from the Perforce server. This should be set to 'none' unless connected to a Unicode enabled Perforce server.
StringpinHost
booleanname
Specify the name of the Perforce workspace to be used as the Jenkins build workspace. If the workspace does not yet exist, the configuration will be saved in Jenkins; the workspace is created only when it is to be used. If the workspace exists and you are connected to a Perforce server the auto-text fill should list suitable workspaces; updates are only applied when the workspace is used.
Stringspec
allwriteallwrite
booleanclobberclobber
booleancompresscompress
booleanlockedlocked
booleanmodtimemodtime
booleanrmdirrmdir
booleanstreamNamestreamName
Stringlineline
Set line-ending character(s) for client text files.
linefeed: UNIX style.
carriage return: Macintosh style. (obsolete)
carriage return-linefeed: Windows style.
hybrid: writes UNIX style but reads UNIX, Mac or Windows style.
Stringviewview
Lines to map depot files into the client workspace.
The variable ${P4_CLIENT} will expand to the client name, for example, a simple mapping:
//depot/... //${P4_CLIENT}/...
Maps files in the depot to files in your client workspace. Defines the files that you want in your client workspace and specifies where you want them to reside. The default view maps all depot files onto the client. See 'p4 help views' for view syntax. A new view takes effect on the next 'p4 sync'.
To support migration from the old Perforce plugin, a View Mapping can be inserted from a file in Perforce. Add the depot path to the "View Mappings" field Prefix "@" (this only applies to the "Manual" Workspace behaviour).
StringchangeViewchangeView
Stringtypetype
Type of client: writeable/readonly/partitioned/graph
By default all clients are 'writeable', certain clients are short lived and perform long sync and build cycles. Over time these build clients can fragment the 'db.have' table which is used to track what files a client has synced. Setting a type of 'readonly' gives the client its own personal 'db.have' database table. A 'readonly' client cannot 'edit' or 'submit' files, however for build automation this is not usually a requirement and the performance tradeoff is worth considering if your build automation is causing issues with the 'db.have' table. This option requires that an administrator has first configured the 'client.readonly.dir' setting. If it is necessary to submit changes as part of your build, you may specify a 'partitioned' client: like a 'reaonly' client, this type also has a separate 'db.have' table under the 'client.readonly.dir' directory, but allows journalled 'edit' and 'submit' of files.
StringserverIDserverID
Stringbackupbackup
Client's participation in backup enable/disable. If not specified backup of a writable client defaults to enabled.
booleancleanup
booleansyncID (optional)
StringspecFileSpecspecFileSpeccharset
The character set used by Jenkins when syncing files from the Perforce server. This should be set to 'none' unless connected to a Unicode enabled Perforce server.
StringpinHost
booleanname
Specify the name of the Perforce workspace to be used as the Jenkins build workspace. If the workspace does not yet exist, the configuration will be saved in Jenkins; the workspace is created only when it is to be used. If the workspace exists and you are connected to a Perforce server the auto-text fill should list suitable workspaces; updates are only applied when the workspace is used.
StringspecPath
StringsyncID (optional)
StringstaticSpecstaticSpeccharset
The character set used by Jenkins when syncing files from the Perforce server. This should be set to 'none' unless connected to a Unicode enabled Perforce server.
StringpinHost
booleanname
Specify the name of an existing workspace in Perforce to be used as the Jenkins build workspace. If connected to a Perforce server the auto-text fill should list suitable workspaces
StringsyncID (optional)
StringstreamSpecstreamSpeccharset
The character set used by Jenkins when syncing files from the Perforce server. This should be set to 'none' unless connected to a Unicode enabled Perforce server.
StringpinHost
booleanstreamName
Specify the full Perforce depot path for the given stream. If connected to a Perforce server the auto-text fill should list possible streams.
For example: //stream-depot/main-streamStringformat
Jenklin slave nodes must each use a unique Perforce workspace. The format string configures the workspace name by substituting the specified variables: (at least one variable must be used)
Variables can be taken from the Jenkins Environment or Parameterized builds
StringsyncID (optional)
StringtemplateSpectemplateSpeccharset
The character set used by Jenkins when syncing files from the Perforce server. This should be set to 'none' unless connected to a Unicode enabled Perforce server.
StringpinHost
booleantemplateName
Specify the name of an existing workspace in Perforce used to create or update a Jenkins build workspace. If connected to a Perforce server the auto-text fill should list suitable workspaces
Stringformat
Jenklin slave nodes must each use a unique Perforce workspace. The format string configures the workspace name by substituting the specified variables: (at least one variable must be used)
Variables can be taken from the Jenkins Environment or Parameterized builds
StringsyncID (optional)
Stringfilter
latestlatestlatestChange
booleanpathFilterpathFilterpath
Changes can be filtered to not trigger a build; if all the files within a change match the specified path, the build is filtered.
For example, with a Filter of " //depot/main/tests ":
Case A (change will be filtered):
Files:
//depot/main/tests/index.xml //depot/main/tests/001/test.xml //depot/main/tests/002/test.xml Case B (change will not be filtered, as build.xml is outside of the filter):
Files:
//depot/main/src/build.xml //depot/main/tests/004/test.xml //depot/main/tests/005/test.xml This is not Perforce syntax. Use of ... and * patterns are not supported. Only paths to directories are supported.
StringviewPatternviewPatternpatternText
Changes can be filtered to not trigger a build; if none of the files within a change match a Java pattern (regular expression) listed, the build is filtered.
For example, with the following regular expressions:
//depot/main/tests.*
//depot/main/src/.*\.cpp
//depot/main/build/.*(?:\.rb|\.py|\.bat|Jenkinsfile)
//depot/main/lib/(?!Lib1|Lib2).*
Case A (change will not be filtered, as these files match our first pattern on "tests"):
Files:
//depot/main/tests/CONTRIUBTING.md //depot/main/tests/001/index.xml Case B (Be careful with incomplete file paths! Change will NOT be filtered,
as this file matches a pattern which was likely intended as describing a "tests/" directory.)
Files:
//depot/main/tests.doc Case C (change will NOT be filtered, as all files match our fourth pattern looking for script files in 'build/'):
Files:
//depot/main/build/rbs/deploy_server.rb //depot/main/build/deploy/deploy.bat //depot/main/build/Jenkinsfile Case D (change will be filtered, as no file matches our second pattern for ".cpp" files under "main/src"):
Files:
//depot/main/src/howto.doc //depot/main/src/oldmain.c //depot/main/src/art/splash.bmp //depot/main/src/bt/funnelcake.php Case E (change will be filtered. Lib1 is included in a negative lookahead, and thus is excluded.)
Files:
//depot/main/lib/Lib1/build.xml StringcaseSensitive
booleanincrementalincrementalperChange
When enabled, only the one, oldest changelist returned by polling is built.
If P4_INCREMENTAL environment variable (or build parameter) is set to "false", polling per change is ignored and all changelists are built.
booleanuserFilteruserFilteruser
Changes can be filtered to not trigger a build; if the owner of a change matches the specified name, the build is filtered.
StringviewFilterviewFilterviewMask
Changes can be filtered to not trigger a build; if none of the files within a change are contained in the view mask, the build is filtered.
For example, with a View Mask Filter of:
//depot/main/tests
-//depot/main/tests/001
Case A (change will not be filtered, as index.xml is in the view mask):
Files:
//depot/main/tests/index.xml //depot/main/tests/001/test.xml Case B (change will not be filtered, as index.xml is in the view mask):
Files:
//depot/main/test/index.xml //depot/main/src/build.xml Case C (change will be filtered, as no file is in the view mask):
Files:
//depot/main/src/build.xml Case D (change will be filtered, as no file is in the view mask):
Files:
//depot/main/src/build.xml //depot/main/tests/001/test.xml Stringpopulate
Perforce will populate the workspace with the file revisions needed for the build. The different options effect the way the workspace is cleaned and the file revisions are updated.
There are three options:
autoCleanautoCleanreplace
Perforce will check out and overwrite any depot files which are either missing from workspace, or have been modified locally.
booleandelete
Perforce will delete any local files that are not in the depot.
booleantidy
booleanmodtime
booleanquiet
Enables the -q flag for all applicable Perforce operations. Summary details will still be displayed.
booleanpin
When a build is triggered by Polling, Build Now or an external Action, the workspace will sync only to the specified label. Any other specified change or label will be ignored.
Supports variable expansion e.g. ${VAR}. If 'now' is used, or a variable that expands to 'now', then the latest change is used (within the scope of the workspace view).
Stringparallel
enableenable
booleanpathpath
Stringthreadsthreads
Stringminfilesminfiles
Stringminbytesminbytes
StringpreviewOnlypreviewOnlyquiet
Enables the -q flag for all applicable Perforce operations. Summary details will still be displayed.
booleanpin
StringflushOnlyflushOnlyquiet
booleanpin
When a build is triggered by Polling, Build Now or an external Action, the workspace will flush only to the specified label or changelist number. Any other specified change or label will be ignored.
Supports variable expansion e.g. ${VAR}. If 'now' is used, or a variable that expands to 'now', then the latest change is used (within the scope of the workspace view).
StringforceCleanforceCleanhave
booleanquiet
Enables the -q flag for all applicable Perforce operations. Summary details will still be displayed.
booleanpin
When a build is triggered by Polling, Build Now or an external Action, the workspace will sync only to the specified label. Any other specified change or label will be ignored.
Supports variable expansion e.g. ${VAR}. If 'now' is used, or a variable that expands to 'now', then the latest change is used (within the scope of the workspace view).
Stringparallel
enableenable
booleanpathpath
Stringthreadsthreads
Stringminfilesminfiles
Stringminbytesminbytes
StringgraphCleangraphCleanquiet
Enables the -q flag for all applicable Perforce operations. Summary details will still be displayed.
booleanpin
When a build is triggered by Polling, Build Now or an external Action, the workspace will sync only to the specified label. Any other specified change or label will be ignored.
Supports variable expansion e.g. ${VAR}. If 'now' is used, or a variable that expands to 'now', then the latest change is used (within the scope of the workspace view).
Stringparallel
enableenable
booleanpathpath
Stringthreadsthreads
Stringminfilesminfiles
Stringminbytesminbytes
StringsyncOnlysyncOnlyrevert
booleanhave
booleanforce
booleanmodtime
booleanquiet
Enables the -q flag for all applicable Perforce operations. Summary details will still be displayed.
booleanpin
When a build is triggered by Polling, Build Now or an external Action, the workspace will sync only to the specified label. Any other specified change or label will be ignored.
Supports variable expansion e.g. ${VAR}. If 'now' is used, or a variable that expands to 'now', then the latest change is used (within the scope of the workspace view).
Stringparallel
enableenable
booleanpathpath
Stringthreadsthreads
Stringminfilesminfiles
Stringminbytesminbytes
Stringbrowser
fishEyefishEyeurl
StringrootModule
StringopenGrokopenGrokurl
StringdepotPath
StringprojectName
Stringp4Webp4Weburl
Stringswarmswarmurl
String$class: 'PlasticSCM'$class: 'PlasticSCM'selector
Stringcleanup
MINIMAL, STANDARD, FULL, DELETEuseMultipleWorkspaces
booleanadditionalWorkspaces
selectorselector
Stringcleanupcleanup
MINIMAL, STANDARD, FULL, DELETEdirectorydirectory
Stringdirectory
String$class: 'ProxySCM'$class: 'ProxySCM'projectName
String$class: 'PvcsScm'$class: 'PvcsScm'projectRoot
StringarchiveRoot
StringchangeLogPrefixFudge
StringmoduleDir
StringloginId
StringpvcsWorkspace
StringpromotionGroup
StringversionLabel
StringcleanCopy
boolean$class: 'RTCScm'$class: 'RTCScm'overrideGlobal
The build toolkit location and Jazz Repository connection can be defined globally or overridden. If not defined globally, it must be overridden.
booleanbuildTool
The RTC build toolkit to use when performing builds. The toolkits available are defined in the system configuration (with the other tools like Ant and Java). The build toolkit is also necessary on the Master for polling and validating the job configuration unless the "Avoid using build toolkit on Master" option is enabled.
StringserverURI
The Jazz Repository connection URI for the Rational Team Concert (RTC) server
Stringtimeout
The timeout period in seconds for Jazz repository requests made during the build.
intuserId
The build user id. Either credentials or a user id and password information should be supplied.
Stringpassword
The Jazz Repository password for the build user. The use of a password is not secure, it can be easily discovered by anyone with access to this page. Credentials, a password file or a password should be supplied.
class hudson.util.SecretpasswordFile
The path to the file containing the obfuscated Jazz Repository password for the build user. Credentials, a password file or a password should be supplied.
StringcredentialsId
Credentials to use for the build user. A user name and password credential for the Jazz Repository should be configured.
StringbuildType
valuevalue
StringbuildDefinitionbuildDefinition
StringbuildWorkspacebuildWorkspace
StringbuildSnapshotbuildSnapshot
StringbuildStreambuildStream
StringacceptBeforeLoadacceptBeforeLoad (optional)
booleanaddLinksToWorkItemsaddLinksToWorkItems (optional)
booleanbuildSnapshotContextbuildSnapshotContext (optional)
snapshotOwnerTypesnapshotOwnerType
StringprocessAreaOfOwningStreamprocessAreaOfOwningStream
StringowningStreamowningStream
StringowningWorkspaceowningWorkspace
StringclearLoadDirectoryclearLoadDirectory (optional)
booleancomponentLoadConfigcomponentLoadConfig (optional)
StringcomponentsToExcludecomponentsToExclude (optional)
StringcreateFoldersForComponentscreateFoldersForComponents (optional)
booleancurrentSnapshotOwnerTypecurrentSnapshotOwnerType (optional)
StringcustomizedSnapshotNamecustomizedSnapshotName (optional)
StringgenerateChangelogWithGoodBuildgenerateChangelogWithGoodBuild (optional)
booleanloadDirectoryloadDirectory (optional)
StringloadPolicyloadPolicy (optional)
StringoverrideDefaultSnapshotNameoverrideDefaultSnapshotName (optional)
booleanpathToLoadRuleFilepathToLoadRuleFile (optional)
StringpollingOnlypollingOnly (optional)
booleanpollingOnlyDatapollingOnlyData (optional)
snapshotUUIDsnapshotUUID
StringprocessAreaprocessArea (optional)
StringuseDynamicLoadRulesuseDynamicLoadRules (optional)
booleanavoidUsingToolkit
Where possible avoid using the Build toolkit when performing tasks on the Master. This is still in the experimental stage. You will require an RTC 5.0 server which provides some of the services used.
The Build toolkit will not be used when polling RTC and terminating the RTC Build. The toolkit is still required though. It is used for other configuration tasks on the Master (i.e. validating the connection to RTC, the build definition or workspace). It is also used for checkout tasks typically performed on agent nodes.
boolean$class: 'SCLMSCM'$class: 'SCLMSCM'server
Stringport
intcredentialsId
StringJESINTERFACELEVEL1
booleanFTPActiveMode
booleanproject
Stringalternate
Stringgroup
Stringtypes
StringcustJobStep
booleanJobStep
StringcustJobHeader
booleanJobHeader
String$class: 'ShellScriptSCM'$class: 'ShellScriptSCM'checkoutShell
StringpollingShell
StringuseCheckoutForPolling
boolean$class: 'SimpleClearCaseSCM'$class: 'SimpleClearCaseSCM'loadRules
/vobs/structure/package/product/subproduct
/vobs/structure/package/product/anothersubproduct.
Stringviewname
Stringbranch
Stringfilter
boolean$class: 'StarTeamSCM'$class: 'StarTeamSCM'hostname
Stringport
intprojectname
Stringviewname
Stringfoldername
Stringusername
Stringpassword
Stringlabelname
Stringpromotionstate
boolean$class: 'StoreSCM'$class: 'StoreSCM'scriptName
StringrepositoryName
Stringpundles
pundleTypepundleType
PACKAGE, BUNDLEnamename
StringversionRegex
StringminimumBlessingLevel
StringgenerateParcelBuilderInputFile
booleanparcelBuilderInputFilename
String$class: 'SubversionSCM'$class: 'SubversionSCM'locations
remoteremote
StringcredentialsIdcredentialsId
Stringlocallocal
.) may be used to check out the project directly into the workspace rather than into a subdirectory.
StringdepthOptiondepthOption
StringignoreExternalsOptionignoreExternalsOption
svn:externals to gain read access to the entire Subversion repository. This can happen if you follow the normal practice of giving Jenkins credentials with read access to the entire Subversion repository. You will also need to provide the credentials to use when checking/polling out the svn:externals using the Additional Credentials option.
booleancancelProcessOnExternalsFailcancelProcessOnExternalsFail
booleanworkspaceUpdater
$class: 'CheckoutUpdater'$class: 'CheckoutUpdater'$class: 'NoopUpdater'$class: 'NoopUpdater'$class: 'UpdateUpdater'$class: 'UpdateUpdater'$class: 'UpdateWithCleanUpdater'$class: 'UpdateWithCleanUpdater'$class: 'UpdateWithRevertUpdater'$class: 'UpdateWithRevertUpdater'browser
$class: 'Assembla'$class: 'Assembla'spaceName
String$class: 'BacklogRepositoryBrowser'$class: 'BacklogRepositoryBrowser'url
When no value is set, project of "Backlog URL" set above is used.
String$class: 'Phabricator'$class: 'Phabricator'url
Stringrepo
String$class: 'PolarionRepositoryBrowser'$class: 'PolarionRepositoryBrowser'url
Stringlocation
String$class: 'RedmineRepositoryBrowser'$class: 'RedmineRepositoryBrowser'repositoryId
String$class: 'SVNWeb'$class: 'SVNWeb'url
String$class: 'ScmManagerSvnRepositoryBrowser'$class: 'ScmManagerSvnRepositoryBrowser'repoUrl
String$class: 'TeamForge'$class: 'TeamForge'connectionFactory
urlurl
This should be the URL of your CollabNet TeamForge site. It should be of the form 'https://forge.collab.net'.
Stringusernameusername
The user who will upload the files.
Stringpasswordpassword
The password for the user specified above. If incorrectly given, the login to the CollabNet TeamForge server will fail.
Stringproject
Stringrepo
String$class: 'TracRepositoryBrowser'$class: 'TracRepositoryBrowser'$class: 'ViewVCRepositoryBrowser'$class: 'ViewVCRepositoryBrowser'url
Stringlocation
String$class: 'VisualSVN'$class: 'VisualSVN'url
StringexcludedRegions
/trunk/myapp/src/main/web/.*\.html /trunk/myapp/src/main/web/.*\.jpeg /trunk/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. More information on regular expressions can be found here.
StringexcludedUsers
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.
StringexcludedRevprop
StringexcludedCommitMessages
StringincludedRegions
/trunk/myapp/c/library1/.* /trunk/myapp/c/library2/.*If /trunk/myapp is checked out, the build will only occur when there are changes to either the c/library1 and c/library2 subtrees. If there are also excluded regions specified, then a file is not ignored when it is in the included list and not in the excluded list. More information on regular expressions can be found here.
StringignoreDirPropChanges
booleanfilterChangelog
booleanadditionalCredentials
If there are additional credentials required in order to obtain a complete checkout of the source, they can be provided here.
The realm is how the repository self-identifies to a client. It usually has the following format:
<proto://host:port> Realm Name
proto is the protocol, e.g. http or svn.host is the host how it's accessed by Jenkins, e.g. as IP address 192.168.1.100, host name svnserver, or host name and domain svn.example.org.port is the port, even if not explicitly specified. By default, this is 80 for HTTP, 443 for HTTPS, 3690 for the svn protocol.Realm Name is how the repository self-identifies. Common options include VisualSVN Server, Subversion Authentication or the UUID of the repository.To find out the realm, you could do any of the following:
Realm Name (see above) in the authentication dialog.svn program.
svn info https://svnserver/repo and it will tell you the realm when asking you to enter a password, e.g.: Authentication realm: <svn://svnserver:3690> VisualSVN Server.~/.subversion/auth/svn/simple; it will be two lines below the line svn:realmstring.svn+ssh protocol, the realm has the format username@svn+ssh://host:port – note that the username is before the svn+ssh:// (unlike the URL used for normal SVN operations), and that there are no angle brackets and no realm name. For this protocol the default port is 22.Make sure to enter the realm exactly as shown, starting with a < (except for repositories accessed via svn+ssh – see above).
realmrealm
<scheme://hostname(:port)> name, while for servers accessed via svn+ssh it is of the format (username@)svn+ssh://hostname(:port).
StringcredentialsIdcredentialsId
StringquietOperation
Mimics subversion command line --quiet parameter for check out / update operations to help keep the output shorter. Prints nothing, or only summary information.
boolean$class: 'SurroundSCM'$class: 'SurroundSCM'server
StringserverPort
Stringbranch
Stringrepository
StringcredentialsId
StringrsaKey (optional)
rsaKeyFileIdrsaKeyFileId (optional)
StringrsaKeyFilePathrsaKeyFilePath (optional)
StringrsaKeyTypersaKeyType (optional)
NoKey, Path, IDrsaKeyValuersaKeyValue (optional)
StringrsaKeyFileId (optional)
StringrsaKeyFilePath (optional)
StringrsaKeyPath (optional)
String$class: 'SynergySCM'$class: 'SynergySCM'project
Stringdatabase
Stringrelease
Stringpurpose
Stringusername
Stringpassword
Stringengine
StringoldProject
Stringbaseline
StringoldBaseline
StringccmHome
StringremoteClient
booleandetectConflict
booleanreplaceSubprojects
booleancheckForUpdateWarnings
booleanleaveSessionOpen
booleanmaintainWorkarea
booleancheckTaskModifiedObjects
boolean$class: 'VaultSCM'$class: 'VaultSCM'serverName
Stringpath
StringuserName
Stringpassword
StringrepositoryName
StringvaultName
StringsslEnabled
booleanuseNonWorkingFolder
booleanmerge
StringfileTime
StringmakeWritableEnabled
booleanverboseEnabled
boolean$class: 'hudson.plugins.gradle_repo.RepoScm'$class: 'hudson.plugins.gradle_repo.RepoScm'repositoryUrl
Stringbranch
String$class: 'hudson.plugins.repo.RepoScm'$class: 'hudson.plugins.repo.RepoScm'manifestRepositoryUrl
StringcleanFirst (optional)
booleancurrentBranch (optional)
booleandepth (optional)
intdestinationDir (optional)
StringextraEnvVars (optional)
java.util.Map<java.lang.String, java.lang.String>fetchSubmodules (optional)
booleanforceSync (optional)
booleanignoreProjects (optional)
Stringjobs (optional)
intlocalManifest (optional)
StringmanifestBranch (optional)
StringmanifestFile (optional)
StringmanifestGroup (optional)
StringmanifestPlatform (optional)
StringmanifestSubmodules (optional)
booleanmirrorDir (optional)
StringnoCloneBundle (optional)
booleannoTags (optional)
booleanquiet (optional)
booleanrepoBranch (optional)
StringrepoUrl (optional)
StringresetFirst (optional)
booleanshowAllChanges (optional)
booleantrace (optional)
booleanworktree (optional)
booleanlibraryPath (optional)
StringmodernSCMmodernSCMscm
$class: 'BacklogPullRequestSCMSource'$class: 'BacklogPullRequestSCMSource'remote
StringcredentialsId
Stringincludes
Stringexcludes
StringignoreOnPushNotifications
booleanurl
StringapiKey
API key when using Backlog API version 2.
Stringid (optional)
Stringbrowser (optional)
$class: 'AssemblaWeb'$class: 'AssemblaWeb'repoUrl
String$class: 'BacklogGitRepositoryBrowser'$class: 'BacklogGitRepositoryBrowser'repoName
StringrepoUrl
StringbitbucketServerbitbucketServerrepoUrl
String$class: 'BitbucketWeb'$class: 'BitbucketWeb'repoUrl
String$class: 'CGit'$class: 'CGit'repoUrl
String$class: 'FisheyeGitRepositoryBrowser'$class: 'FisheyeGitRepositoryBrowser'repoUrl
String$class: 'GitBlitRepositoryBrowser'$class: 'GitBlitRepositoryBrowser'repoUrl
StringprojectName
String$class: 'GitBucketBrowser'$class: 'GitBucketBrowser'url
String$class: 'GitLab'$class: 'GitLab'repoUrl
Stringversion (optional)
String$class: 'GitLabBrowser'$class: 'GitLabBrowser'https://gitLab.example.com then the URL for bob's skunkworks project might be https://gitLab.example.com/bob/skunkworks.
projectUrl
https://gitLab.example.com then the URL for bob's skunkworks project might be https://gitLab.example.com/bob/skunkworks
String$class: 'GitList'$class: 'GitList'repoUrl
String$class: 'GitWeb'$class: 'GitWeb'repoUrl
String$class: 'GiteaBrowser'$class: 'GiteaBrowser'repoUrl
https://gitea.example.com then the URL for bob's skunkworks project repository might be https://gitea.example.com/bob/skunkworks
String$class: 'GithubWeb'$class: 'GithubWeb'repoUrl
String$class: 'Gitiles'$class: 'Gitiles'repoUrl
String$class: 'GitoriousWeb'$class: 'GitoriousWeb'repoUrl
String$class: 'GogsGit'$class: 'GogsGit'repoUrl
String$class: 'KilnGit'$class: 'KilnGit'repoUrl
String$class: 'Phabricator'$class: 'Phabricator'repoUrl
Stringrepo
String$class: 'RedmineWeb'$class: 'RedmineWeb'repoUrl
String$class: 'RhodeCode'$class: 'RhodeCode'repoUrl
String$class: 'ScmManagerGitRepositoryBrowser'$class: 'ScmManagerGitRepositoryBrowser'repoUrl
String$class: 'Stash'$class: 'Stash'repoUrl
String$class: 'TFS2013GitRepositoryBrowser'$class: 'TFS2013GitRepositoryBrowser'repoUrl
If TFS is also used as the repository server, this can usually be left blank.
String$class: 'TracGitRepositoryBrowser'$class: 'TracGitRepositoryBrowser'$class: 'TuleapBrowser'$class: 'TuleapBrowser'repositoryUrl
String$class: 'ViewGitWeb'$class: 'ViewGitWeb'repoUrl
StringprojectName
Stringextensions (optional)
$class: 'AuthorInChangelog'$class: 'AuthorInChangelog'$class: 'BuildChooserSetting'$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: 'AlternativeBuildChooser'$class: 'AncestryBuildChooser'$class: 'AncestryBuildChooser'maximumAgeInDays
intancestorCommitSha1
String$class: 'DefaultBuildChooser'$class: 'DefaultBuildChooser'$class: 'DeflakeGitBuildChooser'$class: 'DeflakeGitBuildChooser'$class: 'GerritTriggerBuildChooser'$class: 'GerritTriggerBuildChooser'$class: 'InverseBuildChooser'$class: 'InverseBuildChooser'$class: 'BuildSingleRevisionOnly'$class: 'BuildSingleRevisionOnly'$class: 'ChangelogToBranch'$class: 'ChangelogToBranch'options
compareRemotecompareRemote
origin, that contains the branch you specify below.
StringcompareTargetcompareTarget
String$class: 'CheckoutOption'$class: 'CheckoutOption'timeout
int$class: 'CleanBeforeCheckout'$class: '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 (optional)
.git directories.
boolean$class: 'CleanCheckout'$class: 'CleanCheckout'.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 (optional)
.git directories.
boolean$class: 'CloneOption'$class: 'CloneOption'shallow
booleannoTags
booleanreference
Stringtimeout
intdepth (optional)
inthonorRefspec (optional)
boolean$class: 'CodeCommitURLHelper'$class: 'CodeCommitURLHelper'credentialId
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.
StringrepositoryName
String$class: 'DisableRemotePoll'$class: 'DisableRemotePoll'$class: 'ExcludeFromChangeSet'$class: 'ExcludeFromChangeSet'$class: 'ExcludeFromPoll'$class: 'ExcludeFromPoll'$class: 'GitLFSPull'$class: 'GitLFSPull'$class: 'GitSCMChecksExtension'$class: 'GitSCMChecksExtension'verboseConsoleLog (optional)
boolean$class: 'GitSCMStatusChecksExtension'$class: 'GitSCMStatusChecksExtension'name (optional)
Stringskip (optional)
booleanskipProgressUpdates (optional)
booleansuppressLogs (optional)
booleanunstableBuildNeutral (optional)
boolean$class: 'GitTagMessageExtension'$class: 'GitTagMessageExtension'useMostRecentTag (optional)
boolean$class: 'IgnoreNotifyCommit'$class: 'IgnoreNotifyCommit'$class: 'LocalBranch'$class: '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'$class: 'MessageExclusion'excludedMessage
.*\[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.
String$class: 'PathRestriction'$class: 'PathRestriction'includedRegions
myapp/src/main/web/.*\.html
myapp/src/main/web/.*\.jpeg
myapp/src/main/web/.*\.gif
The 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.
StringexcludedRegions
myapp/src/main/web/.*\.html
myapp/src/main/web/.*\.jpeg
myapp/src/main/web/.*\.gif
The example above illustrates that if only html/jpeg/gif files have been committed to the SCM a build will not occur.
String$class: 'PerBuildTag'$class: 'PerBuildTag'$class: 'PreBuildMerge'$class: 'PreBuildMerge'options
mergeTargetmergeTarget
master.
StringfastForwardModefastForwardMode (optional)
FF, FF_ONLY, NO_FFmergeRemotemergeRemote (optional)
origin, that contains the branch you specify below. If left blank, it'll default to the name of the first repository configured above.
StringmergeStrategymergeStrategy (optional)
DEFAULT, RESOLVE, RECURSIVE, OCTOPUS, OURS, SUBTREE, RECURSIVE_THEIRSpretestedIntegrationpretestedIntegrationgitIntegrationStrategy
accumulatedaccumulatedsquashsquashintegrationBranch
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>
StringrepoName
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
String$class: 'PruneStaleBranch'$class: 'PruneStaleBranch'pruneTagspruneTagspruneTags
boolean$class: 'RelativeTargetDirectory'$class: 'RelativeTargetDirectory'relativeTargetDir
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.
String$class: 'ScmName'$class: 'ScmName'Unique name for this SCM. Needed when using Git within the Multi SCM plugin.
name
String$class: 'SparseCheckoutPaths'$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
pathpath
String$class: 'SubmoduleOption'$class: 'SubmoduleOption'disableSubmodules
booleanrecursiveSubmodules
booleantrackingSubmodules
booleanreference
git init --bare git remote add SubProject1 https://gitrepo.com/subproject1 git remote add SubProject2 https://gitrepo.com/subproject2 git fetch --all
Stringtimeout
intparentCredentials
booleandepth (optional)
intshallow (optional)
booleanthreads (optional)
int$class: 'UserExclusion'$class: 'UserExclusion'excludedUsers
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.
String$class: 'UserIdentity'$class: 'UserIdentity'name
If given, "GIT_COMMITTER_NAME=[this]" and "GIT_AUTHOR_NAME=[this]" are set for builds. This overrides whatever is in the global settings.
Stringemail
If given, "GIT_COMMITTER_EMAIL=[this]" and "GIT_AUTHOR_EMAIL=[this]" are set for builds. This overrides whatever is in the global settings.
String$class: 'WipeWorkspace'$class: 'WipeWorkspace'gitTool (optional)
StringmultiBranchmultiBranchcredential
Stringincludes (optional)
A List of Perforce Depot paths (separated by new lines). The plugin will search one directory level deep for a Jenkinsfile (or defined item) using the last directory name for the branch name.
For example, given an include path of: //depot/projA (or //depot/projA/* or //depot/projA/... as these get trimmed before they are passed to p4 dirs)
If a Jenkinsfile is found in //depot/projA/Main/Jenkinsfile and //depot/projA/R1.0/Jenkinsfile then two branches are created for the MultiBranch project 'Main' and 'R1.0'
Stringcharset (optional)
Stringformat (optional)
Stringbrowser (optional)
fishEyefishEyeurl
StringrootModule
StringopenGrokopenGrokurl
StringdepotPath
StringprojectName
Stringp4Webp4Weburl
Stringswarmswarmurl
Stringexcludes (optional)
A regular expression to exclude matching depot paths (processed after the 'Include Filter')
Stringfilter (optional)
latestlatestlatestChange
booleanpathFilterpathFilterpath
Changes can be filtered to not trigger a build; if all the files within a change match the specified path, the build is filtered.
For example, with a Filter of " //depot/main/tests ":
Case A (change will be filtered):
Files:
//depot/main/tests/index.xml //depot/main/tests/001/test.xml //depot/main/tests/002/test.xml Case B (change will not be filtered, as build.xml is outside of the filter):
Files:
//depot/main/src/build.xml //depot/main/tests/004/test.xml //depot/main/tests/005/test.xml This is not Perforce syntax. Use of ... and * patterns are not supported. Only paths to directories are supported.
StringviewPatternviewPatternpatternText
Changes can be filtered to not trigger a build; if none of the files within a change match a Java pattern (regular expression) listed, the build is filtered.
For example, with the following regular expressions:
//depot/main/tests.*
//depot/main/src/.*\.cpp
//depot/main/build/.*(?:\.rb|\.py|\.bat|Jenkinsfile)
//depot/main/lib/(?!Lib1|Lib2).*
Case A (change will not be filtered, as these files match our first pattern on "tests"):
Files:
//depot/main/tests/CONTRIUBTING.md //depot/main/tests/001/index.xml Case B (Be careful with incomplete file paths! Change will NOT be filtered,
as this file matches a pattern which was likely intended as describing a "tests/" directory.)
Files:
//depot/main/tests.doc Case C (change will NOT be filtered, as all files match our fourth pattern looking for script files in 'build/'):
Files:
//depot/main/build/rbs/deploy_server.rb //depot/main/build/deploy/deploy.bat //depot/main/build/Jenkinsfile Case D (change will be filtered, as no file matches our second pattern for ".cpp" files under "main/src"):
Files:
//depot/main/src/howto.doc //depot/main/src/oldmain.c //depot/main/src/art/splash.bmp //depot/main/src/bt/funnelcake.php Case E (change will be filtered. Lib1 is included in a negative lookahead, and thus is excluded.)
Files:
//depot/main/lib/Lib1/build.xml StringcaseSensitive
booleanincrementalincrementalperChange
When enabled, only the one, oldest changelist returned by polling is built.
If P4_INCREMENTAL environment variable (or build parameter) is set to "false", polling per change is ignored and all changelists are built.
booleanuserFilteruserFilteruser
Changes can be filtered to not trigger a build; if the owner of a change matches the specified name, the build is filtered.
StringviewFilterviewFilterviewMask
Changes can be filtered to not trigger a build; if none of the files within a change are contained in the view mask, the build is filtered.
For example, with a View Mask Filter of:
//depot/main/tests
-//depot/main/tests/001
Case A (change will not be filtered, as index.xml is in the view mask):
Files:
//depot/main/tests/index.xml //depot/main/tests/001/test.xml Case B (change will not be filtered, as index.xml is in the view mask):
Files:
//depot/main/test/index.xml //depot/main/src/build.xml Case C (change will be filtered, as no file is in the view mask):
Files:
//depot/main/src/build.xml Case D (change will be filtered, as no file is in the view mask):
Files:
//depot/main/src/build.xml //depot/main/tests/001/test.xml Stringid (optional)
Stringmappings (optional)
A List of view mapping paths (separated by new lines). The plugin will create the branch workspace view with each mapping mapped to the branch path and client path.
Note: The Jenkinsfile path will automatically be added to the mappings.
Default: ... will be mapped to //depot/branch/... //client/branch/...
Example: myLibrary/... will be mapped to //depot/branch/myLibrary/... //client/branch/myLibrary/...
Stringpattern (optional)
Filters the list of candidate branches found by the initial search.
For example, a depot might contain several branches and you only want to build branches starting with 'com', set the Include Filter to: .*com.*
Stringpopulate (optional)
autoCleanautoCleanreplace
Perforce will check out and overwrite any depot files which are either missing from workspace, or have been modified locally.
booleandelete
Perforce will delete any local files that are not in the depot.
booleantidy
booleanmodtime
booleanquiet
Enables the -q flag for all applicable Perforce operations. Summary details will still be displayed.
booleanpin
When a build is triggered by Polling, Build Now or an external Action, the workspace will sync only to the specified label. Any other specified change or label will be ignored.
Supports variable expansion e.g. ${VAR}. If 'now' is used, or a variable that expands to 'now', then the latest change is used (within the scope of the workspace view).
Stringparallel
enableenable
booleanpathpath
Stringthreadsthreads
Stringminfilesminfiles
Stringminbytesminbytes
StringpreviewOnlypreviewOnlyquiet
Enables the -q flag for all applicable Perforce operations. Summary details will still be displayed.
booleanpin
StringflushOnlyflushOnlyquiet
booleanpin
When a build is triggered by Polling, Build Now or an external Action, the workspace will flush only to the specified label or changelist number. Any other specified change or label will be ignored.
Supports variable expansion e.g. ${VAR}. If 'now' is used, or a variable that expands to 'now', then the latest change is used (within the scope of the workspace view).
StringforceCleanforceCleanhave
booleanquiet
Enables the -q flag for all applicable Perforce operations. Summary details will still be displayed.
booleanpin
When a build is triggered by Polling, Build Now or an external Action, the workspace will sync only to the specified label. Any other specified change or label will be ignored.
Supports variable expansion e.g. ${VAR}. If 'now' is used, or a variable that expands to 'now', then the latest change is used (within the scope of the workspace view).
Stringparallel
enableenable
booleanpathpath
Stringthreadsthreads
Stringminfilesminfiles
Stringminbytesminbytes
StringgraphCleangraphCleanquiet
Enables the -q flag for all applicable Perforce operations. Summary details will still be displayed.
booleanpin
When a build is triggered by Polling, Build Now or an external Action, the workspace will sync only to the specified label. Any other specified change or label will be ignored.
Supports variable expansion e.g. ${VAR}. If 'now' is used, or a variable that expands to 'now', then the latest change is used (within the scope of the workspace view).
Stringparallel
enableenable
booleanpathpath
Stringthreadsthreads
Stringminfilesminfiles
Stringminbytesminbytes
StringsyncOnlysyncOnlyrevert
booleanhave
booleanforce
booleanmodtime
booleanquiet
Enables the -q flag for all applicable Perforce operations. Summary details will still be displayed.
booleanpin
When a build is triggered by Polling, Build Now or an external Action, the workspace will sync only to the specified label. Any other specified change or label will be ignored.
Supports variable expansion e.g. ${VAR}. If 'now' is used, or a variable that expands to 'now', then the latest change is used (within the scope of the workspace view).
Stringparallel
enableenable
booleanpathpath
Stringthreadsthreads
Stringminfilesminfiles
Stringminbytesminbytes
Stringtraits (optional)
$class: 'ApprovedPullRequestTrait'$class: 'ApprovedPullRequestTrait'strategyId
int$class: 'AuthorInChangelogTrait'$class: 'AuthorInChangelogTrait'$class: 'BitbucketAgedRefsTrait'$class: 'BitbucketAgedRefsTrait'retentionDays
StringbitbucketBranchCommitSkipTraitbitbucketBranchCommitSkipTraitbitbucketBuildStatusNotificationsbitbucketBuildStatusNotificationssendSuccessNotificationForUnstableBuild (optional)
booleanbitbucketCommitSkipTraitbitbucketCommitSkipTrait$class: 'BitbucketJiraValidatorTrait'$class: 'BitbucketJiraValidatorTrait'jiraServerIdx
intbuildStatusNameCustomPartbuildStatusNameCustomPartbuildStatusNameCustomPart (optional)
String$class: 'ChangeDiscoveryTrait'$class: 'ChangeDiscoveryTrait'queryString
Provide an additional query string to search for open changes. The status:open is implicitly added and does not need to be specified. See Gerrit search operators documentation for a detailed list of the supported search operators.
-is:wipdoes not include work-in-progress changes
is:privateincludes private changes
String$class: 'CheckoutOptionTrait'$class: 'CheckoutOptionTrait'extension
timeouttimeout
int$class: 'CleanAfterCheckoutTrait'$class: 'CleanAfterCheckoutTrait'extension
.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.
deleteUntrackedNestedRepositoriesdeleteUntrackedNestedRepositories (optional)
.git directories.
boolean$class: 'CleanBeforeCheckoutTrait'$class: 'CleanBeforeCheckoutTrait'extension
.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.
deleteUntrackedNestedRepositoriesdeleteUntrackedNestedRepositories (optional)
.git directories.
boolean$class: 'CleanMercurialSCMSourceTrait'$class: 'CleanMercurialSCMSourceTrait'$class: 'CloneOptionTrait'$class: 'CloneOptionTrait'extension
shallowshallow
booleannoTagsnoTags
booleanreferencereference
Stringtimeouttimeout
intdepthdepth (optional)
inthonorRefspechonorRefspec (optional)
boolean$class: 'DisableStatusUpdateTrait'$class: 'DisableStatusUpdateTrait'$class: 'DiscoverOtherRefsTrait'$class: 'DiscoverOtherRefsTrait'ref
The pattern under /refs on the remote repository to discover, can contain a wildcard.
Example: test/*/merged
StringnameMapping (optional)
Mapping for how the ref can be named in for example the @Library.
Example: test-@{1}
Where @{1} replaces the first wildcard in the ref when discovered.
By default it will be "namespace_before_wildcard-@{1}". E.g. if ref is "test/*/merged" the default mapping would be "test-@{1}".
String$class: 'FilterChecksTrait'$class: 'FilterChecksTrait'queryOperator
ID, SCHEMEqueryString
StringgitLabForkDiscoverygitLabForkDiscoverystrategyId
inttrust
One of the great powers of merge requests is that anyone with read access to a project can fork it, commit some changes to their fork and then create a merge request against the original project with their changes. There are some files stored in source control that are important. For example, a Jenkinsfile may contain configuration details to sandbox merge requests in order to mitigate against malicious merge requests. In order to protect against a malicious merge request itself modifying the Jenkinsfile to remove the protections, you can define the trust policy for merge requests from forks.
Other plugins can extend the available trust policies. The default policies are:
Jenkinsfile) the contents of that file will be retrieved from the target branch on the origin project and not from the merge request branch on the fork project.
Nobody.
jenkins.scm.api.trait.SCMHeadAuthority<? super io.jenkins.plugins.gitlabbranchsource.GitLabSCMSourceRequest, ? extends jenkins.scm.api.mixin.ChangeRequestSCMHead2, ? extends jenkins.scm.api.SCMRevision>$class: 'GitBrowserSCMSourceTrait'$class: 'GitBrowserSCMSourceTrait'browser
$class: 'AssemblaWeb'$class: 'AssemblaWeb'repoUrl
String$class: 'BacklogGitRepositoryBrowser'$class: 'BacklogGitRepositoryBrowser'repoName
StringrepoUrl
StringbitbucketServerbitbucketServerrepoUrl
String$class: 'BitbucketWeb'$class: 'BitbucketWeb'repoUrl
String$class: 'CGit'$class: 'CGit'repoUrl
String$class: 'FisheyeGitRepositoryBrowser'$class: 'FisheyeGitRepositoryBrowser'repoUrl
String$class: 'GitBlitRepositoryBrowser'$class: 'GitBlitRepositoryBrowser'repoUrl
StringprojectName
String$class: 'GitBucketBrowser'$class: 'GitBucketBrowser'url
String$class: 'GitLab'$class: 'GitLab'repoUrl
Stringversion (optional)
String$class: 'GitLabBrowser'$class: 'GitLabBrowser'https://gitLab.example.com then the URL for bob's skunkworks project might be https://gitLab.example.com/bob/skunkworks.
projectUrl
https://gitLab.example.com then the URL for bob's skunkworks project might be https://gitLab.example.com/bob/skunkworks
String$class: 'GitList'$class: 'GitList'repoUrl
String$class: 'GitWeb'$class: 'GitWeb'repoUrl
String$class: 'GiteaBrowser'$class: 'GiteaBrowser'repoUrl
https://gitea.example.com then the URL for bob's skunkworks project repository might be https://gitea.example.com/bob/skunkworks
String$class: 'GithubWeb'$class: 'GithubWeb'repoUrl
String$class: 'Gitiles'$class: 'Gitiles'repoUrl
String$class: 'GitoriousWeb'$class: 'GitoriousWeb'repoUrl
String$class: 'GogsGit'$class: 'GogsGit'repoUrl
String$class: 'KilnGit'$class: 'KilnGit'repoUrl
String$class: 'Phabricator'$class: 'Phabricator'repoUrl
Stringrepo
String$class: 'RedmineWeb'$class: 'RedmineWeb'repoUrl
String$class: 'RhodeCode'$class: 'RhodeCode'repoUrl
String$class: 'ScmManagerGitRepositoryBrowser'$class: 'ScmManagerGitRepositoryBrowser'repoUrl
String$class: 'Stash'$class: 'Stash'repoUrl
String$class: 'TFS2013GitRepositoryBrowser'$class: 'TFS2013GitRepositoryBrowser'repoUrl
If TFS is also used as the repository server, this can usually be left blank.
String$class: 'TracGitRepositoryBrowser'$class: 'TracGitRepositoryBrowser'$class: 'TuleapBrowser'$class: 'TuleapBrowser'repositoryUrl
String$class: 'ViewGitWeb'$class: 'ViewGitWeb'repoUrl
StringprojectName
String$class: 'GitHubAgedRefsTrait'$class: 'GitHubAgedRefsTrait'retentionDays
StringgitHubBranchCommitSkipTraitgitHubBranchCommitSkipTraitgitHubCommitSkipTraitgitHubCommitSkipTrait$class: 'GitHubJiraValidatorTrait'$class: 'GitHubJiraValidatorTrait'jiraServerIdx
int$class: 'GitHubSCMSourceChecksTrait'$class: 'GitHubSCMSourceChecksTrait'verboseConsoleLog (optional)
boolean$class: 'GitHubSCMSourceStatusChecksTrait'$class: 'GitHubSCMSourceStatusChecksTrait'name (optional)
Stringskip (optional)
booleanskipNotifications (optional)
booleanskipProgressUpdates (optional)
booleansuppressLogs (optional)
booleanunstableBuildNeutral (optional)
boolean$class: 'GitLFSPullTrait'$class: 'GitLFSPullTrait'gitlabAvatargitlabAvatardisableProjectAvatar (optional)
booleangitlabSkipNotificationsgitlabSkipNotifications$class: 'GitToolSCMSourceTrait'$class: 'GitToolSCMSourceTrait'gitTool
String$class: 'HookRegistrationTrait'$class: 'HookRegistrationTrait'webHookMode
StringsystemHookMode
StringgitHubIgnoreDraftPullRequestFiltergitHubIgnoreDraftPullRequestFilter$class: 'IgnoreOnPushNotificationTrait'$class: 'IgnoreOnPushNotificationTrait'jervisFilterjervisFilterThis will look at the root of a GitHub reference for .jervis.yml for the branches and tags filtering. You can customize the name of the YAML file searched for if you like.
For Tags:
For Branches:
branches:
only:
- master
By default Jervis will generate Jenkins jobs for all branches that have a .jervis.yml file. You can control and limit this behavior by specifying the branches or tags key in your .jervis.yml.
You can either whitelist or blacklist branches that you want to be built:
# blacklist
branches:
except:
- legacy
- experimental
# whitelist
branches:
only:
- master
- stable
The same YAML can be applied to tags.
# blacklist
tags:
except:
- .*-rc
- .*-beta
# whitelist
tags:
only:
- v[.0-9]+
If you specify both only and except, then except will be ignored. .jervis.yml needs to be present on all branches you want to be built. .jervis.yml will be interpreted in the context of that branch so if you specify a whitelist in your master branch it will not propagate to other branches.
You can use regular expressions to whitelist or blacklist branches:
branches:
only:
- master
- /^[.0-9]+-hotfix$/
Any name surrounded with / in the list of branches is treated as a regular expression. The expression will use Pattern.compile to compile the regex string into a Groovy regular expression.
yamlFileName
The filename which will be read from GitHub to determine if a Jenkins branch, tag, or pull request should be built. Provide a comma separated list of paths to YAML files in a repository and it will check each path as a fallback.
For example, set the value to: .jervis.yml, .ci/jervis.yml and this plugin will first check for valid YAML in .jervis.yml. If no YAML exists, then it will fall back to checking .ci/jervis.yml.
String$class: 'LocalBranchTrait'$class: 'LocalBranchTrait'logCommentlogCommentlogSuccess (optional)
booleansudoUser (optional)
String$class: 'MercurialBrowserSCMSourceTrait'$class: 'MercurialBrowserSCMSourceTrait'browser
$class: 'FishEye'$class: 'FishEye'url
String$class: 'GoogleCode'$class: 'GoogleCode'url
String$class: 'HgWeb'$class: 'HgWeb'url
String$class: 'Kallithea'$class: 'Kallithea'url
String$class: 'KilnHG'$class: 'KilnHG'url
String$class: 'RhodeCode'$class: 'RhodeCode'url
String$class: 'RhodeCodeLegacy'$class: 'RhodeCodeLegacy'url
String$class: 'ScmManager'$class: 'ScmManager'url
http://YOURSCMMANAGER/scm/repo/NAMESPACE/NAME/).
String$class: 'MercurialInstallationSCMSourceTrait'$class: 'MercurialInstallationSCMSourceTrait'installation
String$class: 'NotificationContextTrait'$class: 'NotificationContextTrait'contextLabel
StringtypeSuffix
Appends the relevant suffix to the context label based on the build type. '/pr-merge', '/pr-head' or '/branch'
booleannotificationsSkipnotificationsSkipgitLabOriginDiscoverygitLabOriginDiscoverystrategyId
int$class: 'PathBasedPullRequestFilterTrait'$class: 'PathBasedPullRequestFilterTrait'inclusionField
StringexclusionField
String$class: 'PreBuildMergeTrait'$class: 'PreBuildMergeTrait'extension
optionsoptions
mergeTargetmergeTarget
master.
StringfastForwardModefastForwardMode (optional)
FF, FF_ONLY, NO_FFmergeRemotemergeRemote (optional)
origin, that contains the branch you specify below. If left blank, it'll default to the name of the first repository configured above.
StringmergeStrategymergeStrategy (optional)
DEFAULT, RESOLVE, RECURSIVE, OCTOPUS, OURS, SUBTREE, RECURSIVE_THEIRS$class: 'PretestedIntegrationSCMTrait'$class: 'PretestedIntegrationSCMTrait'extension
gitIntegrationStrategygitIntegrationStrategy
accumulatedaccumulatedsquashsquashintegrationBranchintegrationBranch
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>
StringrepoNamerepoName
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
String$class: 'PruneStaleBranchTrait'$class: 'PruneStaleBranchTrait'$class: 'PruneStaleTagTrait'$class: 'PruneStaleTagTrait'bitbucketPublicRepoPullRequestFilterbitbucketPublicRepoPullRequestFilter$class: 'PullRequestDiscoveryTrait'$class: 'PullRequestDiscoveryTrait'excludeBranchesWithPRs
boolean$class: 'PullRequestLabelsBlackListFilterTrait'$class: 'PullRequestLabelsBlackListFilterTrait'labels
String$class: 'PullRequestLabelsMatchAllFilterTrait'$class: 'PullRequestLabelsMatchAllFilterTrait'labels
String$class: 'PullRequestLabelsMatchAnyFilterTrait'$class: 'PullRequestLabelsMatchAnyFilterTrait'labels
String$class: 'PullRequestNameFilterTrait'$class: 'PullRequestNameFilterTrait'strategyId
intphrase
StringignoreCase
booleanregex
boolean$class: 'RefSpecsSCMSourceTrait'$class: 'RefSpecsSCMSourceTrait'templates
valuevalue
@{remote} will be replaced by the remote name (which defaults to origin) before use.
StringheadRegexFilterWithPRFromOriginheadRegexFilterWithPRFromOriginregex
StringtagRegex
String$class: 'RemoteNameSCMSourceTrait'$class: 'RemoteNameSCMSourceTrait'remoteName
StringskipNotificationsskipNotifications$class: 'SparseCheckoutPathsTrait'$class: 'SparseCheckoutPathsTrait'extension
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
sparseCheckoutPathssparseCheckoutPaths
pathpath
String$class: 'SubmoduleOptionTrait'$class: 'SubmoduleOptionTrait'extension
disableSubmodulesdisableSubmodules
booleanrecursiveSubmodulesrecursiveSubmodules
booleantrackingSubmodulestrackingSubmodules
booleanreferencereference
git init --bare git remote add SubProject1 https://gitrepo.com/subproject1 git remote add SubProject2 https://gitrepo.com/subproject2 git fetch --all
Stringtimeouttimeout
intparentCredentialsparentCredentials
booleandepthdepth (optional)
intshallowshallow (optional)
booleanthreadsthreads (optional)
intmrTriggerCommentmrTriggerCommentcommentBody
StringonlyTrustedMembersCanTrigger
booleantuleapBranchDiscoverytuleapBranchDiscoverytuleapNotifyPullRequesttuleapNotifyPullRequesttuleapForkPullRequestDiscoverytuleapForkPullRequestDiscoverytuleapPullRequestDiscoverytuleapPullRequestDiscovery$class: 'UserIdentityTrait'$class: 'UserIdentityTrait'extension
namename
If given, "GIT_COMMITTER_NAME=[this]" and "GIT_AUTHOR_NAME=[this]" are set for builds. This overrides whatever is in the global settings.
Stringemailemail
If given, "GIT_COMMITTER_EMAIL=[this]" and "GIT_AUTHOR_EMAIL=[this]" are set for builds. This overrides whatever is in the global settings.
StringbitbucketWebhookConfigurationbitbucketWebhookConfigurationSets the value for committersToIgnore in the Bitbucket Webhook. Value should be a comma separated string.
committerToIgnore is used to prevent triggering Jenkins builds when commits by certain users are made.
committersToIgnore
StringheadWildcardFilterWithPRFromOriginheadWildcardFilterWithPRFromOriginincludes
* as a wildcard; for example: master release*
Stringexcludes
release
StringtagIncludes
* as a wildcard; for example: *-1.* to build only 1.0 tags from the maven release plugin.
StringtagExcludes
*-0.*
String$class: 'WipeWorkspaceTrait'$class: 'WipeWorkspaceTrait'bitbucketBranchDiscoverybitbucketBranchDiscoverystrategyId
intbitbucketForkDiscoverybitbucketForkDiscoverystrategyId
inttrust
One of the great powers of pull requests is that anyone with read access to a repository can fork it, commit some changes to their fork and then create a pull request against the original repository with their changes. There are some files stored in source control that are important. For example, a Jenkinsfile may contain configuration details to sandbox pull requests in order to mitigate against malicious pull requests. In order to protect against a malicious pull request itself modifying the Jenkinsfile to remove the protections, you can define the trust policy for pull requests from forks.
Other plugins can extend the available trust policies. The default policies are:
Jenkinsfile) the contents of that file will be retrieved from the target branch on the origin repository and not from the pull request branch on the fork repository.
jenkins.scm.api.trait.SCMHeadAuthority<? super com.cloudbees.jenkins.plugins.bitbucket.BitbucketSCMSourceRequest, ? extends jenkins.scm.api.mixin.ChangeRequestSCMHead2, ? extends jenkins.scm.api.SCMRevision>bitbucketPullRequestDiscoverybitbucketPullRequestDiscoverystrategyId
intbitbucketSshCheckoutbitbucketSshCheckouthttps:// protocol for the Git repository.
This behaviour allows you to select the SSH private key to be used for checking out sources, which will consequently force the checkout to use the ssh:// protocol.
credentialsId
It must be a SSH key based credential.
StringbitbucketTagDiscoverybitbucketTagDiscoverybitbucketWebhookRegistrationbitbucketWebhookRegistrationOverrides the defaults for webhook management.
Webhooks are used to inform Jenkins about changes to repositories. There are two ways webhooks can be configured:
The Manage Jenkins » Configure Jenkins › Bitbucket Endpoints allows defining the list of servers. Each server can be associated with credentials. If credentials are defined then the default behaviour is to use those credentials to automatically manage the webhooks of all repositories that Jenkins is interested in. If no credentials are defined then the default behaviour is to require the user to manually configure webhooks.
mode
String$class: 'com.cloudogu.scmmanager.scm.BranchDiscoveryTrait'$class: 'com.cloudogu.scmmanager.scm.BranchDiscoveryTrait'$class: 'com.cloudogu.scmmanager.scm.TagDiscoveryTrait'$class: 'com.cloudogu.scmmanager.scm.TagDiscoveryTrait'dagshubBranchDiscoverydagshubBranchDiscovery$class: 'io.jenkins.plugins.dagshubbranchsource.traits.ForkPullRequestDiscoveryTrait'$class: 'io.jenkins.plugins.dagshubbranchsource.traits.ForkPullRequestDiscoveryTrait'buildOnPullHead (optional)
boolean$class: 'io.jenkins.plugins.dagshubbranchsource.traits.OriginPullRequestDiscoveryTrait'$class: 'io.jenkins.plugins.dagshubbranchsource.traits.OriginPullRequestDiscoveryTrait'buildOnPullHead (optional)
booleandagshubTagDiscoverydagshubTagDiscoverygitLabBranchDiscoverygitLabBranchDiscoverystrategyId
int$class: 'io.jenkins.plugins.gitlabbranchsource.SSHCheckoutTrait'$class: 'io.jenkins.plugins.gitlabbranchsource.SSHCheckoutTrait'https:// protocol for the Git repository.
This behaviour allows you to select the SSH private key to be used for checking out sources, which will consequently force the checkout to use the ssh:// protocol.
credentialsId
StringgitLabTagDiscoverygitLabTagDiscoverygitBranchDiscoverygitBranchDiscoverygitTagDiscoverygitTagDiscoveryheadRegexFilterheadRegexFilterregex
StringheadWildcardFilterheadWildcardFilterincludes
* as a wildcard; for example: master release*
Stringexcludes
release alpha-* beta-*
StringheadRegexFilterWithPRheadRegexFilterWithPRregex
StringtagRegex
StringheadWildcardFilterWithPRheadWildcardFilterWithPRincludes
* as a wildcard; for example: master release*
Stringexcludes
release
StringtagIncludes
* as a wildcard; for example: *-1.* to build only 1.0 tags from the maven release plugin.
StringtagExcludes
*-0.*
StringgiteaBranchDiscoverygiteaBranchDiscoverystrategyId
intgiteaForkDiscoverygiteaForkDiscoverystrategyId
inttrust
One of the great powers of pull requests is that anyone with read access to a repository can fork it, commit some changes to their fork and then create a pull request against the original repository with their changes. There are some files stored in source control that are important. For example, a Jenkinsfile may contain configuration details to sandbox pull requests in order to mitigate against malicious pull requests. In order to protect against a malicious pull request itself modifying the Jenkinsfile to remove the protections, you can define the trust policy for pull requests from forks.
Other plugins can extend the available trust policies. The default policies are:
Jenkinsfile) the contents of that file will be retrieved from the target branch on the origin repository and not from the pull request branch on the fork repository.
Nobody.
gitLabTrustMembersgitLabTrustMembersbitbucketTrustTeambitbucketTrustTeambitbucketTrustEveryonebitbucketTrustEveryonebitbucketTrustNobodybitbucketTrustNobodygitLabTrustEveryonegitLabTrustEveryonegitLabTrustNobodygitLabTrustNobodygitLabTrustPermissionsgitLabTrustPermissionsgiteaTrustContributorsgiteaTrustContributorsgiteaTrustEveryonegiteaTrustEveryonegiteaTrustNobodygiteaTrustNobodygitHubTrustContributorsgitHubTrustContributorsgitHubTrustEveryonegitHubTrustEveryonegitHubTrustNobodygitHubTrustNobodygitHubTrustPermissionsgitHubTrustPermissionsgiteaPullRequestDiscoverygiteaPullRequestDiscoverystrategyId
intgiteaSSHCheckoutgiteaSSHCheckouthttps:// protocol for the Git repository.
This behaviour allows you to select the SSH private key to be used for checking out sources, which will consequently force the checkout to use the ssh:// protocol.
credentialsId
StringgiteaTagDiscoverygiteaTagDiscoverygiteaWebhookRegistrationgiteaWebhookRegistrationOverrides the defaults for webhook management.
Webhooks are used to inform Jenkins about changes to repositories. There are two ways webhooks can be configured:
The Manage Jenkins » Configure System › Gitea Server allows defining the list of servers. Each server can be associated with credentials. If credentials are defined then the default behaviour is to use those credentials to automatically manage the webhooks of all repositories that Jenkins is interested in. If no credentials are defined then the default behaviour is to require the user to manually configure webhooks.
mode
StringgitHubBranchDiscoverygitHubBranchDiscoverystrategyId
env.GIT_BRANCH will be set to the branch name rather than PR-#. Also, status notifications for these builds will only be applied to the commit and not to the pull request.
intgitHubForkDiscoverygitHubForkDiscoverystrategyId
inttrust
One of the great powers of pull requests is that anyone with read access to a repository can fork it, commit some changes to their fork and then create a pull request against the original repository with their changes. There are some files stored in source control that are important. For example, a Jenkinsfile may contain configuration details to sandbox pull requests in order to mitigate against malicious pull requests. In order to protect against a malicious pull request itself modifying the Jenkinsfile to remove the protections, you can define the trust policy for pull requests from forks.
Other plugins can extend the available trust policies. The default policies are:
Jenkinsfile) the contents of that file will be retrieved from the target branch on the origin repository and not from the pull request branch on the fork repository.
Nobody. NOTE: all collaborators are trusted, even if they are only members of a team with read permission.
jenkins.scm.api.trait.SCMHeadAuthority<? super org.jenkinsci.plugins.github_branch_source.GitHubSCMSourceRequest, ? extends jenkins.scm.api.mixin.ChangeRequestSCMHead2, ? extends jenkins.scm.api.SCMRevision>gitHubPullRequestDiscoverygitHubPullRequestDiscoverystrategyId
intgitHubSshCheckoutgitHubSshCheckouthttps:// protocol for the Git repository.
This behaviour allows you to select the SSH private key to be used for checking out sources, which will consequently force the checkout to use the ssh:// protocol.
credentialsId
StringgitHubTagDiscoverygitHubTagDiscoverydagshubScmSourcedagshubScmSourcerepositoryUrl (optional)
https://DAGsHub.com/myuser/myrepo.git or https://DAGsHub.com/myuser/myrepo
StringcredentialsId (optional)
Stringtraits (optional)
$class: 'ApprovedPullRequestTrait'$class: 'ApprovedPullRequestTrait'strategyId
int$class: 'AuthorInChangelogTrait'$class: 'AuthorInChangelogTrait'$class: 'BitbucketAgedRefsTrait'$class: 'BitbucketAgedRefsTrait'retentionDays
StringbitbucketBranchCommitSkipTraitbitbucketBranchCommitSkipTraitbitbucketBuildStatusNotificationsbitbucketBuildStatusNotificationssendSuccessNotificationForUnstableBuild (optional)
booleanbitbucketCommitSkipTraitbitbucketCommitSkipTrait$class: 'BitbucketJiraValidatorTrait'$class: 'BitbucketJiraValidatorTrait'jiraServerIdx
intbuildStatusNameCustomPartbuildStatusNameCustomPartbuildStatusNameCustomPart (optional)
String$class: 'ChangeDiscoveryTrait'$class: 'ChangeDiscoveryTrait'queryString
Provide an additional query string to search for open changes. The status:open is implicitly added and does not need to be specified. See Gerrit search operators documentation for a detailed list of the supported search operators.
-is:wipdoes not include work-in-progress changes
is:privateincludes private changes
String$class: 'CheckoutOptionTrait'$class: 'CheckoutOptionTrait'extension
timeouttimeout
int$class: 'CleanAfterCheckoutTrait'$class: 'CleanAfterCheckoutTrait'extension
.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.
deleteUntrackedNestedRepositoriesdeleteUntrackedNestedRepositories (optional)
.git directories.
boolean$class: 'CleanBeforeCheckoutTrait'$class: 'CleanBeforeCheckoutTrait'extension
.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.
deleteUntrackedNestedRepositoriesdeleteUntrackedNestedRepositories (optional)
.git directories.
boolean$class: 'CleanMercurialSCMSourceTrait'$class: 'CleanMercurialSCMSourceTrait'$class: 'CloneOptionTrait'$class: 'CloneOptionTrait'extension
shallowshallow
booleannoTagsnoTags
booleanreferencereference
Stringtimeouttimeout
intdepthdepth (optional)
inthonorRefspechonorRefspec (optional)
boolean$class: 'DisableStatusUpdateTrait'$class: 'DisableStatusUpdateTrait'$class: 'DiscoverOtherRefsTrait'$class: 'DiscoverOtherRefsTrait'ref
The pattern under /refs on the remote repository to discover, can contain a wildcard.
Example: test/*/merged
StringnameMapping (optional)
Mapping for how the ref can be named in for example the @Library.
Example: test-@{1}
Where @{1} replaces the first wildcard in the ref when discovered.
By default it will be "namespace_before_wildcard-@{1}". E.g. if ref is "test/*/merged" the default mapping would be "test-@{1}".
String$class: 'FilterChecksTrait'$class: 'FilterChecksTrait'queryOperator
ID, SCHEMEqueryString
StringgitLabForkDiscoverygitLabForkDiscoverystrategyId
inttrust
One of the great powers of merge requests is that anyone with read access to a project can fork it, commit some changes to their fork and then create a merge request against the original project with their changes. There are some files stored in source control that are important. For example, a Jenkinsfile may contain configuration details to sandbox merge requests in order to mitigate against malicious merge requests. In order to protect against a malicious merge request itself modifying the Jenkinsfile to remove the protections, you can define the trust policy for merge requests from forks.
Other plugins can extend the available trust policies. The default policies are:
Jenkinsfile) the contents of that file will be retrieved from the target branch on the origin project and not from the merge request branch on the fork project.
Nobody.
jenkins.scm.api.trait.SCMHeadAuthority<? super io.jenkins.plugins.gitlabbranchsource.GitLabSCMSourceRequest, ? extends jenkins.scm.api.mixin.ChangeRequestSCMHead2, ? extends jenkins.scm.api.SCMRevision>$class: 'GitBrowserSCMSourceTrait'$class: 'GitBrowserSCMSourceTrait'browser
$class: 'AssemblaWeb'$class: 'AssemblaWeb'repoUrl
String$class: 'BacklogGitRepositoryBrowser'$class: 'BacklogGitRepositoryBrowser'repoName
StringrepoUrl
StringbitbucketServerbitbucketServerrepoUrl
String$class: 'BitbucketWeb'$class: 'BitbucketWeb'repoUrl
String$class: 'CGit'$class: 'CGit'repoUrl
String$class: 'FisheyeGitRepositoryBrowser'$class: 'FisheyeGitRepositoryBrowser'repoUrl
String$class: 'GitBlitRepositoryBrowser'$class: 'GitBlitRepositoryBrowser'repoUrl
StringprojectName
String$class: 'GitBucketBrowser'$class: 'GitBucketBrowser'url
String$class: 'GitLab'$class: 'GitLab'repoUrl
Stringversion (optional)
String$class: 'GitLabBrowser'$class: 'GitLabBrowser'https://gitLab.example.com then the URL for bob's skunkworks project might be https://gitLab.example.com/bob/skunkworks.
projectUrl
https://gitLab.example.com then the URL for bob's skunkworks project might be https://gitLab.example.com/bob/skunkworks
String$class: 'GitList'$class: 'GitList'repoUrl
String$class: 'GitWeb'$class: 'GitWeb'repoUrl
String$class: 'GiteaBrowser'$class: 'GiteaBrowser'repoUrl
https://gitea.example.com then the URL for bob's skunkworks project repository might be https://gitea.example.com/bob/skunkworks
String$class: 'GithubWeb'$class: 'GithubWeb'repoUrl
String$class: 'Gitiles'$class: 'Gitiles'repoUrl
String$class: 'GitoriousWeb'$class: 'GitoriousWeb'repoUrl
String$class: 'GogsGit'$class: 'GogsGit'repoUrl
String$class: 'KilnGit'$class: 'KilnGit'repoUrl
String$class: 'Phabricator'$class: 'Phabricator'repoUrl
Stringrepo
String$class: 'RedmineWeb'$class: 'RedmineWeb'repoUrl
String$class: 'RhodeCode'$class: 'RhodeCode'repoUrl
String$class: 'ScmManagerGitRepositoryBrowser'$class: 'ScmManagerGitRepositoryBrowser'repoUrl
String$class: 'Stash'$class: 'Stash'repoUrl
String$class: 'TFS2013GitRepositoryBrowser'$class: 'TFS2013GitRepositoryBrowser'repoUrl
If TFS is also used as the repository server, this can usually be left blank.
String$class: 'TracGitRepositoryBrowser'$class: 'TracGitRepositoryBrowser'$class: 'TuleapBrowser'$class: 'TuleapBrowser'repositoryUrl
String$class: 'ViewGitWeb'$class: 'ViewGitWeb'repoUrl
StringprojectName
String$class: 'GitHubAgedRefsTrait'$class: 'GitHubAgedRefsTrait'retentionDays
StringgitHubBranchCommitSkipTraitgitHubBranchCommitSkipTraitgitHubCommitSkipTraitgitHubCommitSkipTrait$class: 'GitHubJiraValidatorTrait'$class: 'GitHubJiraValidatorTrait'jiraServerIdx
int$class: 'GitHubSCMSourceChecksTrait'$class: 'GitHubSCMSourceChecksTrait'verboseConsoleLog (optional)
boolean$class: 'GitHubSCMSourceStatusChecksTrait'$class: 'GitHubSCMSourceStatusChecksTrait'name (optional)
Stringskip (optional)
booleanskipNotifications (optional)
booleanskipProgressUpdates (optional)
booleansuppressLogs (optional)
booleanunstableBuildNeutral (optional)
boolean$class: 'GitLFSPullTrait'$class: 'GitLFSPullTrait'gitlabAvatargitlabAvatardisableProjectAvatar (optional)
booleangitlabSkipNotificationsgitlabSkipNotifications$class: 'GitToolSCMSourceTrait'$class: 'GitToolSCMSourceTrait'gitTool
String$class: 'HookRegistrationTrait'$class: 'HookRegistrationTrait'webHookMode
StringsystemHookMode
StringgitHubIgnoreDraftPullRequestFiltergitHubIgnoreDraftPullRequestFilter$class: 'IgnoreOnPushNotificationTrait'$class: 'IgnoreOnPushNotificationTrait'jervisFilterjervisFilterThis will look at the root of a GitHub reference for .jervis.yml for the branches and tags filtering. You can customize the name of the YAML file searched for if you like.
For Tags:
For Branches:
branches:
only:
- master
By default Jervis will generate Jenkins jobs for all branches that have a .jervis.yml file. You can control and limit this behavior by specifying the branches or tags key in your .jervis.yml.
You can either whitelist or blacklist branches that you want to be built:
# blacklist
branches:
except:
- legacy
- experimental
# whitelist
branches:
only:
- master
- stable
The same YAML can be applied to tags.
# blacklist
tags:
except:
- .*-rc
- .*-beta
# whitelist
tags:
only:
- v[.0-9]+
If you specify both only and except, then except will be ignored. .jervis.yml needs to be present on all branches you want to be built. .jervis.yml will be interpreted in the context of that branch so if you specify a whitelist in your master branch it will not propagate to other branches.
You can use regular expressions to whitelist or blacklist branches:
branches:
only:
- master
- /^[.0-9]+-hotfix$/
Any name surrounded with / in the list of branches is treated as a regular expression. The expression will use Pattern.compile to compile the regex string into a Groovy regular expression.
yamlFileName
The filename which will be read from GitHub to determine if a Jenkins branch, tag, or pull request should be built. Provide a comma separated list of paths to YAML files in a repository and it will check each path as a fallback.
For example, set the value to: .jervis.yml, .ci/jervis.yml and this plugin will first check for valid YAML in .jervis.yml. If no YAML exists, then it will fall back to checking .ci/jervis.yml.
String$class: 'LocalBranchTrait'$class: 'LocalBranchTrait'logCommentlogCommentlogSuccess (optional)
booleansudoUser (optional)
String$class: 'MercurialBrowserSCMSourceTrait'$class: 'MercurialBrowserSCMSourceTrait'browser
$class: 'FishEye'$class: 'FishEye'url
String$class: 'GoogleCode'$class: 'GoogleCode'url
String$class: 'HgWeb'$class: 'HgWeb'url
String$class: 'Kallithea'$class: 'Kallithea'url
String$class: 'KilnHG'$class: 'KilnHG'url
String$class: 'RhodeCode'$class: 'RhodeCode'url
String$class: 'RhodeCodeLegacy'$class: 'RhodeCodeLegacy'url
String$class: 'ScmManager'$class: 'ScmManager'url
http://YOURSCMMANAGER/scm/repo/NAMESPACE/NAME/).
String$class: 'MercurialInstallationSCMSourceTrait'$class: 'MercurialInstallationSCMSourceTrait'installation
String$class: 'NotificationContextTrait'$class: 'NotificationContextTrait'contextLabel
StringtypeSuffix
Appends the relevant suffix to the context label based on the build type. '/pr-merge', '/pr-head' or '/branch'
booleannotificationsSkipnotificationsSkipgitLabOriginDiscoverygitLabOriginDiscoverystrategyId
int$class: 'PathBasedPullRequestFilterTrait'$class: 'PathBasedPullRequestFilterTrait'inclusionField
StringexclusionField
String$class: 'PreBuildMergeTrait'$class: 'PreBuildMergeTrait'extension
optionsoptions
mergeTargetmergeTarget
master.
StringfastForwardModefastForwardMode (optional)
FF, FF_ONLY, NO_FFmergeRemotemergeRemote (optional)
origin, that contains the branch you specify below. If left blank, it'll default to the name of the first repository configured above.
StringmergeStrategymergeStrategy (optional)
DEFAULT, RESOLVE, RECURSIVE, OCTOPUS, OURS, SUBTREE, RECURSIVE_THEIRS$class: 'PretestedIntegrationSCMTrait'$class: 'PretestedIntegrationSCMTrait'extension
gitIntegrationStrategygitIntegrationStrategy
accumulatedaccumulatedsquashsquashintegrationBranchintegrationBranch
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>
StringrepoNamerepoName
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
String$class: 'PruneStaleBranchTrait'$class: 'PruneStaleBranchTrait'$class: 'PruneStaleTagTrait'$class: 'PruneStaleTagTrait'bitbucketPublicRepoPullRequestFilterbitbucketPublicRepoPullRequestFilter$class: 'PullRequestDiscoveryTrait'$class: 'PullRequestDiscoveryTrait'excludeBranchesWithPRs
boolean$class: 'PullRequestLabelsBlackListFilterTrait'$class: 'PullRequestLabelsBlackListFilterTrait'labels
String$class: 'PullRequestLabelsMatchAllFilterTrait'$class: 'PullRequestLabelsMatchAllFilterTrait'labels
String$class: 'PullRequestLabelsMatchAnyFilterTrait'$class: 'PullRequestLabelsMatchAnyFilterTrait'labels
String$class: 'PullRequestNameFilterTrait'$class: 'PullRequestNameFilterTrait'strategyId
intphrase
StringignoreCase
booleanregex
boolean$class: 'RefSpecsSCMSourceTrait'$class: 'RefSpecsSCMSourceTrait'templates
valuevalue
@{remote} will be replaced by the remote name (which defaults to origin) before use.
StringheadRegexFilterWithPRFromOriginheadRegexFilterWithPRFromOriginregex
StringtagRegex
String$class: 'RemoteNameSCMSourceTrait'$class: 'RemoteNameSCMSourceTrait'remoteName
StringskipNotificationsskipNotifications$class: 'SparseCheckoutPathsTrait'$class: 'SparseCheckoutPathsTrait'extension
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
sparseCheckoutPathssparseCheckoutPaths
pathpath
String$class: 'SubmoduleOptionTrait'$class: 'SubmoduleOptionTrait'extension
disableSubmodulesdisableSubmodules
booleanrecursiveSubmodulesrecursiveSubmodules
booleantrackingSubmodulestrackingSubmodules
booleanreferencereference
git init --bare git remote add SubProject1 https://gitrepo.com/subproject1 git remote add SubProject2 https://gitrepo.com/subproject2 git fetch --all
Stringtimeouttimeout
intparentCredentialsparentCredentials
booleandepthdepth (optional)
intshallowshallow (optional)
booleanthreadsthreads (optional)
intmrTriggerCommentmrTriggerCommentcommentBody
StringonlyTrustedMembersCanTrigger
booleantuleapBranchDiscoverytuleapBranchDiscoverytuleapNotifyPullRequesttuleapNotifyPullRequesttuleapForkPullRequestDiscoverytuleapForkPullRequestDiscoverytuleapPullRequestDiscoverytuleapPullRequestDiscovery$class: 'UserIdentityTrait'$class: 'UserIdentityTrait'extension
namename
If given, "GIT_COMMITTER_NAME=[this]" and "GIT_AUTHOR_NAME=[this]" are set for builds. This overrides whatever is in the global settings.
Stringemailemail
If given, "GIT_COMMITTER_EMAIL=[this]" and "GIT_AUTHOR_EMAIL=[this]" are set for builds. This overrides whatever is in the global settings.
StringbitbucketWebhookConfigurationbitbucketWebhookConfigurationSets the value for committersToIgnore in the Bitbucket Webhook. Value should be a comma separated string.
committerToIgnore is used to prevent triggering Jenkins builds when commits by certain users are made.
committersToIgnore
StringheadWildcardFilterWithPRFromOriginheadWildcardFilterWithPRFromOriginincludes
* as a wildcard; for example: master release*
Stringexcludes
release
StringtagIncludes
* as a wildcard; for example: *-1.* to build only 1.0 tags from the maven release plugin.
StringtagExcludes
*-0.*
String$class: 'WipeWorkspaceTrait'$class: 'WipeWorkspaceTrait'bitbucketBranchDiscoverybitbucketBranchDiscoverystrategyId
intbitbucketForkDiscoverybitbucketForkDiscoverystrategyId
inttrust
One of the great powers of pull requests is that anyone with read access to a repository can fork it, commit some changes to their fork and then create a pull request against the original repository with their changes. There are some files stored in source control that are important. For example, a Jenkinsfile may contain configuration details to sandbox pull requests in order to mitigate against malicious pull requests. In order to protect against a malicious pull request itself modifying the Jenkinsfile to remove the protections, you can define the trust policy for pull requests from forks.
Other plugins can extend the available trust policies. The default policies are:
Jenkinsfile) the contents of that file will be retrieved from the target branch on the origin repository and not from the pull request branch on the fork repository.
jenkins.scm.api.trait.SCMHeadAuthority<? super com.cloudbees.jenkins.plugins.bitbucket.BitbucketSCMSourceRequest, ? extends jenkins.scm.api.mixin.ChangeRequestSCMHead2, ? extends jenkins.scm.api.SCMRevision>bitbucketPullRequestDiscoverybitbucketPullRequestDiscoverystrategyId
intbitbucketSshCheckoutbitbucketSshCheckouthttps:// protocol for the Git repository.
This behaviour allows you to select the SSH private key to be used for checking out sources, which will consequently force the checkout to use the ssh:// protocol.
credentialsId
It must be a SSH key based credential.
StringbitbucketTagDiscoverybitbucketTagDiscoverybitbucketWebhookRegistrationbitbucketWebhookRegistrationOverrides the defaults for webhook management.
Webhooks are used to inform Jenkins about changes to repositories. There are two ways webhooks can be configured:
The Manage Jenkins » Configure Jenkins › Bitbucket Endpoints allows defining the list of servers. Each server can be associated with credentials. If credentials are defined then the default behaviour is to use those credentials to automatically manage the webhooks of all repositories that Jenkins is interested in. If no credentials are defined then the default behaviour is to require the user to manually configure webhooks.
mode
String$class: 'com.cloudogu.scmmanager.scm.BranchDiscoveryTrait'$class: 'com.cloudogu.scmmanager.scm.BranchDiscoveryTrait'$class: 'com.cloudogu.scmmanager.scm.TagDiscoveryTrait'$class: 'com.cloudogu.scmmanager.scm.TagDiscoveryTrait'dagshubBranchDiscoverydagshubBranchDiscovery$class: 'io.jenkins.plugins.dagshubbranchsource.traits.ForkPullRequestDiscoveryTrait'$class: 'io.jenkins.plugins.dagshubbranchsource.traits.ForkPullRequestDiscoveryTrait'buildOnPullHead (optional)
boolean$class: 'io.jenkins.plugins.dagshubbranchsource.traits.OriginPullRequestDiscoveryTrait'$class: 'io.jenkins.plugins.dagshubbranchsource.traits.OriginPullRequestDiscoveryTrait'buildOnPullHead (optional)
booleandagshubTagDiscoverydagshubTagDiscoverygitLabBranchDiscoverygitLabBranchDiscoverystrategyId
int$class: 'io.jenkins.plugins.gitlabbranchsource.SSHCheckoutTrait'$class: 'io.jenkins.plugins.gitlabbranchsource.SSHCheckoutTrait'https:// protocol for the Git repository.
This behaviour allows you to select the SSH private key to be used for checking out sources, which will consequently force the checkout to use the ssh:// protocol.
credentialsId
StringgitLabTagDiscoverygitLabTagDiscoverygitBranchDiscoverygitBranchDiscoverygitTagDiscoverygitTagDiscoveryheadRegexFilterheadRegexFilterregex
StringheadWildcardFilterheadWildcardFilterincludes
* as a wildcard; for example: master release*
Stringexcludes
release alpha-* beta-*
StringheadRegexFilterWithPRheadRegexFilterWithPRregex
StringtagRegex
StringheadWildcardFilterWithPRheadWildcardFilterWithPRincludes
* as a wildcard; for example: master release*
Stringexcludes
release
StringtagIncludes
* as a wildcard; for example: *-1.* to build only 1.0 tags from the maven release plugin.
StringtagExcludes
*-0.*
StringgiteaBranchDiscoverygiteaBranchDiscoverystrategyId
intgiteaForkDiscoverygiteaForkDiscoverystrategyId
inttrust
One of the great powers of pull requests is that anyone with read access to a repository can fork it, commit some changes to their fork and then create a pull request against the original repository with their changes. There are some files stored in source control that are important. For example, a Jenkinsfile may contain configuration details to sandbox pull requests in order to mitigate against malicious pull requests. In order to protect against a malicious pull request itself modifying the Jenkinsfile to remove the protections, you can define the trust policy for pull requests from forks.
Other plugins can extend the available trust policies. The default policies are:
Jenkinsfile) the contents of that file will be retrieved from the target branch on the origin repository and not from the pull request branch on the fork repository.
Nobody.
gitLabTrustMembersgitLabTrustMembersbitbucketTrustTeambitbucketTrustTeambitbucketTrustEveryonebitbucketTrustEveryonebitbucketTrustNobodybitbucketTrustNobodygitLabTrustEveryonegitLabTrustEveryonegitLabTrustNobodygitLabTrustNobodygitLabTrustPermissionsgitLabTrustPermissionsgiteaTrustContributorsgiteaTrustContributorsgiteaTrustEveryonegiteaTrustEveryonegiteaTrustNobodygiteaTrustNobodygitHubTrustContributorsgitHubTrustContributorsgitHubTrustEveryonegitHubTrustEveryonegitHubTrustNobodygitHubTrustNobodygitHubTrustPermissionsgitHubTrustPermissionsgiteaPullRequestDiscoverygiteaPullRequestDiscoverystrategyId
intgiteaSSHCheckoutgiteaSSHCheckouthttps:// protocol for the Git repository.
This behaviour allows you to select the SSH private key to be used for checking out sources, which will consequently force the checkout to use the ssh:// protocol.
credentialsId
StringgiteaTagDiscoverygiteaTagDiscoverygiteaWebhookRegistrationgiteaWebhookRegistrationOverrides the defaults for webhook management.
Webhooks are used to inform Jenkins about changes to repositories. There are two ways webhooks can be configured:
The Manage Jenkins » Configure System › Gitea Server allows defining the list of servers. Each server can be associated with credentials. If credentials are defined then the default behaviour is to use those credentials to automatically manage the webhooks of all repositories that Jenkins is interested in. If no credentials are defined then the default behaviour is to require the user to manually configure webhooks.
mode
StringgitHubBranchDiscoverygitHubBranchDiscoverystrategyId
env.GIT_BRANCH will be set to the branch name rather than PR-#. Also, status notifications for these builds will only be applied to the commit and not to the pull request.
intgitHubForkDiscoverygitHubForkDiscoverystrategyId
inttrust
One of the great powers of pull requests is that anyone with read access to a repository can fork it, commit some changes to their fork and then create a pull request against the original repository with their changes. There are some files stored in source control that are important. For example, a Jenkinsfile may contain configuration details to sandbox pull requests in order to mitigate against malicious pull requests. In order to protect against a malicious pull request itself modifying the Jenkinsfile to remove the protections, you can define the trust policy for pull requests from forks.
Other plugins can extend the available trust policies. The default policies are:
Jenkinsfile) the contents of that file will be retrieved from the target branch on the origin repository and not from the pull request branch on the fork repository.
Nobody. NOTE: all collaborators are trusted, even if they are only members of a team with read permission.
jenkins.scm.api.trait.SCMHeadAuthority<? super org.jenkinsci.plugins.github_branch_source.GitHubSCMSourceRequest, ? extends jenkins.scm.api.mixin.ChangeRequestSCMHead2, ? extends jenkins.scm.api.SCMRevision>gitHubPullRequestDiscoverygitHubPullRequestDiscoverystrategyId
intgitHubSshCheckoutgitHubSshCheckouthttps:// protocol for the Git repository.
This behaviour allows you to select the SSH private key to be used for checking out sources, which will consequently force the checkout to use the ssh:// protocol.
credentialsId
StringgitHubTagDiscoverygitHubTagDiscoveryid (optional)
Stringgerritgerritremote
Stringbrowser (optional)
$class: 'AssemblaWeb'$class: 'AssemblaWeb'repoUrl
String$class: 'BacklogGitRepositoryBrowser'$class: 'BacklogGitRepositoryBrowser'repoName
StringrepoUrl
StringbitbucketServerbitbucketServerrepoUrl
String$class: 'BitbucketWeb'$class: 'BitbucketWeb'repoUrl
String$class: 'CGit'$class: 'CGit'repoUrl
String$class: 'FisheyeGitRepositoryBrowser'$class: 'FisheyeGitRepositoryBrowser'repoUrl
String$class: 'GitBlitRepositoryBrowser'$class: 'GitBlitRepositoryBrowser'repoUrl
StringprojectName
String$class: 'GitBucketBrowser'$class: 'GitBucketBrowser'url
String$class: 'GitLab'$class: 'GitLab'repoUrl
Stringversion (optional)
String$class: 'GitLabBrowser'$class: 'GitLabBrowser'https://gitLab.example.com then the URL for bob's skunkworks project might be https://gitLab.example.com/bob/skunkworks.
projectUrl
https://gitLab.example.com then the URL for bob's skunkworks project might be https://gitLab.example.com/bob/skunkworks
String$class: 'GitList'$class: 'GitList'repoUrl
String$class: 'GitWeb'$class: 'GitWeb'repoUrl
String$class: 'GiteaBrowser'$class: 'GiteaBrowser'repoUrl
https://gitea.example.com then the URL for bob's skunkworks project repository might be https://gitea.example.com/bob/skunkworks
String$class: 'GithubWeb'$class: 'GithubWeb'repoUrl
String$class: 'Gitiles'$class: 'Gitiles'repoUrl
String$class: 'GitoriousWeb'$class: 'GitoriousWeb'repoUrl
String$class: 'GogsGit'$class: 'GogsGit'repoUrl
String$class: 'KilnGit'$class: 'KilnGit'repoUrl
String$class: 'Phabricator'$class: 'Phabricator'repoUrl
Stringrepo
String$class: 'RedmineWeb'$class: 'RedmineWeb'repoUrl
String$class: 'RhodeCode'$class: 'RhodeCode'repoUrl
String$class: 'ScmManagerGitRepositoryBrowser'$class: 'ScmManagerGitRepositoryBrowser'repoUrl
String$class: 'Stash'$class: 'Stash'repoUrl
String$class: 'TFS2013GitRepositoryBrowser'$class: 'TFS2013GitRepositoryBrowser'repoUrl
If TFS is also used as the repository server, this can usually be left blank.
String$class: 'TracGitRepositoryBrowser'$class: 'TracGitRepositoryBrowser'$class: 'TuleapBrowser'$class: 'TuleapBrowser'repositoryUrl
String$class: 'ViewGitWeb'$class: 'ViewGitWeb'repoUrl
StringprojectName
StringcredentialsId (optional)
Stringextensions (optional)
$class: 'AuthorInChangelog'$class: 'AuthorInChangelog'$class: 'BuildChooserSetting'$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: 'AlternativeBuildChooser'$class: 'AncestryBuildChooser'$class: 'AncestryBuildChooser'maximumAgeInDays
intancestorCommitSha1
String$class: 'DefaultBuildChooser'$class: 'DefaultBuildChooser'$class: 'DeflakeGitBuildChooser'$class: 'DeflakeGitBuildChooser'$class: 'GerritTriggerBuildChooser'$class: 'GerritTriggerBuildChooser'$class: 'InverseBuildChooser'$class: 'InverseBuildChooser'$class: 'BuildSingleRevisionOnly'$class: 'BuildSingleRevisionOnly'$class: 'ChangelogToBranch'$class: 'ChangelogToBranch'options
compareRemotecompareRemote
origin, that contains the branch you specify below.
StringcompareTargetcompareTarget
String$class: 'CheckoutOption'$class: 'CheckoutOption'timeout
int$class: 'CleanBeforeCheckout'$class: '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 (optional)
.git directories.
boolean$class: 'CleanCheckout'$class: 'CleanCheckout'.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 (optional)
.git directories.
boolean$class: 'CloneOption'$class: 'CloneOption'shallow
booleannoTags
booleanreference
Stringtimeout
intdepth (optional)
inthonorRefspec (optional)
boolean$class: 'CodeCommitURLHelper'$class: 'CodeCommitURLHelper'credentialId
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.
StringrepositoryName
String$class: 'DisableRemotePoll'$class: 'DisableRemotePoll'$class: 'ExcludeFromChangeSet'$class: 'ExcludeFromChangeSet'$class: 'ExcludeFromPoll'$class: 'ExcludeFromPoll'$class: 'GitLFSPull'$class: 'GitLFSPull'$class: 'GitSCMChecksExtension'$class: 'GitSCMChecksExtension'verboseConsoleLog (optional)
boolean$class: 'GitSCMStatusChecksExtension'$class: 'GitSCMStatusChecksExtension'name (optional)
Stringskip (optional)
booleanskipProgressUpdates (optional)
booleansuppressLogs (optional)
booleanunstableBuildNeutral (optional)
boolean$class: 'GitTagMessageExtension'$class: 'GitTagMessageExtension'useMostRecentTag (optional)
boolean$class: 'IgnoreNotifyCommit'$class: 'IgnoreNotifyCommit'$class: 'LocalBranch'$class: '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'$class: 'MessageExclusion'excludedMessage
.*\[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.
String$class: 'PathRestriction'$class: 'PathRestriction'includedRegions
myapp/src/main/web/.*\.html
myapp/src/main/web/.*\.jpeg
myapp/src/main/web/.*\.gif
The 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.
StringexcludedRegions
myapp/src/main/web/.*\.html
myapp/src/main/web/.*\.jpeg
myapp/src/main/web/.*\.gif
The example above illustrates that if only html/jpeg/gif files have been committed to the SCM a build will not occur.
String$class: 'PerBuildTag'$class: 'PerBuildTag'$class: 'PreBuildMerge'$class: 'PreBuildMerge'options
mergeTargetmergeTarget
master.
StringfastForwardModefastForwardMode (optional)
FF, FF_ONLY, NO_FFmergeRemotemergeRemote (optional)
origin, that contains the branch you specify below. If left blank, it'll default to the name of the first repository configured above.
StringmergeStrategymergeStrategy (optional)
DEFAULT, RESOLVE, RECURSIVE, OCTOPUS, OURS, SUBTREE, RECURSIVE_THEIRSpretestedIntegrationpretestedIntegrationgitIntegrationStrategy
accumulatedaccumulatedsquashsquashintegrationBranch
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>
StringrepoName
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
String$class: 'PruneStaleBranch'$class: 'PruneStaleBranch'pruneTagspruneTagspruneTags
boolean$class: 'RelativeTargetDirectory'$class: 'RelativeTargetDirectory'relativeTargetDir
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.
String$class: 'ScmName'$class: 'ScmName'Unique name for this SCM. Needed when using Git within the Multi SCM plugin.
name
String$class: 'SparseCheckoutPaths'$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
pathpath
String$class: 'SubmoduleOption'$class: 'SubmoduleOption'disableSubmodules
booleanrecursiveSubmodules
booleantrackingSubmodules
booleanreference
git init --bare git remote add SubProject1 https://gitrepo.com/subproject1 git remote add SubProject2 https://gitrepo.com/subproject2 git fetch --all
Stringtimeout
intparentCredentials
booleandepth (optional)
intshallow (optional)
booleanthreads (optional)
int$class: 'UserExclusion'$class: 'UserExclusion'excludedUsers
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.
String$class: 'UserIdentity'$class: 'UserIdentity'name
If given, "GIT_COMMITTER_NAME=[this]" and "GIT_AUTHOR_NAME=[this]" are set for builds. This overrides whatever is in the global settings.
Stringemail
If given, "GIT_COMMITTER_EMAIL=[this]" and "GIT_AUTHOR_EMAIL=[this]" are set for builds. This overrides whatever is in the global settings.
String$class: 'WipeWorkspace'$class: 'WipeWorkspace'gitTool (optional)
Stringid (optional)
StringinsecureHttps (optional)
booleantraits (optional)
$class: 'ApprovedPullRequestTrait'$class: 'ApprovedPullRequestTrait'strategyId
int$class: 'AuthorInChangelogTrait'$class: 'AuthorInChangelogTrait'$class: 'BitbucketAgedRefsTrait'$class: 'BitbucketAgedRefsTrait'retentionDays
StringbitbucketBranchCommitSkipTraitbitbucketBranchCommitSkipTraitbitbucketBuildStatusNotificationsbitbucketBuildStatusNotificationssendSuccessNotificationForUnstableBuild (optional)
booleanbitbucketCommitSkipTraitbitbucketCommitSkipTrait$class: 'BitbucketJiraValidatorTrait'$class: 'BitbucketJiraValidatorTrait'jiraServerIdx
intbuildStatusNameCustomPartbuildStatusNameCustomPartbuildStatusNameCustomPart (optional)
String$class: 'ChangeDiscoveryTrait'$class: 'ChangeDiscoveryTrait'queryString
Provide an additional query string to search for open changes. The status:open is implicitly added and does not need to be specified. See Gerrit search operators documentation for a detailed list of the supported search operators.
-is:wipdoes not include work-in-progress changes
is:privateincludes private changes
String$class: 'CheckoutOptionTrait'$class: 'CheckoutOptionTrait'extension
timeouttimeout
int$class: 'CleanAfterCheckoutTrait'$class: 'CleanAfterCheckoutTrait'extension
.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.
deleteUntrackedNestedRepositoriesdeleteUntrackedNestedRepositories (optional)
.git directories.
boolean$class: 'CleanBeforeCheckoutTrait'$class: 'CleanBeforeCheckoutTrait'extension
.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.
deleteUntrackedNestedRepositoriesdeleteUntrackedNestedRepositories (optional)
.git directories.
boolean$class: 'CleanMercurialSCMSourceTrait'$class: 'CleanMercurialSCMSourceTrait'$class: 'CloneOptionTrait'$class: 'CloneOptionTrait'extension
shallowshallow
booleannoTagsnoTags
booleanreferencereference
Stringtimeouttimeout
intdepthdepth (optional)
inthonorRefspechonorRefspec (optional)
boolean$class: 'DisableStatusUpdateTrait'$class: 'DisableStatusUpdateTrait'$class: 'DiscoverOtherRefsTrait'$class: 'DiscoverOtherRefsTrait'ref
The pattern under /refs on the remote repository to discover, can contain a wildcard.
Example: test/*/merged
StringnameMapping (optional)
Mapping for how the ref can be named in for example the @Library.
Example: test-@{1}
Where @{1} replaces the first wildcard in the ref when discovered.
By default it will be "namespace_before_wildcard-@{1}". E.g. if ref is "test/*/merged" the default mapping would be "test-@{1}".
String$class: 'FilterChecksTrait'$class: 'FilterChecksTrait'queryOperator
ID, SCHEMEqueryString
StringgitLabForkDiscoverygitLabForkDiscoverystrategyId
inttrust
One of the great powers of merge requests is that anyone with read access to a project can fork it, commit some changes to their fork and then create a merge request against the original project with their changes. There are some files stored in source control that are important. For example, a Jenkinsfile may contain configuration details to sandbox merge requests in order to mitigate against malicious merge requests. In order to protect against a malicious merge request itself modifying the Jenkinsfile to remove the protections, you can define the trust policy for merge requests from forks.
Other plugins can extend the available trust policies. The default policies are:
Jenkinsfile) the contents of that file will be retrieved from the target branch on the origin project and not from the merge request branch on the fork project.
Nobody.
jenkins.scm.api.trait.SCMHeadAuthority<? super io.jenkins.plugins.gitlabbranchsource.GitLabSCMSourceRequest, ? extends jenkins.scm.api.mixin.ChangeRequestSCMHead2, ? extends jenkins.scm.api.SCMRevision>$class: 'GitBrowserSCMSourceTrait'$class: 'GitBrowserSCMSourceTrait'browser
$class: 'AssemblaWeb'$class: 'AssemblaWeb'repoUrl
String$class: 'BacklogGitRepositoryBrowser'$class: 'BacklogGitRepositoryBrowser'repoName
StringrepoUrl
StringbitbucketServerbitbucketServerrepoUrl
String$class: 'BitbucketWeb'$class: 'BitbucketWeb'repoUrl
String$class: 'CGit'$class: 'CGit'repoUrl
String$class: 'FisheyeGitRepositoryBrowser'$class: 'FisheyeGitRepositoryBrowser'repoUrl
String$class: 'GitBlitRepositoryBrowser'$class: 'GitBlitRepositoryBrowser'repoUrl
StringprojectName
String$class: 'GitBucketBrowser'$class: 'GitBucketBrowser'url
String$class: 'GitLab'$class: 'GitLab'repoUrl
Stringversion (optional)
String$class: 'GitLabBrowser'$class: 'GitLabBrowser'https://gitLab.example.com then the URL for bob's skunkworks project might be https://gitLab.example.com/bob/skunkworks.
projectUrl
https://gitLab.example.com then the URL for bob's skunkworks project might be https://gitLab.example.com/bob/skunkworks
String$class: 'GitList'$class: 'GitList'repoUrl
String$class: 'GitWeb'$class: 'GitWeb'repoUrl
String$class: 'GiteaBrowser'$class: 'GiteaBrowser'repoUrl
https://gitea.example.com then the URL for bob's skunkworks project repository might be https://gitea.example.com/bob/skunkworks
String$class: 'GithubWeb'$class: 'GithubWeb'repoUrl
String$class: 'Gitiles'$class: 'Gitiles'repoUrl
String$class: 'GitoriousWeb'$class: 'GitoriousWeb'repoUrl
String$class: 'GogsGit'$class: 'GogsGit'repoUrl
String$class: 'KilnGit'$class: 'KilnGit'repoUrl
String$class: 'Phabricator'$class: 'Phabricator'repoUrl
Stringrepo
String$class: 'RedmineWeb'$class: 'RedmineWeb'repoUrl
String$class: 'RhodeCode'$class: 'RhodeCode'repoUrl
String$class: 'ScmManagerGitRepositoryBrowser'$class: 'ScmManagerGitRepositoryBrowser'repoUrl
String$class: 'Stash'$class: 'Stash'repoUrl
String$class: 'TFS2013GitRepositoryBrowser'$class: 'TFS2013GitRepositoryBrowser'repoUrl
If TFS is also used as the repository server, this can usually be left blank.
String$class: 'TracGitRepositoryBrowser'$class: 'TracGitRepositoryBrowser'$class: 'TuleapBrowser'$class: 'TuleapBrowser'repositoryUrl
String$class: 'ViewGitWeb'$class: 'ViewGitWeb'repoUrl
StringprojectName
String$class: 'GitHubAgedRefsTrait'$class: 'GitHubAgedRefsTrait'retentionDays
StringgitHubBranchCommitSkipTraitgitHubBranchCommitSkipTraitgitHubCommitSkipTraitgitHubCommitSkipTrait$class: 'GitHubJiraValidatorTrait'$class: 'GitHubJiraValidatorTrait'jiraServerIdx
int$class: 'GitHubSCMSourceChecksTrait'$class: 'GitHubSCMSourceChecksTrait'verboseConsoleLog (optional)
boolean$class: 'GitHubSCMSourceStatusChecksTrait'$class: 'GitHubSCMSourceStatusChecksTrait'name (optional)
Stringskip (optional)
booleanskipNotifications (optional)
booleanskipProgressUpdates (optional)
booleansuppressLogs (optional)
booleanunstableBuildNeutral (optional)
boolean$class: 'GitLFSPullTrait'$class: 'GitLFSPullTrait'gitlabAvatargitlabAvatardisableProjectAvatar (optional)
booleangitlabSkipNotificationsgitlabSkipNotifications$class: 'GitToolSCMSourceTrait'$class: 'GitToolSCMSourceTrait'gitTool
String$class: 'HookRegistrationTrait'$class: 'HookRegistrationTrait'webHookMode
StringsystemHookMode
StringgitHubIgnoreDraftPullRequestFiltergitHubIgnoreDraftPullRequestFilter$class: 'IgnoreOnPushNotificationTrait'$class: 'IgnoreOnPushNotificationTrait'jervisFilterjervisFilterThis will look at the root of a GitHub reference for .jervis.yml for the branches and tags filtering. You can customize the name of the YAML file searched for if you like.
For Tags:
For Branches:
branches:
only:
- master
By default Jervis will generate Jenkins jobs for all branches that have a .jervis.yml file. You can control and limit this behavior by specifying the branches or tags key in your .jervis.yml.
You can either whitelist or blacklist branches that you want to be built:
# blacklist
branches:
except:
- legacy
- experimental
# whitelist
branches:
only:
- master
- stable
The same YAML can be applied to tags.
# blacklist
tags:
except:
- .*-rc
- .*-beta
# whitelist
tags:
only:
- v[.0-9]+
If you specify both only and except, then except will be ignored. .jervis.yml needs to be present on all branches you want to be built. .jervis.yml will be interpreted in the context of that branch so if you specify a whitelist in your master branch it will not propagate to other branches.
You can use regular expressions to whitelist or blacklist branches:
branches:
only:
- master
- /^[.0-9]+-hotfix$/
Any name surrounded with / in the list of branches is treated as a regular expression. The expression will use Pattern.compile to compile the regex string into a Groovy regular expression.
yamlFileName
The filename which will be read from GitHub to determine if a Jenkins branch, tag, or pull request should be built. Provide a comma separated list of paths to YAML files in a repository and it will check each path as a fallback.
For example, set the value to: .jervis.yml, .ci/jervis.yml and this plugin will first check for valid YAML in .jervis.yml. If no YAML exists, then it will fall back to checking .ci/jervis.yml.
String$class: 'LocalBranchTrait'$class: 'LocalBranchTrait'logCommentlogCommentlogSuccess (optional)
booleansudoUser (optional)
String$class: 'MercurialBrowserSCMSourceTrait'$class: 'MercurialBrowserSCMSourceTrait'browser
$class: 'FishEye'$class: 'FishEye'url
String$class: 'GoogleCode'$class: 'GoogleCode'url
String$class: 'HgWeb'$class: 'HgWeb'url
String$class: 'Kallithea'$class: 'Kallithea'url
String$class: 'KilnHG'$class: 'KilnHG'url
String$class: 'RhodeCode'$class: 'RhodeCode'url
String$class: 'RhodeCodeLegacy'$class: 'RhodeCodeLegacy'url
String$class: 'ScmManager'$class: 'ScmManager'url
http://YOURSCMMANAGER/scm/repo/NAMESPACE/NAME/).
String$class: 'MercurialInstallationSCMSourceTrait'$class: 'MercurialInstallationSCMSourceTrait'installation
String$class: 'NotificationContextTrait'$class: 'NotificationContextTrait'contextLabel
StringtypeSuffix
Appends the relevant suffix to the context label based on the build type. '/pr-merge', '/pr-head' or '/branch'
booleannotificationsSkipnotificationsSkipgitLabOriginDiscoverygitLabOriginDiscoverystrategyId
int$class: 'PathBasedPullRequestFilterTrait'$class: 'PathBasedPullRequestFilterTrait'inclusionField
StringexclusionField
String$class: 'PreBuildMergeTrait'$class: 'PreBuildMergeTrait'extension
optionsoptions
mergeTargetmergeTarget
master.
StringfastForwardModefastForwardMode (optional)
FF, FF_ONLY, NO_FFmergeRemotemergeRemote (optional)
origin, that contains the branch you specify below. If left blank, it'll default to the name of the first repository configured above.
StringmergeStrategymergeStrategy (optional)
DEFAULT, RESOLVE, RECURSIVE, OCTOPUS, OURS, SUBTREE, RECURSIVE_THEIRS$class: 'PretestedIntegrationSCMTrait'$class: 'PretestedIntegrationSCMTrait'extension
gitIntegrationStrategygitIntegrationStrategy
accumulatedaccumulatedsquashsquashintegrationBranchintegrationBranch
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>
StringrepoNamerepoName
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
String$class: 'PruneStaleBranchTrait'$class: 'PruneStaleBranchTrait'$class: 'PruneStaleTagTrait'$class: 'PruneStaleTagTrait'bitbucketPublicRepoPullRequestFilterbitbucketPublicRepoPullRequestFilter$class: 'PullRequestDiscoveryTrait'$class: 'PullRequestDiscoveryTrait'excludeBranchesWithPRs
boolean$class: 'PullRequestLabelsBlackListFilterTrait'$class: 'PullRequestLabelsBlackListFilterTrait'labels
String$class: 'PullRequestLabelsMatchAllFilterTrait'$class: 'PullRequestLabelsMatchAllFilterTrait'labels
String$class: 'PullRequestLabelsMatchAnyFilterTrait'$class: 'PullRequestLabelsMatchAnyFilterTrait'labels
String$class: 'PullRequestNameFilterTrait'$class: 'PullRequestNameFilterTrait'strategyId
intphrase
StringignoreCase
booleanregex
boolean$class: 'RefSpecsSCMSourceTrait'$class: 'RefSpecsSCMSourceTrait'templates
valuevalue
@{remote} will be replaced by the remote name (which defaults to origin) before use.
StringheadRegexFilterWithPRFromOriginheadRegexFilterWithPRFromOriginregex
StringtagRegex
String$class: 'RemoteNameSCMSourceTrait'$class: 'RemoteNameSCMSourceTrait'remoteName
StringskipNotificationsskipNotifications$class: 'SparseCheckoutPathsTrait'$class: 'SparseCheckoutPathsTrait'extension
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
sparseCheckoutPathssparseCheckoutPaths
pathpath
String$class: 'SubmoduleOptionTrait'$class: 'SubmoduleOptionTrait'extension
disableSubmodulesdisableSubmodules
booleanrecursiveSubmodulesrecursiveSubmodules
booleantrackingSubmodulestrackingSubmodules
booleanreferencereference
git init --bare git remote add SubProject1 https://gitrepo.com/subproject1 git remote add SubProject2 https://gitrepo.com/subproject2 git fetch --all
Stringtimeouttimeout
intparentCredentialsparentCredentials
booleandepthdepth (optional)
intshallowshallow (optional)
booleanthreadsthreads (optional)
intmrTriggerCommentmrTriggerCommentcommentBody
StringonlyTrustedMembersCanTrigger
booleantuleapBranchDiscoverytuleapBranchDiscoverytuleapNotifyPullRequesttuleapNotifyPullRequesttuleapForkPullRequestDiscoverytuleapForkPullRequestDiscoverytuleapPullRequestDiscoverytuleapPullRequestDiscovery$class: 'UserIdentityTrait'$class: 'UserIdentityTrait'extension
namename
If given, "GIT_COMMITTER_NAME=[this]" and "GIT_AUTHOR_NAME=[this]" are set for builds. This overrides whatever is in the global settings.
Stringemailemail
If given, "GIT_COMMITTER_EMAIL=[this]" and "GIT_AUTHOR_EMAIL=[this]" are set for builds. This overrides whatever is in the global settings.
StringbitbucketWebhookConfigurationbitbucketWebhookConfigurationSets the value for committersToIgnore in the Bitbucket Webhook. Value should be a comma separated string.
committerToIgnore is used to prevent triggering Jenkins builds when commits by certain users are made.
committersToIgnore
StringheadWildcardFilterWithPRFromOriginheadWildcardFilterWithPRFromOriginincludes
* as a wildcard; for example: master release*
Stringexcludes
release
StringtagIncludes
* as a wildcard; for example: *-1.* to build only 1.0 tags from the maven release plugin.
StringtagExcludes
*-0.*
String$class: 'WipeWorkspaceTrait'$class: 'WipeWorkspaceTrait'bitbucketBranchDiscoverybitbucketBranchDiscoverystrategyId
intbitbucketForkDiscoverybitbucketForkDiscoverystrategyId
inttrust
One of the great powers of pull requests is that anyone with read access to a repository can fork it, commit some changes to their fork and then create a pull request against the original repository with their changes. There are some files stored in source control that are important. For example, a Jenkinsfile may contain configuration details to sandbox pull requests in order to mitigate against malicious pull requests. In order to protect against a malicious pull request itself modifying the Jenkinsfile to remove the protections, you can define the trust policy for pull requests from forks.
Other plugins can extend the available trust policies. The default policies are:
Jenkinsfile) the contents of that file will be retrieved from the target branch on the origin repository and not from the pull request branch on the fork repository.
jenkins.scm.api.trait.SCMHeadAuthority<? super com.cloudbees.jenkins.plugins.bitbucket.BitbucketSCMSourceRequest, ? extends jenkins.scm.api.mixin.ChangeRequestSCMHead2, ? extends jenkins.scm.api.SCMRevision>bitbucketPullRequestDiscoverybitbucketPullRequestDiscoverystrategyId
intbitbucketSshCheckoutbitbucketSshCheckouthttps:// protocol for the Git repository.
This behaviour allows you to select the SSH private key to be used for checking out sources, which will consequently force the checkout to use the ssh:// protocol.
credentialsId
It must be a SSH key based credential.
StringbitbucketTagDiscoverybitbucketTagDiscoverybitbucketWebhookRegistrationbitbucketWebhookRegistrationOverrides the defaults for webhook management.
Webhooks are used to inform Jenkins about changes to repositories. There are two ways webhooks can be configured:
The Manage Jenkins » Configure Jenkins › Bitbucket Endpoints allows defining the list of servers. Each server can be associated with credentials. If credentials are defined then the default behaviour is to use those credentials to automatically manage the webhooks of all repositories that Jenkins is interested in. If no credentials are defined then the default behaviour is to require the user to manually configure webhooks.
mode
String$class: 'com.cloudogu.scmmanager.scm.BranchDiscoveryTrait'$class: 'com.cloudogu.scmmanager.scm.BranchDiscoveryTrait'$class: 'com.cloudogu.scmmanager.scm.TagDiscoveryTrait'$class: 'com.cloudogu.scmmanager.scm.TagDiscoveryTrait'dagshubBranchDiscoverydagshubBranchDiscovery$class: 'io.jenkins.plugins.dagshubbranchsource.traits.ForkPullRequestDiscoveryTrait'$class: 'io.jenkins.plugins.dagshubbranchsource.traits.ForkPullRequestDiscoveryTrait'buildOnPullHead (optional)
boolean$class: 'io.jenkins.plugins.dagshubbranchsource.traits.OriginPullRequestDiscoveryTrait'$class: 'io.jenkins.plugins.dagshubbranchsource.traits.OriginPullRequestDiscoveryTrait'buildOnPullHead (optional)
booleandagshubTagDiscoverydagshubTagDiscoverygitLabBranchDiscoverygitLabBranchDiscoverystrategyId
int$class: 'io.jenkins.plugins.gitlabbranchsource.SSHCheckoutTrait'$class: 'io.jenkins.plugins.gitlabbranchsource.SSHCheckoutTrait'https:// protocol for the Git repository.
This behaviour allows you to select the SSH private key to be used for checking out sources, which will consequently force the checkout to use the ssh:// protocol.
credentialsId
StringgitLabTagDiscoverygitLabTagDiscoverygitBranchDiscoverygitBranchDiscoverygitTagDiscoverygitTagDiscoveryheadRegexFilterheadRegexFilterregex
StringheadWildcardFilterheadWildcardFilterincludes
* as a wildcard; for example: master release*
Stringexcludes
release alpha-* beta-*
StringheadRegexFilterWithPRheadRegexFilterWithPRregex
StringtagRegex
StringheadWildcardFilterWithPRheadWildcardFilterWithPRincludes
* as a wildcard; for example: master release*
Stringexcludes
release
StringtagIncludes
* as a wildcard; for example: *-1.* to build only 1.0 tags from the maven release plugin.
StringtagExcludes
*-0.*
StringgiteaBranchDiscoverygiteaBranchDiscoverystrategyId
intgiteaForkDiscoverygiteaForkDiscoverystrategyId
inttrust
One of the great powers of pull requests is that anyone with read access to a repository can fork it, commit some changes to their fork and then create a pull request against the original repository with their changes. There are some files stored in source control that are important. For example, a Jenkinsfile may contain configuration details to sandbox pull requests in order to mitigate against malicious pull requests. In order to protect against a malicious pull request itself modifying the Jenkinsfile to remove the protections, you can define the trust policy for pull requests from forks.
Other plugins can extend the available trust policies. The default policies are:
Jenkinsfile) the contents of that file will be retrieved from the target branch on the origin repository and not from the pull request branch on the fork repository.
Nobody.
gitLabTrustMembersgitLabTrustMembersbitbucketTrustTeambitbucketTrustTeambitbucketTrustEveryonebitbucketTrustEveryonebitbucketTrustNobodybitbucketTrustNobodygitLabTrustEveryonegitLabTrustEveryonegitLabTrustNobodygitLabTrustNobodygitLabTrustPermissionsgitLabTrustPermissionsgiteaTrustContributorsgiteaTrustContributorsgiteaTrustEveryonegiteaTrustEveryonegiteaTrustNobodygiteaTrustNobodygitHubTrustContributorsgitHubTrustContributorsgitHubTrustEveryonegitHubTrustEveryonegitHubTrustNobodygitHubTrustNobodygitHubTrustPermissionsgitHubTrustPermissionsgiteaPullRequestDiscoverygiteaPullRequestDiscoverystrategyId
intgiteaSSHCheckoutgiteaSSHCheckouthttps:// protocol for the Git repository.
This behaviour allows you to select the SSH private key to be used for checking out sources, which will consequently force the checkout to use the ssh:// protocol.
credentialsId
StringgiteaTagDiscoverygiteaTagDiscoverygiteaWebhookRegistrationgiteaWebhookRegistrationOverrides the defaults for webhook management.
Webhooks are used to inform Jenkins about changes to repositories. There are two ways webhooks can be configured:
The Manage Jenkins » Configure System › Gitea Server allows defining the list of servers. Each server can be associated with credentials. If credentials are defined then the default behaviour is to use those credentials to automatically manage the webhooks of all repositories that Jenkins is interested in. If no credentials are defined then the default behaviour is to require the user to manually configure webhooks.
mode
StringgitHubBranchDiscoverygitHubBranchDiscoverystrategyId
env.GIT_BRANCH will be set to the branch name rather than PR-#. Also, status notifications for these builds will only be applied to the commit and not to the pull request.
intgitHubForkDiscoverygitHubForkDiscoverystrategyId
inttrust
One of the great powers of pull requests is that anyone with read access to a repository can fork it, commit some changes to their fork and then create a pull request against the original repository with their changes. There are some files stored in source control that are important. For example, a Jenkinsfile may contain configuration details to sandbox pull requests in order to mitigate against malicious pull requests. In order to protect against a malicious pull request itself modifying the Jenkinsfile to remove the protections, you can define the trust policy for pull requests from forks.
Other plugins can extend the available trust policies. The default policies are:
Jenkinsfile) the contents of that file will be retrieved from the target branch on the origin repository and not from the pull request branch on the fork repository.
Nobody. NOTE: all collaborators are trusted, even if they are only members of a team with read permission.
jenkins.scm.api.trait.SCMHeadAuthority<? super org.jenkinsci.plugins.github_branch_source.GitHubSCMSourceRequest, ? extends jenkins.scm.api.mixin.ChangeRequestSCMHead2, ? extends jenkins.scm.api.SCMRevision>gitHubPullRequestDiscoverygitHubPullRequestDiscoverystrategyId
intgitHubSshCheckoutgitHubSshCheckouthttps:// protocol for the Git repository.
This behaviour allows you to select the SSH private key to be used for checking out sources, which will consequently force the checkout to use the ssh:// protocol.
credentialsId
StringgitHubTagDiscoverygitHubTagDiscoverygitblitgitblitgitblitUri
StringcheckoutCredentialsId
StringscanCredentialsId
Stringremote
git clone command.
Stringincludes
Stringexcludes
Stringid (optional)
Stringbrowser (optional)
$class: 'AssemblaWeb'$class: 'AssemblaWeb'repoUrl
String$class: 'BacklogGitRepositoryBrowser'$class: 'BacklogGitRepositoryBrowser'repoName
StringrepoUrl
StringbitbucketServerbitbucketServerrepoUrl
String$class: 'BitbucketWeb'$class: 'BitbucketWeb'repoUrl
String$class: 'CGit'$class: 'CGit'repoUrl
String$class: 'FisheyeGitRepositoryBrowser'$class: 'FisheyeGitRepositoryBrowser'repoUrl
String$class: 'GitBlitRepositoryBrowser'$class: 'GitBlitRepositoryBrowser'repoUrl
StringprojectName
String$class: 'GitBucketBrowser'$class: 'GitBucketBrowser'url
String$class: 'GitLab'$class: 'GitLab'repoUrl
Stringversion (optional)
String$class: 'GitLabBrowser'$class: 'GitLabBrowser'https://gitLab.example.com then the URL for bob's skunkworks project might be https://gitLab.example.com/bob/skunkworks.
projectUrl
https://gitLab.example.com then the URL for bob's skunkworks project might be https://gitLab.example.com/bob/skunkworks
String$class: 'GitList'$class: 'GitList'repoUrl
String$class: 'GitWeb'$class: 'GitWeb'repoUrl
String$class: 'GiteaBrowser'$class: 'GiteaBrowser'repoUrl
https://gitea.example.com then the URL for bob's skunkworks project repository might be https://gitea.example.com/bob/skunkworks
String$class: 'GithubWeb'$class: 'GithubWeb'repoUrl
String$class: 'Gitiles'$class: 'Gitiles'repoUrl
String$class: 'GitoriousWeb'$class: 'GitoriousWeb'repoUrl
String$class: 'GogsGit'$class: 'GogsGit'repoUrl
String$class: 'KilnGit'$class: 'KilnGit'repoUrl
String$class: 'Phabricator'$class: 'Phabricator'repoUrl
Stringrepo
String$class: 'RedmineWeb'$class: 'RedmineWeb'repoUrl
String$class: 'RhodeCode'$class: 'RhodeCode'repoUrl
String$class: 'ScmManagerGitRepositoryBrowser'$class: 'ScmManagerGitRepositoryBrowser'repoUrl
String$class: 'Stash'$class: 'Stash'repoUrl
String$class: 'TFS2013GitRepositoryBrowser'$class: 'TFS2013GitRepositoryBrowser'repoUrl
If TFS is also used as the repository server, this can usually be left blank.
String$class: 'TracGitRepositoryBrowser'$class: 'TracGitRepositoryBrowser'$class: 'TuleapBrowser'$class: 'TuleapBrowser'repositoryUrl
String$class: 'ViewGitWeb'$class: 'ViewGitWeb'repoUrl
StringprojectName
StringcredentialsId (optional)
Stringextensions (optional)
$class: 'AuthorInChangelog'$class: 'AuthorInChangelog'$class: 'BuildChooserSetting'$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: 'AlternativeBuildChooser'$class: 'AncestryBuildChooser'$class: 'AncestryBuildChooser'maximumAgeInDays
intancestorCommitSha1
String$class: 'DefaultBuildChooser'$class: 'DefaultBuildChooser'$class: 'DeflakeGitBuildChooser'$class: 'DeflakeGitBuildChooser'$class: 'GerritTriggerBuildChooser'$class: 'GerritTriggerBuildChooser'$class: 'InverseBuildChooser'$class: 'InverseBuildChooser'$class: 'BuildSingleRevisionOnly'$class: 'BuildSingleRevisionOnly'$class: 'ChangelogToBranch'$class: 'ChangelogToBranch'options
compareRemotecompareRemote
origin, that contains the branch you specify below.
StringcompareTargetcompareTarget
String$class: 'CheckoutOption'$class: 'CheckoutOption'timeout
int$class: 'CleanBeforeCheckout'$class: '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 (optional)
.git directories.
boolean$class: 'CleanCheckout'$class: 'CleanCheckout'.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 (optional)
.git directories.
boolean$class: 'CloneOption'$class: 'CloneOption'shallow
booleannoTags
booleanreference
Stringtimeout
intdepth (optional)
inthonorRefspec (optional)
boolean$class: 'CodeCommitURLHelper'$class: 'CodeCommitURLHelper'credentialId
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.
StringrepositoryName
String$class: 'DisableRemotePoll'$class: 'DisableRemotePoll'$class: 'ExcludeFromChangeSet'$class: 'ExcludeFromChangeSet'$class: 'ExcludeFromPoll'$class: 'ExcludeFromPoll'$class: 'GitLFSPull'$class: 'GitLFSPull'$class: 'GitSCMChecksExtension'$class: 'GitSCMChecksExtension'verboseConsoleLog (optional)
boolean$class: 'GitSCMStatusChecksExtension'$class: 'GitSCMStatusChecksExtension'name (optional)
Stringskip (optional)
booleanskipProgressUpdates (optional)
booleansuppressLogs (optional)
booleanunstableBuildNeutral (optional)
boolean$class: 'GitTagMessageExtension'$class: 'GitTagMessageExtension'useMostRecentTag (optional)
boolean$class: 'IgnoreNotifyCommit'$class: 'IgnoreNotifyCommit'$class: 'LocalBranch'$class: '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'$class: 'MessageExclusion'excludedMessage
.*\[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.
String$class: 'PathRestriction'$class: 'PathRestriction'includedRegions
myapp/src/main/web/.*\.html
myapp/src/main/web/.*\.jpeg
myapp/src/main/web/.*\.gif
The 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.
StringexcludedRegions
myapp/src/main/web/.*\.html
myapp/src/main/web/.*\.jpeg
myapp/src/main/web/.*\.gif
The example above illustrates that if only html/jpeg/gif files have been committed to the SCM a build will not occur.
String$class: 'PerBuildTag'$class: 'PerBuildTag'$class: 'PreBuildMerge'$class: 'PreBuildMerge'options
mergeTargetmergeTarget
master.
StringfastForwardModefastForwardMode (optional)
FF, FF_ONLY, NO_FFmergeRemotemergeRemote (optional)
origin, that contains the branch you specify below. If left blank, it'll default to the name of the first repository configured above.
StringmergeStrategymergeStrategy (optional)
DEFAULT, RESOLVE, RECURSIVE, OCTOPUS, OURS, SUBTREE, RECURSIVE_THEIRSpretestedIntegrationpretestedIntegrationgitIntegrationStrategy
accumulatedaccumulatedsquashsquashintegrationBranch
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>
StringrepoName
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
String$class: 'PruneStaleBranch'$class: 'PruneStaleBranch'pruneTagspruneTagspruneTags
boolean$class: 'RelativeTargetDirectory'$class: 'RelativeTargetDirectory'relativeTargetDir
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.
String$class: 'ScmName'$class: 'ScmName'Unique name for this SCM. Needed when using Git within the Multi SCM plugin.
name
String$class: 'SparseCheckoutPaths'$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
pathpath
String$class: 'SubmoduleOption'$class: 'SubmoduleOption'disableSubmodules
booleanrecursiveSubmodules
booleantrackingSubmodules
booleanreference
git init --bare git remote add SubProject1 https://gitrepo.com/subproject1 git remote add SubProject2 https://gitrepo.com/subproject2 git fetch --all
Stringtimeout
intparentCredentials
booleandepth (optional)
intshallow (optional)
booleanthreads (optional)
int$class: 'UserExclusion'$class: 'UserExclusion'excludedUsers
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.
String$class: 'UserIdentity'$class: 'UserIdentity'name
If given, "GIT_COMMITTER_NAME=[this]" and "GIT_AUTHOR_NAME=[this]" are set for builds. This overrides whatever is in the global settings.
Stringemail
If given, "GIT_COMMITTER_EMAIL=[this]" and "GIT_AUTHOR_EMAIL=[this]" are set for builds. This overrides whatever is in the global settings.
String$class: 'WipeWorkspace'$class: 'WipeWorkspace'gitTool (optional)
Stringtraits (optional)
$class: 'ApprovedPullRequestTrait'$class: 'ApprovedPullRequestTrait'strategyId
int$class: 'AuthorInChangelogTrait'$class: 'AuthorInChangelogTrait'$class: 'BitbucketAgedRefsTrait'$class: 'BitbucketAgedRefsTrait'retentionDays
StringbitbucketBranchCommitSkipTraitbitbucketBranchCommitSkipTraitbitbucketBuildStatusNotificationsbitbucketBuildStatusNotificationssendSuccessNotificationForUnstableBuild (optional)
booleanbitbucketCommitSkipTraitbitbucketCommitSkipTrait$class: 'BitbucketJiraValidatorTrait'$class: 'BitbucketJiraValidatorTrait'jiraServerIdx
intbuildStatusNameCustomPartbuildStatusNameCustomPartbuildStatusNameCustomPart (optional)
String$class: 'ChangeDiscoveryTrait'$class: 'ChangeDiscoveryTrait'queryString
Provide an additional query string to search for open changes. The status:open is implicitly added and does not need to be specified. See Gerrit search operators documentation for a detailed list of the supported search operators.
-is:wipdoes not include work-in-progress changes
is:privateincludes private changes
String$class: 'CheckoutOptionTrait'$class: 'CheckoutOptionTrait'extension
timeouttimeout
int$class: 'CleanAfterCheckoutTrait'$class: 'CleanAfterCheckoutTrait'extension
.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.
deleteUntrackedNestedRepositoriesdeleteUntrackedNestedRepositories (optional)
.git directories.
boolean$class: 'CleanBeforeCheckoutTrait'$class: 'CleanBeforeCheckoutTrait'extension
.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.
deleteUntrackedNestedRepositoriesdeleteUntrackedNestedRepositories (optional)
.git directories.
boolean$class: 'CleanMercurialSCMSourceTrait'$class: 'CleanMercurialSCMSourceTrait'$class: 'CloneOptionTrait'$class: 'CloneOptionTrait'extension
shallowshallow
booleannoTagsnoTags
booleanreferencereference
Stringtimeouttimeout
intdepthdepth (optional)
inthonorRefspechonorRefspec (optional)
boolean$class: 'DisableStatusUpdateTrait'$class: 'DisableStatusUpdateTrait'$class: 'DiscoverOtherRefsTrait'$class: 'DiscoverOtherRefsTrait'ref
The pattern under /refs on the remote repository to discover, can contain a wildcard.
Example: test/*/merged
StringnameMapping (optional)
Mapping for how the ref can be named in for example the @Library.
Example: test-@{1}
Where @{1} replaces the first wildcard in the ref when discovered.
By default it will be "namespace_before_wildcard-@{1}". E.g. if ref is "test/*/merged" the default mapping would be "test-@{1}".
String$class: 'FilterChecksTrait'$class: 'FilterChecksTrait'queryOperator
ID, SCHEMEqueryString
StringgitLabForkDiscoverygitLabForkDiscoverystrategyId
inttrust
One of the great powers of merge requests is that anyone with read access to a project can fork it, commit some changes to their fork and then create a merge request against the original project with their changes. There are some files stored in source control that are important. For example, a Jenkinsfile may contain configuration details to sandbox merge requests in order to mitigate against malicious merge requests. In order to protect against a malicious merge request itself modifying the Jenkinsfile to remove the protections, you can define the trust policy for merge requests from forks.
Other plugins can extend the available trust policies. The default policies are:
Jenkinsfile) the contents of that file will be retrieved from the target branch on the origin project and not from the merge request branch on the fork project.
Nobody.
jenkins.scm.api.trait.SCMHeadAuthority<? super io.jenkins.plugins.gitlabbranchsource.GitLabSCMSourceRequest, ? extends jenkins.scm.api.mixin.ChangeRequestSCMHead2, ? extends jenkins.scm.api.SCMRevision>$class: 'GitBrowserSCMSourceTrait'$class: 'GitBrowserSCMSourceTrait'browser
$class: 'AssemblaWeb'$class: 'AssemblaWeb'repoUrl
String$class: 'BacklogGitRepositoryBrowser'$class: 'BacklogGitRepositoryBrowser'repoName
StringrepoUrl
StringbitbucketServerbitbucketServerrepoUrl
String$class: 'BitbucketWeb'$class: 'BitbucketWeb'repoUrl
String$class: 'CGit'$class: 'CGit'repoUrl
String$class: 'FisheyeGitRepositoryBrowser'$class: 'FisheyeGitRepositoryBrowser'repoUrl
String$class: 'GitBlitRepositoryBrowser'$class: 'GitBlitRepositoryBrowser'repoUrl
StringprojectName
String$class: 'GitBucketBrowser'$class: 'GitBucketBrowser'url
String$class: 'GitLab'$class: 'GitLab'repoUrl
Stringversion (optional)
String$class: 'GitLabBrowser'$class: 'GitLabBrowser'https://gitLab.example.com then the URL for bob's skunkworks project might be https://gitLab.example.com/bob/skunkworks.
projectUrl
https://gitLab.example.com then the URL for bob's skunkworks project might be https://gitLab.example.com/bob/skunkworks
String$class: 'GitList'$class: 'GitList'repoUrl
String$class: 'GitWeb'$class: 'GitWeb'repoUrl
String$class: 'GiteaBrowser'$class: 'GiteaBrowser'repoUrl
https://gitea.example.com then the URL for bob's skunkworks project repository might be https://gitea.example.com/bob/skunkworks
String$class: 'GithubWeb'$class: 'GithubWeb'repoUrl
String$class: 'Gitiles'$class: 'Gitiles'repoUrl
String$class: 'GitoriousWeb'$class: 'GitoriousWeb'repoUrl
String$class: 'GogsGit'$class: 'GogsGit'repoUrl
String$class: 'KilnGit'$class: 'KilnGit'repoUrl
String$class: 'Phabricator'$class: 'Phabricator'repoUrl
Stringrepo
String$class: 'RedmineWeb'$class: 'RedmineWeb'repoUrl
String$class: 'RhodeCode'$class: 'RhodeCode'repoUrl
String$class: 'ScmManagerGitRepositoryBrowser'$class: 'ScmManagerGitRepositoryBrowser'repoUrl
String$class: 'Stash'$class: 'Stash'repoUrl
String$class: 'TFS2013GitRepositoryBrowser'$class: 'TFS2013GitRepositoryBrowser'repoUrl
If TFS is also used as the repository server, this can usually be left blank.
String$class: 'TracGitRepositoryBrowser'$class: 'TracGitRepositoryBrowser'$class: 'TuleapBrowser'$class: 'TuleapBrowser'repositoryUrl
String$class: 'ViewGitWeb'$class: 'ViewGitWeb'repoUrl
StringprojectName
String$class: 'GitHubAgedRefsTrait'$class: 'GitHubAgedRefsTrait'retentionDays
StringgitHubBranchCommitSkipTraitgitHubBranchCommitSkipTraitgitHubCommitSkipTraitgitHubCommitSkipTrait$class: 'GitHubJiraValidatorTrait'$class: 'GitHubJiraValidatorTrait'jiraServerIdx
int$class: 'GitHubSCMSourceChecksTrait'$class: 'GitHubSCMSourceChecksTrait'verboseConsoleLog (optional)
boolean$class: 'GitHubSCMSourceStatusChecksTrait'$class: 'GitHubSCMSourceStatusChecksTrait'name (optional)
Stringskip (optional)
booleanskipNotifications (optional)
booleanskipProgressUpdates (optional)
booleansuppressLogs (optional)
booleanunstableBuildNeutral (optional)
boolean$class: 'GitLFSPullTrait'$class: 'GitLFSPullTrait'gitlabAvatargitlabAvatardisableProjectAvatar (optional)
booleangitlabSkipNotificationsgitlabSkipNotifications$class: 'GitToolSCMSourceTrait'$class: 'GitToolSCMSourceTrait'gitTool
String$class: 'HookRegistrationTrait'$class: 'HookRegistrationTrait'webHookMode
StringsystemHookMode
StringgitHubIgnoreDraftPullRequestFiltergitHubIgnoreDraftPullRequestFilter$class: 'IgnoreOnPushNotificationTrait'$class: 'IgnoreOnPushNotificationTrait'jervisFilterjervisFilterThis will look at the root of a GitHub reference for .jervis.yml for the branches and tags filtering. You can customize the name of the YAML file searched for if you like.
For Tags:
For Branches:
branches:
only:
- master
By default Jervis will generate Jenkins jobs for all branches that have a .jervis.yml file. You can control and limit this behavior by specifying the branches or tags key in your .jervis.yml.
You can either whitelist or blacklist branches that you want to be built:
# blacklist
branches:
except:
- legacy
- experimental
# whitelist
branches:
only:
- master
- stable
The same YAML can be applied to tags.
# blacklist
tags:
except:
- .*-rc
- .*-beta
# whitelist
tags:
only:
- v[.0-9]+
If you specify both only and except, then except will be ignored. .jervis.yml needs to be present on all branches you want to be built. .jervis.yml will be interpreted in the context of that branch so if you specify a whitelist in your master branch it will not propagate to other branches.
You can use regular expressions to whitelist or blacklist branches:
branches:
only:
- master
- /^[.0-9]+-hotfix$/
Any name surrounded with / in the list of branches is treated as a regular expression. The expression will use Pattern.compile to compile the regex string into a Groovy regular expression.
yamlFileName
The filename which will be read from GitHub to determine if a Jenkins branch, tag, or pull request should be built. Provide a comma separated list of paths to YAML files in a repository and it will check each path as a fallback.
For example, set the value to: .jervis.yml, .ci/jervis.yml and this plugin will first check for valid YAML in .jervis.yml. If no YAML exists, then it will fall back to checking .ci/jervis.yml.
String$class: 'LocalBranchTrait'$class: 'LocalBranchTrait'logCommentlogCommentlogSuccess (optional)
booleansudoUser (optional)
String$class: 'MercurialBrowserSCMSourceTrait'$class: 'MercurialBrowserSCMSourceTrait'browser
$class: 'FishEye'$class: 'FishEye'url
String$class: 'GoogleCode'$class: 'GoogleCode'url
String$class: 'HgWeb'$class: 'HgWeb'url
String$class: 'Kallithea'$class: 'Kallithea'url
String$class: 'KilnHG'$class: 'KilnHG'url
String$class: 'RhodeCode'$class: 'RhodeCode'url
String$class: 'RhodeCodeLegacy'$class: 'RhodeCodeLegacy'url
String$class: 'ScmManager'$class: 'ScmManager'url
http://YOURSCMMANAGER/scm/repo/NAMESPACE/NAME/).
String$class: 'MercurialInstallationSCMSourceTrait'$class: 'MercurialInstallationSCMSourceTrait'installation
String$class: 'NotificationContextTrait'$class: 'NotificationContextTrait'contextLabel
StringtypeSuffix
Appends the relevant suffix to the context label based on the build type. '/pr-merge', '/pr-head' or '/branch'
booleannotificationsSkipnotificationsSkipgitLabOriginDiscoverygitLabOriginDiscoverystrategyId
int$class: 'PathBasedPullRequestFilterTrait'$class: 'PathBasedPullRequestFilterTrait'inclusionField
StringexclusionField
String$class: 'PreBuildMergeTrait'$class: 'PreBuildMergeTrait'extension
optionsoptions
mergeTargetmergeTarget
master.
StringfastForwardModefastForwardMode (optional)
FF, FF_ONLY, NO_FFmergeRemotemergeRemote (optional)
origin, that contains the branch you specify below. If left blank, it'll default to the name of the first repository configured above.
StringmergeStrategymergeStrategy (optional)
DEFAULT, RESOLVE, RECURSIVE, OCTOPUS, OURS, SUBTREE, RECURSIVE_THEIRS$class: 'PretestedIntegrationSCMTrait'$class: 'PretestedIntegrationSCMTrait'extension
gitIntegrationStrategygitIntegrationStrategy
accumulatedaccumulatedsquashsquashintegrationBranchintegrationBranch
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>
StringrepoNamerepoName
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
String$class: 'PruneStaleBranchTrait'$class: 'PruneStaleBranchTrait'$class: 'PruneStaleTagTrait'$class: 'PruneStaleTagTrait'bitbucketPublicRepoPullRequestFilterbitbucketPublicRepoPullRequestFilter$class: 'PullRequestDiscoveryTrait'$class: 'PullRequestDiscoveryTrait'excludeBranchesWithPRs
boolean$class: 'PullRequestLabelsBlackListFilterTrait'$class: 'PullRequestLabelsBlackListFilterTrait'labels
String$class: 'PullRequestLabelsMatchAllFilterTrait'$class: 'PullRequestLabelsMatchAllFilterTrait'labels
String$class: 'PullRequestLabelsMatchAnyFilterTrait'$class: 'PullRequestLabelsMatchAnyFilterTrait'labels
String$class: 'PullRequestNameFilterTrait'$class: 'PullRequestNameFilterTrait'strategyId
intphrase
StringignoreCase
booleanregex
boolean$class: 'RefSpecsSCMSourceTrait'$class: 'RefSpecsSCMSourceTrait'templates
valuevalue
@{remote} will be replaced by the remote name (which defaults to origin) before use.
StringheadRegexFilterWithPRFromOriginheadRegexFilterWithPRFromOriginregex
StringtagRegex
String$class: 'RemoteNameSCMSourceTrait'$class: 'RemoteNameSCMSourceTrait'remoteName
StringskipNotificationsskipNotifications$class: 'SparseCheckoutPathsTrait'$class: 'SparseCheckoutPathsTrait'extension
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
sparseCheckoutPathssparseCheckoutPaths
pathpath
String$class: 'SubmoduleOptionTrait'$class: 'SubmoduleOptionTrait'extension
disableSubmodulesdisableSubmodules
booleanrecursiveSubmodulesrecursiveSubmodules
booleantrackingSubmodulestrackingSubmodules
booleanreferencereference
git init --bare git remote add SubProject1 https://gitrepo.com/subproject1 git remote add SubProject2 https://gitrepo.com/subproject2 git fetch --all
Stringtimeouttimeout
intparentCredentialsparentCredentials
booleandepthdepth (optional)
intshallowshallow (optional)
booleanthreadsthreads (optional)
intmrTriggerCommentmrTriggerCommentcommentBody
StringonlyTrustedMembersCanTrigger
booleantuleapBranchDiscoverytuleapBranchDiscoverytuleapNotifyPullRequesttuleapNotifyPullRequesttuleapForkPullRequestDiscoverytuleapForkPullRequestDiscoverytuleapPullRequestDiscoverytuleapPullRequestDiscovery$class: 'UserIdentityTrait'$class: 'UserIdentityTrait'extension
namename
If given, "GIT_COMMITTER_NAME=[this]" and "GIT_AUTHOR_NAME=[this]" are set for builds. This overrides whatever is in the global settings.
Stringemailemail
If given, "GIT_COMMITTER_EMAIL=[this]" and "GIT_AUTHOR_EMAIL=[this]" are set for builds. This overrides whatever is in the global settings.
StringbitbucketWebhookConfigurationbitbucketWebhookConfigurationSets the value for committersToIgnore in the Bitbucket Webhook. Value should be a comma separated string.
committerToIgnore is used to prevent triggering Jenkins builds when commits by certain users are made.
committersToIgnore
StringheadWildcardFilterWithPRFromOriginheadWildcardFilterWithPRFromOriginincludes
* as a wildcard; for example: master release*
Stringexcludes
release
StringtagIncludes
* as a wildcard; for example: *-1.* to build only 1.0 tags from the maven release plugin.
StringtagExcludes
*-0.*
String$class: 'WipeWorkspaceTrait'$class: 'WipeWorkspaceTrait'bitbucketBranchDiscoverybitbucketBranchDiscoverystrategyId
intbitbucketForkDiscoverybitbucketForkDiscoverystrategyId
inttrust
One of the great powers of pull requests is that anyone with read access to a repository can fork it, commit some changes to their fork and then create a pull request against the original repository with their changes. There are some files stored in source control that are important. For example, a Jenkinsfile may contain configuration details to sandbox pull requests in order to mitigate against malicious pull requests. In order to protect against a malicious pull request itself modifying the Jenkinsfile to remove the protections, you can define the trust policy for pull requests from forks.
Other plugins can extend the available trust policies. The default policies are:
Jenkinsfile) the contents of that file will be retrieved from the target branch on the origin repository and not from the pull request branch on the fork repository.
jenkins.scm.api.trait.SCMHeadAuthority<? super com.cloudbees.jenkins.plugins.bitbucket.BitbucketSCMSourceRequest, ? extends jenkins.scm.api.mixin.ChangeRequestSCMHead2, ? extends jenkins.scm.api.SCMRevision>bitbucketPullRequestDiscoverybitbucketPullRequestDiscoverystrategyId
intbitbucketSshCheckoutbitbucketSshCheckouthttps:// protocol for the Git repository.
This behaviour allows you to select the SSH private key to be used for checking out sources, which will consequently force the checkout to use the ssh:// protocol.
credentialsId
It must be a SSH key based credential.
StringbitbucketTagDiscoverybitbucketTagDiscoverybitbucketWebhookRegistrationbitbucketWebhookRegistrationOverrides the defaults for webhook management.
Webhooks are used to inform Jenkins about changes to repositories. There are two ways webhooks can be configured:
The Manage Jenkins » Configure Jenkins › Bitbucket Endpoints allows defining the list of servers. Each server can be associated with credentials. If credentials are defined then the default behaviour is to use those credentials to automatically manage the webhooks of all repositories that Jenkins is interested in. If no credentials are defined then the default behaviour is to require the user to manually configure webhooks.
mode
String$class: 'com.cloudogu.scmmanager.scm.BranchDiscoveryTrait'$class: 'com.cloudogu.scmmanager.scm.BranchDiscoveryTrait'$class: 'com.cloudogu.scmmanager.scm.TagDiscoveryTrait'$class: 'com.cloudogu.scmmanager.scm.TagDiscoveryTrait'dagshubBranchDiscoverydagshubBranchDiscovery$class: 'io.jenkins.plugins.dagshubbranchsource.traits.ForkPullRequestDiscoveryTrait'$class: 'io.jenkins.plugins.dagshubbranchsource.traits.ForkPullRequestDiscoveryTrait'buildOnPullHead (optional)
boolean$class: 'io.jenkins.plugins.dagshubbranchsource.traits.OriginPullRequestDiscoveryTrait'$class: 'io.jenkins.plugins.dagshubbranchsource.traits.OriginPullRequestDiscoveryTrait'buildOnPullHead (optional)
booleandagshubTagDiscoverydagshubTagDiscoverygitLabBranchDiscoverygitLabBranchDiscoverystrategyId
int$class: 'io.jenkins.plugins.gitlabbranchsource.SSHCheckoutTrait'$class: 'io.jenkins.plugins.gitlabbranchsource.SSHCheckoutTrait'https:// protocol for the Git repository.
This behaviour allows you to select the SSH private key to be used for checking out sources, which will consequently force the checkout to use the ssh:// protocol.
credentialsId
StringgitLabTagDiscoverygitLabTagDiscoverygitBranchDiscoverygitBranchDiscoverygitTagDiscoverygitTagDiscoveryheadRegexFilterheadRegexFilterregex
StringheadWildcardFilterheadWildcardFilterincludes
* as a wildcard; for example: master release*
Stringexcludes
release alpha-* beta-*
StringheadRegexFilterWithPRheadRegexFilterWithPRregex
StringtagRegex
StringheadWildcardFilterWithPRheadWildcardFilterWithPRincludes
* as a wildcard; for example: master release*
Stringexcludes
release
StringtagIncludes
* as a wildcard; for example: *-1.* to build only 1.0 tags from the maven release plugin.
StringtagExcludes
*-0.*
StringgiteaBranchDiscoverygiteaBranchDiscoverystrategyId
intgiteaForkDiscoverygiteaForkDiscoverystrategyId
inttrust
One of the great powers of pull requests is that anyone with read access to a repository can fork it, commit some changes to their fork and then create a pull request against the original repository with their changes. There are some files stored in source control that are important. For example, a Jenkinsfile may contain configuration details to sandbox pull requests in order to mitigate against malicious pull requests. In order to protect against a malicious pull request itself modifying the Jenkinsfile to remove the protections, you can define the trust policy for pull requests from forks.
Other plugins can extend the available trust policies. The default policies are:
Jenkinsfile) the contents of that file will be retrieved from the target branch on the origin repository and not from the pull request branch on the fork repository.
Nobody.
gitLabTrustMembersgitLabTrustMembersbitbucketTrustTeambitbucketTrustTeambitbucketTrustEveryonebitbucketTrustEveryonebitbucketTrustNobodybitbucketTrustNobodygitLabTrustEveryonegitLabTrustEveryonegitLabTrustNobodygitLabTrustNobodygitLabTrustPermissionsgitLabTrustPermissionsgiteaTrustContributorsgiteaTrustContributorsgiteaTrustEveryonegiteaTrustEveryonegiteaTrustNobodygiteaTrustNobodygitHubTrustContributorsgitHubTrustContributorsgitHubTrustEveryonegitHubTrustEveryonegitHubTrustNobodygitHubTrustNobodygitHubTrustPermissionsgitHubTrustPermissionsgiteaPullRequestDiscoverygiteaPullRequestDiscoverystrategyId
intgiteaSSHCheckoutgiteaSSHCheckouthttps:// protocol for the Git repository.
This behaviour allows you to select the SSH private key to be used for checking out sources, which will consequently force the checkout to use the ssh:// protocol.
credentialsId
StringgiteaTagDiscoverygiteaTagDiscoverygiteaWebhookRegistrationgiteaWebhookRegistrationOverrides the defaults for webhook management.
Webhooks are used to inform Jenkins about changes to repositories. There are two ways webhooks can be configured:
The Manage Jenkins » Configure System › Gitea Server allows defining the list of servers. Each server can be associated with credentials. If credentials are defined then the default behaviour is to use those credentials to automatically manage the webhooks of all repositories that Jenkins is interested in. If no credentials are defined then the default behaviour is to require the user to manually configure webhooks.
mode
StringgitHubBranchDiscoverygitHubBranchDiscoverystrategyId
env.GIT_BRANCH will be set to the branch name rather than PR-#. Also, status notifications for these builds will only be applied to the commit and not to the pull request.
intgitHubForkDiscoverygitHubForkDiscoverystrategyId
inttrust
One of the great powers of pull requests is that anyone with read access to a repository can fork it, commit some changes to their fork and then create a pull request against the original repository with their changes. There are some files stored in source control that are important. For example, a Jenkinsfile may contain configuration details to sandbox pull requests in order to mitigate against malicious pull requests. In order to protect against a malicious pull request itself modifying the Jenkinsfile to remove the protections, you can define the trust policy for pull requests from forks.
Other plugins can extend the available trust policies. The default policies are:
Jenkinsfile) the contents of that file will be retrieved from the target branch on the origin repository and not from the pull request branch on the fork repository.
Nobody. NOTE: all collaborators are trusted, even if they are only members of a team with read permission.
jenkins.scm.api.trait.SCMHeadAuthority<? super org.jenkinsci.plugins.github_branch_source.GitHubSCMSourceRequest, ? extends jenkins.scm.api.mixin.ChangeRequestSCMHead2, ? extends jenkins.scm.api.SCMRevision>gitHubPullRequestDiscoverygitHubPullRequestDiscoverystrategyId
intgitHubSshCheckoutgitHubSshCheckouthttps:// protocol for the Git repository.
This behaviour allows you to select the SSH private key to be used for checking out sources, which will consequently force the checkout to use the ssh:// protocol.
credentialsId
StringgitHubTagDiscoverygitHubTagDiscoverygitlabgitlabserverName
StringprojectOwner
StringprojectPath
StringcredentialsId (optional)
Stringid (optional)
StringprojectId (optional)
inttraits (optional)
$class: 'ApprovedPullRequestTrait'$class: 'ApprovedPullRequestTrait'strategyId
int$class: 'AuthorInChangelogTrait'$class: 'AuthorInChangelogTrait'$class: 'BitbucketAgedRefsTrait'$class: 'BitbucketAgedRefsTrait'retentionDays
StringbitbucketBranchCommitSkipTraitbitbucketBranchCommitSkipTraitbitbucketBuildStatusNotificationsbitbucketBuildStatusNotificationssendSuccessNotificationForUnstableBuild (optional)
booleanbitbucketCommitSkipTraitbitbucketCommitSkipTrait$class: 'BitbucketJiraValidatorTrait'$class: 'BitbucketJiraValidatorTrait'jiraServerIdx
intbuildStatusNameCustomPartbuildStatusNameCustomPartbuildStatusNameCustomPart (optional)
String$class: 'ChangeDiscoveryTrait'$class: 'ChangeDiscoveryTrait'queryString
Provide an additional query string to search for open changes. The status:open is implicitly added and does not need to be specified. See Gerrit search operators documentation for a detailed list of the supported search operators.
-is:wipdoes not include work-in-progress changes
is:privateincludes private changes
String$class: 'CheckoutOptionTrait'$class: 'CheckoutOptionTrait'extension
timeouttimeout
int$class: 'CleanAfterCheckoutTrait'$class: 'CleanAfterCheckoutTrait'extension
.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.
deleteUntrackedNestedRepositoriesdeleteUntrackedNestedRepositories (optional)
.git directories.
boolean$class: 'CleanBeforeCheckoutTrait'$class: 'CleanBeforeCheckoutTrait'extension
.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.
deleteUntrackedNestedRepositoriesdeleteUntrackedNestedRepositories (optional)
.git directories.
boolean$class: 'CleanMercurialSCMSourceTrait'$class: 'CleanMercurialSCMSourceTrait'$class: 'CloneOptionTrait'$class: 'CloneOptionTrait'extension
shallowshallow
booleannoTagsnoTags
booleanreferencereference
Stringtimeouttimeout
intdepthdepth (optional)
inthonorRefspechonorRefspec (optional)
boolean$class: 'DisableStatusUpdateTrait'$class: 'DisableStatusUpdateTrait'$class: 'DiscoverOtherRefsTrait'$class: 'DiscoverOtherRefsTrait'ref
The pattern under /refs on the remote repository to discover, can contain a wildcard.
Example: test/*/merged
StringnameMapping (optional)
Mapping for how the ref can be named in for example the @Library.
Example: test-@{1}
Where @{1} replaces the first wildcard in the ref when discovered.
By default it will be "namespace_before_wildcard-@{1}". E.g. if ref is "test/*/merged" the default mapping would be "test-@{1}".
String$class: 'FilterChecksTrait'$class: 'FilterChecksTrait'queryOperator
ID, SCHEMEqueryString
StringgitLabForkDiscoverygitLabForkDiscoverystrategyId
inttrust
One of the great powers of merge requests is that anyone with read access to a project can fork it, commit some changes to their fork and then create a merge request against the original project with their changes. There are some files stored in source control that are important. For example, a Jenkinsfile may contain configuration details to sandbox merge requests in order to mitigate against malicious merge requests. In order to protect against a malicious merge request itself modifying the Jenkinsfile to remove the protections, you can define the trust policy for merge requests from forks.
Other plugins can extend the available trust policies. The default policies are:
Jenkinsfile) the contents of that file will be retrieved from the target branch on the origin project and not from the merge request branch on the fork project.
Nobody.
jenkins.scm.api.trait.SCMHeadAuthority<? super io.jenkins.plugins.gitlabbranchsource.GitLabSCMSourceRequest, ? extends jenkins.scm.api.mixin.ChangeRequestSCMHead2, ? extends jenkins.scm.api.SCMRevision>$class: 'GitBrowserSCMSourceTrait'$class: 'GitBrowserSCMSourceTrait'browser
$class: 'AssemblaWeb'$class: 'AssemblaWeb'repoUrl
String$class: 'BacklogGitRepositoryBrowser'$class: 'BacklogGitRepositoryBrowser'repoName
StringrepoUrl
StringbitbucketServerbitbucketServerrepoUrl
String$class: 'BitbucketWeb'$class: 'BitbucketWeb'repoUrl
String$class: 'CGit'$class: 'CGit'repoUrl
String$class: 'FisheyeGitRepositoryBrowser'$class: 'FisheyeGitRepositoryBrowser'repoUrl
String$class: 'GitBlitRepositoryBrowser'$class: 'GitBlitRepositoryBrowser'repoUrl
StringprojectName
String$class: 'GitBucketBrowser'$class: 'GitBucketBrowser'url
String$class: 'GitLab'$class: 'GitLab'repoUrl
Stringversion (optional)
String$class: 'GitLabBrowser'$class: 'GitLabBrowser'https://gitLab.example.com then the URL for bob's skunkworks project might be https://gitLab.example.com/bob/skunkworks.
projectUrl
https://gitLab.example.com then the URL for bob's skunkworks project might be https://gitLab.example.com/bob/skunkworks
String$class: 'GitList'$class: 'GitList'repoUrl
String$class: 'GitWeb'$class: 'GitWeb'repoUrl
String$class: 'GiteaBrowser'$class: 'GiteaBrowser'repoUrl
https://gitea.example.com then the URL for bob's skunkworks project repository might be https://gitea.example.com/bob/skunkworks
String$class: 'GithubWeb'$class: 'GithubWeb'repoUrl
String$class: 'Gitiles'$class: 'Gitiles'repoUrl
String$class: 'GitoriousWeb'$class: 'GitoriousWeb'repoUrl
String$class: 'GogsGit'$class: 'GogsGit'repoUrl
String$class: 'KilnGit'$class: 'KilnGit'repoUrl
String$class: 'Phabricator'$class: 'Phabricator'repoUrl
Stringrepo
String$class: 'RedmineWeb'$class: 'RedmineWeb'repoUrl
String$class: 'RhodeCode'$class: 'RhodeCode'repoUrl
String$class: 'ScmManagerGitRepositoryBrowser'$class: 'ScmManagerGitRepositoryBrowser'repoUrl
String$class: 'Stash'$class: 'Stash'repoUrl
String$class: 'TFS2013GitRepositoryBrowser'$class: 'TFS2013GitRepositoryBrowser'repoUrl
If TFS is also used as the repository server, this can usually be left blank.
String$class: 'TracGitRepositoryBrowser'$class: 'TracGitRepositoryBrowser'$class: 'TuleapBrowser'$class: 'TuleapBrowser'repositoryUrl
String$class: 'ViewGitWeb'$class: 'ViewGitWeb'repoUrl
StringprojectName
String$class: 'GitHubAgedRefsTrait'$class: 'GitHubAgedRefsTrait'retentionDays
StringgitHubBranchCommitSkipTraitgitHubBranchCommitSkipTraitgitHubCommitSkipTraitgitHubCommitSkipTrait$class: 'GitHubJiraValidatorTrait'$class: 'GitHubJiraValidatorTrait'jiraServerIdx
int$class: 'GitHubSCMSourceChecksTrait'$class: 'GitHubSCMSourceChecksTrait'verboseConsoleLog (optional)
boolean$class: 'GitHubSCMSourceStatusChecksTrait'$class: 'GitHubSCMSourceStatusChecksTrait'name (optional)
Stringskip (optional)
booleanskipNotifications (optional)
booleanskipProgressUpdates (optional)
booleansuppressLogs (optional)
booleanunstableBuildNeutral (optional)
boolean$class: 'GitLFSPullTrait'$class: 'GitLFSPullTrait'gitlabAvatargitlabAvatardisableProjectAvatar (optional)
booleangitlabSkipNotificationsgitlabSkipNotifications$class: 'GitToolSCMSourceTrait'$class: 'GitToolSCMSourceTrait'gitTool
String$class: 'HookRegistrationTrait'$class: 'HookRegistrationTrait'webHookMode
StringsystemHookMode
StringgitHubIgnoreDraftPullRequestFiltergitHubIgnoreDraftPullRequestFilter$class: 'IgnoreOnPushNotificationTrait'$class: 'IgnoreOnPushNotificationTrait'jervisFilterjervisFilterThis will look at the root of a GitHub reference for .jervis.yml for the branches and tags filtering. You can customize the name of the YAML file searched for if you like.
For Tags:
For Branches:
branches:
only:
- master
By default Jervis will generate Jenkins jobs for all branches that have a .jervis.yml file. You can control and limit this behavior by specifying the branches or tags key in your .jervis.yml.
You can either whitelist or blacklist branches that you want to be built:
# blacklist
branches:
except:
- legacy
- experimental
# whitelist
branches:
only:
- master
- stable
The same YAML can be applied to tags.
# blacklist
tags:
except:
- .*-rc
- .*-beta
# whitelist
tags:
only:
- v[.0-9]+
If you specify both only and except, then except will be ignored. .jervis.yml needs to be present on all branches you want to be built. .jervis.yml will be interpreted in the context of that branch so if you specify a whitelist in your master branch it will not propagate to other branches.
You can use regular expressions to whitelist or blacklist branches:
branches:
only:
- master
- /^[.0-9]+-hotfix$/
Any name surrounded with / in the list of branches is treated as a regular expression. The expression will use Pattern.compile to compile the regex string into a Groovy regular expression.
yamlFileName
The filename which will be read from GitHub to determine if a Jenkins branch, tag, or pull request should be built. Provide a comma separated list of paths to YAML files in a repository and it will check each path as a fallback.
For example, set the value to: .jervis.yml, .ci/jervis.yml and this plugin will first check for valid YAML in .jervis.yml. If no YAML exists, then it will fall back to checking .ci/jervis.yml.
String$class: 'LocalBranchTrait'$class: 'LocalBranchTrait'logCommentlogCommentlogSuccess (optional)
booleansudoUser (optional)
String$class: 'MercurialBrowserSCMSourceTrait'$class: 'MercurialBrowserSCMSourceTrait'browser
$class: 'FishEye'$class: 'FishEye'url
String$class: 'GoogleCode'$class: 'GoogleCode'url
String$class: 'HgWeb'$class: 'HgWeb'url
String$class: 'Kallithea'$class: 'Kallithea'url
String$class: 'KilnHG'$class: 'KilnHG'url
String$class: 'RhodeCode'$class: 'RhodeCode'url
String$class: 'RhodeCodeLegacy'$class: 'RhodeCodeLegacy'url
String$class: 'ScmManager'$class: 'ScmManager'url
http://YOURSCMMANAGER/scm/repo/NAMESPACE/NAME/).
String$class: 'MercurialInstallationSCMSourceTrait'$class: 'MercurialInstallationSCMSourceTrait'installation
String$class: 'NotificationContextTrait'$class: 'NotificationContextTrait'contextLabel
StringtypeSuffix
Appends the relevant suffix to the context label based on the build type. '/pr-merge', '/pr-head' or '/branch'
booleannotificationsSkipnotificationsSkipgitLabOriginDiscoverygitLabOriginDiscoverystrategyId
int$class: 'PathBasedPullRequestFilterTrait'$class: 'PathBasedPullRequestFilterTrait'inclusionField
StringexclusionField
String$class: 'PreBuildMergeTrait'$class: 'PreBuildMergeTrait'extension
optionsoptions
mergeTargetmergeTarget
master.
StringfastForwardModefastForwardMode (optional)
FF, FF_ONLY, NO_FFmergeRemotemergeRemote (optional)
origin, that contains the branch you specify below. If left blank, it'll default to the name of the first repository configured above.
StringmergeStrategymergeStrategy (optional)
DEFAULT, RESOLVE, RECURSIVE, OCTOPUS, OURS, SUBTREE, RECURSIVE_THEIRS$class: 'PretestedIntegrationSCMTrait'$class: 'PretestedIntegrationSCMTrait'extension
gitIntegrationStrategygitIntegrationStrategy
accumulatedaccumulatedsquashsquashintegrationBranchintegrationBranch
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>
StringrepoNamerepoName
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
String$class: 'PruneStaleBranchTrait'$class: 'PruneStaleBranchTrait'$class: 'PruneStaleTagTrait'$class: 'PruneStaleTagTrait'bitbucketPublicRepoPullRequestFilterbitbucketPublicRepoPullRequestFilter$class: 'PullRequestDiscoveryTrait'$class: 'PullRequestDiscoveryTrait'excludeBranchesWithPRs
boolean$class: 'PullRequestLabelsBlackListFilterTrait'$class: 'PullRequestLabelsBlackListFilterTrait'labels
String$class: 'PullRequestLabelsMatchAllFilterTrait'$class: 'PullRequestLabelsMatchAllFilterTrait'labels
String$class: 'PullRequestLabelsMatchAnyFilterTrait'$class: 'PullRequestLabelsMatchAnyFilterTrait'labels
String$class: 'PullRequestNameFilterTrait'$class: 'PullRequestNameFilterTrait'strategyId
intphrase
StringignoreCase
booleanregex
boolean$class: 'RefSpecsSCMSourceTrait'$class: 'RefSpecsSCMSourceTrait'templates
valuevalue
@{remote} will be replaced by the remote name (which defaults to origin) before use.
StringheadRegexFilterWithPRFromOriginheadRegexFilterWithPRFromOriginregex
StringtagRegex
String$class: 'RemoteNameSCMSourceTrait'$class: 'RemoteNameSCMSourceTrait'remoteName
StringskipNotificationsskipNotifications$class: 'SparseCheckoutPathsTrait'$class: 'SparseCheckoutPathsTrait'extension
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
sparseCheckoutPathssparseCheckoutPaths
pathpath
String$class: 'SubmoduleOptionTrait'$class: 'SubmoduleOptionTrait'extension
disableSubmodulesdisableSubmodules
booleanrecursiveSubmodulesrecursiveSubmodules
booleantrackingSubmodulestrackingSubmodules
booleanreferencereference
git init --bare git remote add SubProject1 https://gitrepo.com/subproject1 git remote add SubProject2 https://gitrepo.com/subproject2 git fetch --all
Stringtimeouttimeout
intparentCredentialsparentCredentials
booleandepthdepth (optional)
intshallowshallow (optional)
booleanthreadsthreads (optional)
intmrTriggerCommentmrTriggerCommentcommentBody
StringonlyTrustedMembersCanTrigger
booleantuleapBranchDiscoverytuleapBranchDiscoverytuleapNotifyPullRequesttuleapNotifyPullRequesttuleapForkPullRequestDiscoverytuleapForkPullRequestDiscoverytuleapPullRequestDiscoverytuleapPullRequestDiscovery$class: 'UserIdentityTrait'$class: 'UserIdentityTrait'extension
namename
If given, "GIT_COMMITTER_NAME=[this]" and "GIT_AUTHOR_NAME=[this]" are set for builds. This overrides whatever is in the global settings.
Stringemailemail
If given, "GIT_COMMITTER_EMAIL=[this]" and "GIT_AUTHOR_EMAIL=[this]" are set for builds. This overrides whatever is in the global settings.
StringbitbucketWebhookConfigurationbitbucketWebhookConfigurationSets the value for committersToIgnore in the Bitbucket Webhook. Value should be a comma separated string.
committerToIgnore is used to prevent triggering Jenkins builds when commits by certain users are made.
committersToIgnore
StringheadWildcardFilterWithPRFromOriginheadWildcardFilterWithPRFromOriginincludes
* as a wildcard; for example: master release*
Stringexcludes
release
StringtagIncludes
* as a wildcard; for example: *-1.* to build only 1.0 tags from the maven release plugin.
StringtagExcludes
*-0.*
String$class: 'WipeWorkspaceTrait'$class: 'WipeWorkspaceTrait'bitbucketBranchDiscoverybitbucketBranchDiscoverystrategyId
intbitbucketForkDiscoverybitbucketForkDiscoverystrategyId
inttrust
One of the great powers of pull requests is that anyone with read access to a repository can fork it, commit some changes to their fork and then create a pull request against the original repository with their changes. There are some files stored in source control that are important. For example, a Jenkinsfile may contain configuration details to sandbox pull requests in order to mitigate against malicious pull requests. In order to protect against a malicious pull request itself modifying the Jenkinsfile to remove the protections, you can define the trust policy for pull requests from forks.
Other plugins can extend the available trust policies. The default policies are:
Jenkinsfile) the contents of that file will be retrieved from the target branch on the origin repository and not from the pull request branch on the fork repository.
jenkins.scm.api.trait.SCMHeadAuthority<? super com.cloudbees.jenkins.plugins.bitbucket.BitbucketSCMSourceRequest, ? extends jenkins.scm.api.mixin.ChangeRequestSCMHead2, ? extends jenkins.scm.api.SCMRevision>bitbucketPullRequestDiscoverybitbucketPullRequestDiscoverystrategyId
intbitbucketSshCheckoutbitbucketSshCheckouthttps:// protocol for the Git repository.
This behaviour allows you to select the SSH private key to be used for checking out sources, which will consequently force the checkout to use the ssh:// protocol.
credentialsId
It must be a SSH key based credential.
StringbitbucketTagDiscoverybitbucketTagDiscoverybitbucketWebhookRegistrationbitbucketWebhookRegistrationOverrides the defaults for webhook management.
Webhooks are used to inform Jenkins about changes to repositories. There are two ways webhooks can be configured:
The Manage Jenkins » Configure Jenkins › Bitbucket Endpoints allows defining the list of servers. Each server can be associated with credentials. If credentials are defined then the default behaviour is to use those credentials to automatically manage the webhooks of all repositories that Jenkins is interested in. If no credentials are defined then the default behaviour is to require the user to manually configure webhooks.
mode
String$class: 'com.cloudogu.scmmanager.scm.BranchDiscoveryTrait'$class: 'com.cloudogu.scmmanager.scm.BranchDiscoveryTrait'$class: 'com.cloudogu.scmmanager.scm.TagDiscoveryTrait'$class: 'com.cloudogu.scmmanager.scm.TagDiscoveryTrait'dagshubBranchDiscoverydagshubBranchDiscovery$class: 'io.jenkins.plugins.dagshubbranchsource.traits.ForkPullRequestDiscoveryTrait'$class: 'io.jenkins.plugins.dagshubbranchsource.traits.ForkPullRequestDiscoveryTrait'buildOnPullHead (optional)
boolean$class: 'io.jenkins.plugins.dagshubbranchsource.traits.OriginPullRequestDiscoveryTrait'$class: 'io.jenkins.plugins.dagshubbranchsource.traits.OriginPullRequestDiscoveryTrait'buildOnPullHead (optional)
booleandagshubTagDiscoverydagshubTagDiscoverygitLabBranchDiscoverygitLabBranchDiscoverystrategyId
int$class: 'io.jenkins.plugins.gitlabbranchsource.SSHCheckoutTrait'$class: 'io.jenkins.plugins.gitlabbranchsource.SSHCheckoutTrait'https:// protocol for the Git repository.
This behaviour allows you to select the SSH private key to be used for checking out sources, which will consequently force the checkout to use the ssh:// protocol.
credentialsId
StringgitLabTagDiscoverygitLabTagDiscoverygitBranchDiscoverygitBranchDiscoverygitTagDiscoverygitTagDiscoveryheadRegexFilterheadRegexFilterregex
StringheadWildcardFilterheadWildcardFilterincludes
* as a wildcard; for example: master release*
Stringexcludes
release alpha-* beta-*
StringheadRegexFilterWithPRheadRegexFilterWithPRregex
StringtagRegex
StringheadWildcardFilterWithPRheadWildcardFilterWithPRincludes
* as a wildcard; for example: master release*
Stringexcludes
release
StringtagIncludes
* as a wildcard; for example: *-1.* to build only 1.0 tags from the maven release plugin.
StringtagExcludes
*-0.*
StringgiteaBranchDiscoverygiteaBranchDiscoverystrategyId
intgiteaForkDiscoverygiteaForkDiscoverystrategyId
inttrust
One of the great powers of pull requests is that anyone with read access to a repository can fork it, commit some changes to their fork and then create a pull request against the original repository with their changes. There are some files stored in source control that are important. For example, a Jenkinsfile may contain configuration details to sandbox pull requests in order to mitigate against malicious pull requests. In order to protect against a malicious pull request itself modifying the Jenkinsfile to remove the protections, you can define the trust policy for pull requests from forks.
Other plugins can extend the available trust policies. The default policies are:
Jenkinsfile) the contents of that file will be retrieved from the target branch on the origin repository and not from the pull request branch on the fork repository.
Nobody.
gitLabTrustMembersgitLabTrustMembersbitbucketTrustTeambitbucketTrustTeambitbucketTrustEveryonebitbucketTrustEveryonebitbucketTrustNobodybitbucketTrustNobodygitLabTrustEveryonegitLabTrustEveryonegitLabTrustNobodygitLabTrustNobodygitLabTrustPermissionsgitLabTrustPermissionsgiteaTrustContributorsgiteaTrustContributorsgiteaTrustEveryonegiteaTrustEveryonegiteaTrustNobodygiteaTrustNobodygitHubTrustContributorsgitHubTrustContributorsgitHubTrustEveryonegitHubTrustEveryonegitHubTrustNobodygitHubTrustNobodygitHubTrustPermissionsgitHubTrustPermissionsgiteaPullRequestDiscoverygiteaPullRequestDiscoverystrategyId
intgiteaSSHCheckoutgiteaSSHCheckouthttps:// protocol for the Git repository.
This behaviour allows you to select the SSH private key to be used for checking out sources, which will consequently force the checkout to use the ssh:// protocol.
credentialsId
StringgiteaTagDiscoverygiteaTagDiscoverygiteaWebhookRegistrationgiteaWebhookRegistrationOverrides the defaults for webhook management.
Webhooks are used to inform Jenkins about changes to repositories. There are two ways webhooks can be configured:
The Manage Jenkins » Configure System › Gitea Server allows defining the list of servers. Each server can be associated with credentials. If credentials are defined then the default behaviour is to use those credentials to automatically manage the webhooks of all repositories that Jenkins is interested in. If no credentials are defined then the default behaviour is to require the user to manually configure webhooks.
mode
StringgitHubBranchDiscoverygitHubBranchDiscoverystrategyId
env.GIT_BRANCH will be set to the branch name rather than PR-#. Also, status notifications for these builds will only be applied to the commit and not to the pull request.
intgitHubForkDiscoverygitHubForkDiscoverystrategyId
inttrust
One of the great powers of pull requests is that anyone with read access to a repository can fork it, commit some changes to their fork and then create a pull request against the original repository with their changes. There are some files stored in source control that are important. For example, a Jenkinsfile may contain configuration details to sandbox pull requests in order to mitigate against malicious pull requests. In order to protect against a malicious pull request itself modifying the Jenkinsfile to remove the protections, you can define the trust policy for pull requests from forks.
Other plugins can extend the available trust policies. The default policies are:
Jenkinsfile) the contents of that file will be retrieved from the target branch on the origin repository and not from the pull request branch on the fork repository.
Nobody. NOTE: all collaborators are trusted, even if they are only members of a team with read permission.
jenkins.scm.api.trait.SCMHeadAuthority<? super org.jenkinsci.plugins.github_branch_source.GitHubSCMSourceRequest, ? extends jenkins.scm.api.mixin.ChangeRequestSCMHead2, ? extends jenkins.scm.api.SCMRevision>gitHubPullRequestDiscoverygitHubPullRequestDiscoverystrategyId
intgitHubSshCheckoutgitHubSshCheckouthttps:// protocol for the Git repository.
This behaviour allows you to select the SSH private key to be used for checking out sources, which will consequently force the checkout to use the ssh:// protocol.
credentialsId
StringgitHubTagDiscoverygitHubTagDiscoverygitgitremote
git clone command.
Stringbrowser (optional)
$class: 'AssemblaWeb'$class: 'AssemblaWeb'repoUrl
String$class: 'BacklogGitRepositoryBrowser'$class: 'BacklogGitRepositoryBrowser'repoName
StringrepoUrl
StringbitbucketServerbitbucketServerrepoUrl
String$class: 'BitbucketWeb'$class: 'BitbucketWeb'repoUrl
String$class: 'CGit'$class: 'CGit'repoUrl
String$class: 'FisheyeGitRepositoryBrowser'$class: 'FisheyeGitRepositoryBrowser'repoUrl
String$class: 'GitBlitRepositoryBrowser'$class: 'GitBlitRepositoryBrowser'repoUrl
StringprojectName
String$class: 'GitBucketBrowser'$class: 'GitBucketBrowser'url
String$class: 'GitLab'$class: 'GitLab'repoUrl
Stringversion (optional)
String$class: 'GitLabBrowser'$class: 'GitLabBrowser'https://gitLab.example.com then the URL for bob's skunkworks project might be https://gitLab.example.com/bob/skunkworks.
projectUrl
https://gitLab.example.com then the URL for bob's skunkworks project might be https://gitLab.example.com/bob/skunkworks
String$class: 'GitList'$class: 'GitList'repoUrl
String$class: 'GitWeb'$class: 'GitWeb'repoUrl
String$class: 'GiteaBrowser'$class: 'GiteaBrowser'repoUrl
https://gitea.example.com then the URL for bob's skunkworks project repository might be https://gitea.example.com/bob/skunkworks
String$class: 'GithubWeb'$class: 'GithubWeb'repoUrl
String$class: 'Gitiles'$class: 'Gitiles'repoUrl
String$class: 'GitoriousWeb'$class: 'GitoriousWeb'repoUrl
String$class: 'GogsGit'$class: 'GogsGit'repoUrl
String$class: 'KilnGit'$class: 'KilnGit'repoUrl
String$class: 'Phabricator'$class: 'Phabricator'repoUrl
Stringrepo
String$class: 'RedmineWeb'$class: 'RedmineWeb'repoUrl
String$class: 'RhodeCode'$class: 'RhodeCode'repoUrl
String$class: 'ScmManagerGitRepositoryBrowser'$class: 'ScmManagerGitRepositoryBrowser'repoUrl
String$class: 'Stash'$class: 'Stash'repoUrl
String$class: 'TFS2013GitRepositoryBrowser'$class: 'TFS2013GitRepositoryBrowser'repoUrl
If TFS is also used as the repository server, this can usually be left blank.
String$class: 'TracGitRepositoryBrowser'$class: 'TracGitRepositoryBrowser'$class: 'TuleapBrowser'$class: 'TuleapBrowser'repositoryUrl
String$class: 'ViewGitWeb'$class: 'ViewGitWeb'repoUrl
StringprojectName
StringcredentialsId (optional)
Stringextensions (optional)
$class: 'AuthorInChangelog'$class: 'AuthorInChangelog'$class: 'BuildChooserSetting'$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: 'AlternativeBuildChooser'$class: 'AncestryBuildChooser'$class: 'AncestryBuildChooser'maximumAgeInDays
intancestorCommitSha1
String$class: 'DefaultBuildChooser'$class: 'DefaultBuildChooser'$class: 'DeflakeGitBuildChooser'$class: 'DeflakeGitBuildChooser'$class: 'GerritTriggerBuildChooser'$class: 'GerritTriggerBuildChooser'$class: 'InverseBuildChooser'$class: 'InverseBuildChooser'$class: 'BuildSingleRevisionOnly'$class: 'BuildSingleRevisionOnly'$class: 'ChangelogToBranch'$class: 'ChangelogToBranch'options
compareRemotecompareRemote
origin, that contains the branch you specify below.
StringcompareTargetcompareTarget
String$class: 'CheckoutOption'$class: 'CheckoutOption'timeout
int$class: 'CleanBeforeCheckout'$class: '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 (optional)
.git directories.
boolean$class: 'CleanCheckout'$class: 'CleanCheckout'.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 (optional)
.git directories.
boolean$class: 'CloneOption'$class: 'CloneOption'shallow
booleannoTags
booleanreference
Stringtimeout
intdepth (optional)
inthonorRefspec (optional)
boolean$class: 'CodeCommitURLHelper'$class: 'CodeCommitURLHelper'credentialId
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.
StringrepositoryName
String$class: 'DisableRemotePoll'$class: 'DisableRemotePoll'$class: 'ExcludeFromChangeSet'$class: 'ExcludeFromChangeSet'$class: 'ExcludeFromPoll'$class: 'ExcludeFromPoll'$class: 'GitLFSPull'$class: 'GitLFSPull'$class: 'GitSCMChecksExtension'$class: 'GitSCMChecksExtension'verboseConsoleLog (optional)
boolean$class: 'GitSCMStatusChecksExtension'$class: 'GitSCMStatusChecksExtension'name (optional)
Stringskip (optional)
booleanskipProgressUpdates (optional)
booleansuppressLogs (optional)
booleanunstableBuildNeutral (optional)
boolean$class: 'GitTagMessageExtension'$class: 'GitTagMessageExtension'useMostRecentTag (optional)
boolean$class: 'IgnoreNotifyCommit'$class: 'IgnoreNotifyCommit'$class: 'LocalBranch'$class: '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'$class: 'MessageExclusion'excludedMessage
.*\[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.
String$class: 'PathRestriction'$class: 'PathRestriction'includedRegions
myapp/src/main/web/.*\.html
myapp/src/main/web/.*\.jpeg
myapp/src/main/web/.*\.gif
The 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.
StringexcludedRegions
myapp/src/main/web/.*\.html
myapp/src/main/web/.*\.jpeg
myapp/src/main/web/.*\.gif
The example above illustrates that if only html/jpeg/gif files have been committed to the SCM a build will not occur.
String$class: 'PerBuildTag'$class: 'PerBuildTag'$class: 'PreBuildMerge'$class: 'PreBuildMerge'options
mergeTargetmergeTarget
master.
StringfastForwardModefastForwardMode (optional)
FF, FF_ONLY, NO_FFmergeRemotemergeRemote (optional)
origin, that contains the branch you specify below. If left blank, it'll default to the name of the first repository configured above.
StringmergeStrategymergeStrategy (optional)
DEFAULT, RESOLVE, RECURSIVE, OCTOPUS, OURS, SUBTREE, RECURSIVE_THEIRSpretestedIntegrationpretestedIntegrationgitIntegrationStrategy
accumulatedaccumulatedsquashsquashintegrationBranch
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>
StringrepoName
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
String$class: 'PruneStaleBranch'$class: 'PruneStaleBranch'pruneTagspruneTagspruneTags
boolean$class: 'RelativeTargetDirectory'$class: 'RelativeTargetDirectory'relativeTargetDir
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.
String$class: 'ScmName'$class: 'ScmName'Unique name for this SCM. Needed when using Git within the Multi SCM plugin.
name
String$class: 'SparseCheckoutPaths'$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
pathpath
String$class: 'SubmoduleOption'$class: 'SubmoduleOption'disableSubmodules
booleanrecursiveSubmodules
booleantrackingSubmodules
booleanreference
git init --bare git remote add SubProject1 https://gitrepo.com/subproject1 git remote add SubProject2 https://gitrepo.com/subproject2 git fetch --all
Stringtimeout
intparentCredentials
booleandepth (optional)
intshallow (optional)
booleanthreads (optional)
int$class: 'UserExclusion'$class: 'UserExclusion'excludedUsers
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.
String$class: 'UserIdentity'$class: 'UserIdentity'name
If given, "GIT_COMMITTER_NAME=[this]" and "GIT_AUTHOR_NAME=[this]" are set for builds. This overrides whatever is in the global settings.
Stringemail
If given, "GIT_COMMITTER_EMAIL=[this]" and "GIT_AUTHOR_EMAIL=[this]" are set for builds. This overrides whatever is in the global settings.
String$class: 'WipeWorkspace'$class: 'WipeWorkspace'gitTool (optional)
Stringid (optional)
Stringtraits (optional)
$class: 'ApprovedPullRequestTrait'$class: 'ApprovedPullRequestTrait'strategyId
int$class: 'AuthorInChangelogTrait'$class: 'AuthorInChangelogTrait'$class: 'BitbucketAgedRefsTrait'$class: 'BitbucketAgedRefsTrait'retentionDays
StringbitbucketBranchCommitSkipTraitbitbucketBranchCommitSkipTraitbitbucketBuildStatusNotificationsbitbucketBuildStatusNotificationssendSuccessNotificationForUnstableBuild (optional)
booleanbitbucketCommitSkipTraitbitbucketCommitSkipTrait$class: 'BitbucketJiraValidatorTrait'$class: 'BitbucketJiraValidatorTrait'jiraServerIdx
intbuildStatusNameCustomPartbuildStatusNameCustomPartbuildStatusNameCustomPart (optional)
String$class: 'ChangeDiscoveryTrait'$class: 'ChangeDiscoveryTrait'queryString
Provide an additional query string to search for open changes. The status:open is implicitly added and does not need to be specified. See Gerrit search operators documentation for a detailed list of the supported search operators.
-is:wipdoes not include work-in-progress changes
is:privateincludes private changes
String$class: 'CheckoutOptionTrait'$class: 'CheckoutOptionTrait'extension
timeouttimeout
int$class: 'CleanAfterCheckoutTrait'$class: 'CleanAfterCheckoutTrait'extension
.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.
deleteUntrackedNestedRepositoriesdeleteUntrackedNestedRepositories (optional)
.git directories.
boolean$class: 'CleanBeforeCheckoutTrait'$class: 'CleanBeforeCheckoutTrait'extension
.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.
deleteUntrackedNestedRepositoriesdeleteUntrackedNestedRepositories (optional)
.git directories.
boolean$class: 'CleanMercurialSCMSourceTrait'$class: 'CleanMercurialSCMSourceTrait'$class: 'CloneOptionTrait'$class: 'CloneOptionTrait'extension
shallowshallow
booleannoTagsnoTags
booleanreferencereference
Stringtimeouttimeout
intdepthdepth (optional)
inthonorRefspechonorRefspec (optional)
boolean$class: 'DisableStatusUpdateTrait'$class: 'DisableStatusUpdateTrait'$class: 'DiscoverOtherRefsTrait'$class: 'DiscoverOtherRefsTrait'ref
The pattern under /refs on the remote repository to discover, can contain a wildcard.
Example: test/*/merged
StringnameMapping (optional)
Mapping for how the ref can be named in for example the @Library.
Example: test-@{1}
Where @{1} replaces the first wildcard in the ref when discovered.
By default it will be "namespace_before_wildcard-@{1}". E.g. if ref is "test/*/merged" the default mapping would be "test-@{1}".
String$class: 'FilterChecksTrait'$class: 'FilterChecksTrait'queryOperator
ID, SCHEMEqueryString
StringgitLabForkDiscoverygitLabForkDiscoverystrategyId
inttrust
One of the great powers of merge requests is that anyone with read access to a project can fork it, commit some changes to their fork and then create a merge request against the original project with their changes. There are some files stored in source control that are important. For example, a Jenkinsfile may contain configuration details to sandbox merge requests in order to mitigate against malicious merge requests. In order to protect against a malicious merge request itself modifying the Jenkinsfile to remove the protections, you can define the trust policy for merge requests from forks.
Other plugins can extend the available trust policies. The default policies are:
Jenkinsfile) the contents of that file will be retrieved from the target branch on the origin project and not from the merge request branch on the fork project.
Nobody.
jenkins.scm.api.trait.SCMHeadAuthority<? super io.jenkins.plugins.gitlabbranchsource.GitLabSCMSourceRequest, ? extends jenkins.scm.api.mixin.ChangeRequestSCMHead2, ? extends jenkins.scm.api.SCMRevision>$class: 'GitBrowserSCMSourceTrait'$class: 'GitBrowserSCMSourceTrait'browser
$class: 'AssemblaWeb'$class: 'AssemblaWeb'repoUrl
String$class: 'BacklogGitRepositoryBrowser'$class: 'BacklogGitRepositoryBrowser'repoName
StringrepoUrl
StringbitbucketServerbitbucketServerrepoUrl
String$class: 'BitbucketWeb'$class: 'BitbucketWeb'repoUrl
String$class: 'CGit'$class: 'CGit'repoUrl
String$class: 'FisheyeGitRepositoryBrowser'$class: 'FisheyeGitRepositoryBrowser'repoUrl
String$class: 'GitBlitRepositoryBrowser'$class: 'GitBlitRepositoryBrowser'repoUrl
StringprojectName
String$class: 'GitBucketBrowser'$class: 'GitBucketBrowser'url
String$class: 'GitLab'$class: 'GitLab'repoUrl
Stringversion (optional)
String$class: 'GitLabBrowser'$class: 'GitLabBrowser'https://gitLab.example.com then the URL for bob's skunkworks project might be https://gitLab.example.com/bob/skunkworks.
projectUrl
https://gitLab.example.com then the URL for bob's skunkworks project might be https://gitLab.example.com/bob/skunkworks
String$class: 'GitList'$class: 'GitList'repoUrl
String$class: 'GitWeb'$class: 'GitWeb'repoUrl
String$class: 'GiteaBrowser'$class: 'GiteaBrowser'repoUrl
https://gitea.example.com then the URL for bob's skunkworks project repository might be https://gitea.example.com/bob/skunkworks
String$class: 'GithubWeb'$class: 'GithubWeb'repoUrl
String$class: 'Gitiles'$class: 'Gitiles'repoUrl
String$class: 'GitoriousWeb'$class: 'GitoriousWeb'repoUrl
String$class: 'GogsGit'$class: 'GogsGit'repoUrl
String$class: 'KilnGit'$class: 'KilnGit'repoUrl
String$class: 'Phabricator'$class: 'Phabricator'repoUrl
Stringrepo
String$class: 'RedmineWeb'$class: 'RedmineWeb'repoUrl
String$class: 'RhodeCode'$class: 'RhodeCode'repoUrl
String$class: 'ScmManagerGitRepositoryBrowser'$class: 'ScmManagerGitRepositoryBrowser'repoUrl
String$class: 'Stash'$class: 'Stash'repoUrl
String$class: 'TFS2013GitRepositoryBrowser'$class: 'TFS2013GitRepositoryBrowser'repoUrl
If TFS is also used as the repository server, this can usually be left blank.
String$class: 'TracGitRepositoryBrowser'$class: 'TracGitRepositoryBrowser'$class: 'TuleapBrowser'$class: 'TuleapBrowser'repositoryUrl
String$class: 'ViewGitWeb'$class: 'ViewGitWeb'repoUrl
StringprojectName
String$class: 'GitHubAgedRefsTrait'$class: 'GitHubAgedRefsTrait'retentionDays
StringgitHubBranchCommitSkipTraitgitHubBranchCommitSkipTraitgitHubCommitSkipTraitgitHubCommitSkipTrait$class: 'GitHubJiraValidatorTrait'$class: 'GitHubJiraValidatorTrait'jiraServerIdx
int$class: 'GitHubSCMSourceChecksTrait'$class: 'GitHubSCMSourceChecksTrait'verboseConsoleLog (optional)
boolean$class: 'GitHubSCMSourceStatusChecksTrait'$class: 'GitHubSCMSourceStatusChecksTrait'name (optional)
Stringskip (optional)
booleanskipNotifications (optional)
booleanskipProgressUpdates (optional)
booleansuppressLogs (optional)
booleanunstableBuildNeutral (optional)
boolean$class: 'GitLFSPullTrait'$class: 'GitLFSPullTrait'gitlabAvatargitlabAvatardisableProjectAvatar (optional)
booleangitlabSkipNotificationsgitlabSkipNotifications$class: 'GitToolSCMSourceTrait'$class: 'GitToolSCMSourceTrait'gitTool
String$class: 'HookRegistrationTrait'$class: 'HookRegistrationTrait'webHookMode
StringsystemHookMode
StringgitHubIgnoreDraftPullRequestFiltergitHubIgnoreDraftPullRequestFilter$class: 'IgnoreOnPushNotificationTrait'$class: 'IgnoreOnPushNotificationTrait'jervisFilterjervisFilterThis will look at the root of a GitHub reference for .jervis.yml for the branches and tags filtering. You can customize the name of the YAML file searched for if you like.
For Tags:
For Branches:
branches:
only:
- master
By default Jervis will generate Jenkins jobs for all branches that have a .jervis.yml file. You can control and limit this behavior by specifying the branches or tags key in your .jervis.yml.
You can either whitelist or blacklist branches that you want to be built:
# blacklist
branches:
except:
- legacy
- experimental
# whitelist
branches:
only:
- master
- stable
The same YAML can be applied to tags.
# blacklist
tags:
except:
- .*-rc
- .*-beta
# whitelist
tags:
only:
- v[.0-9]+
If you specify both only and except, then except will be ignored. .jervis.yml needs to be present on all branches you want to be built. .jervis.yml will be interpreted in the context of that branch so if you specify a whitelist in your master branch it will not propagate to other branches.
You can use regular expressions to whitelist or blacklist branches:
branches:
only:
- master
- /^[.0-9]+-hotfix$/
Any name surrounded with / in the list of branches is treated as a regular expression. The expression will use Pattern.compile to compile the regex string into a Groovy regular expression.
yamlFileName
The filename which will be read from GitHub to determine if a Jenkins branch, tag, or pull request should be built. Provide a comma separated list of paths to YAML files in a repository and it will check each path as a fallback.
For example, set the value to: .jervis.yml, .ci/jervis.yml and this plugin will first check for valid YAML in .jervis.yml. If no YAML exists, then it will fall back to checking .ci/jervis.yml.
String$class: 'LocalBranchTrait'$class: 'LocalBranchTrait'logCommentlogCommentlogSuccess (optional)
booleansudoUser (optional)
String$class: 'MercurialBrowserSCMSourceTrait'$class: 'MercurialBrowserSCMSourceTrait'browser
$class: 'FishEye'$class: 'FishEye'url
String$class: 'GoogleCode'$class: 'GoogleCode'url
String$class: 'HgWeb'$class: 'HgWeb'url
String$class: 'Kallithea'$class: 'Kallithea'url
String$class: 'KilnHG'$class: 'KilnHG'url
String$class: 'RhodeCode'$class: 'RhodeCode'url
String$class: 'RhodeCodeLegacy'$class: 'RhodeCodeLegacy'url
String$class: 'ScmManager'$class: 'ScmManager'url
http://YOURSCMMANAGER/scm/repo/NAMESPACE/NAME/).
String$class: 'MercurialInstallationSCMSourceTrait'$class: 'MercurialInstallationSCMSourceTrait'installation
String$class: 'NotificationContextTrait'$class: 'NotificationContextTrait'contextLabel
StringtypeSuffix
Appends the relevant suffix to the context label based on the build type. '/pr-merge', '/pr-head' or '/branch'
booleannotificationsSkipnotificationsSkipgitLabOriginDiscoverygitLabOriginDiscoverystrategyId
int$class: 'PathBasedPullRequestFilterTrait'$class: 'PathBasedPullRequestFilterTrait'inclusionField
StringexclusionField
String$class: 'PreBuildMergeTrait'$class: 'PreBuildMergeTrait'extension
optionsoptions
mergeTargetmergeTarget
master.
StringfastForwardModefastForwardMode (optional)
FF, FF_ONLY, NO_FFmergeRemotemergeRemote (optional)
origin, that contains the branch you specify below. If left blank, it'll default to the name of the first repository configured above.
StringmergeStrategymergeStrategy (optional)
DEFAULT, RESOLVE, RECURSIVE, OCTOPUS, OURS, SUBTREE, RECURSIVE_THEIRS$class: 'PretestedIntegrationSCMTrait'$class: 'PretestedIntegrationSCMTrait'extension
gitIntegrationStrategygitIntegrationStrategy
accumulatedaccumulatedsquashsquashintegrationBranchintegrationBranch
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>
StringrepoNamerepoName
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
String$class: 'PruneStaleBranchTrait'$class: 'PruneStaleBranchTrait'$class: 'PruneStaleTagTrait'$class: 'PruneStaleTagTrait'bitbucketPublicRepoPullRequestFilterbitbucketPublicRepoPullRequestFilter$class: 'PullRequestDiscoveryTrait'$class: 'PullRequestDiscoveryTrait'excludeBranchesWithPRs
boolean$class: 'PullRequestLabelsBlackListFilterTrait'$class: 'PullRequestLabelsBlackListFilterTrait'labels
String$class: 'PullRequestLabelsMatchAllFilterTrait'$class: 'PullRequestLabelsMatchAllFilterTrait'labels
String$class: 'PullRequestLabelsMatchAnyFilterTrait'$class: 'PullRequestLabelsMatchAnyFilterTrait'labels
String$class: 'PullRequestNameFilterTrait'$class: 'PullRequestNameFilterTrait'strategyId
intphrase
StringignoreCase
booleanregex
boolean$class: 'RefSpecsSCMSourceTrait'$class: 'RefSpecsSCMSourceTrait'templates
valuevalue
@{remote} will be replaced by the remote name (which defaults to origin) before use.
StringheadRegexFilterWithPRFromOriginheadRegexFilterWithPRFromOriginregex
StringtagRegex
String$class: 'RemoteNameSCMSourceTrait'$class: 'RemoteNameSCMSourceTrait'remoteName
StringskipNotificationsskipNotifications$class: 'SparseCheckoutPathsTrait'$class: 'SparseCheckoutPathsTrait'extension
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
sparseCheckoutPathssparseCheckoutPaths
pathpath
String$class: 'SubmoduleOptionTrait'$class: 'SubmoduleOptionTrait'extension
disableSubmodulesdisableSubmodules
booleanrecursiveSubmodulesrecursiveSubmodules
booleantrackingSubmodulestrackingSubmodules
booleanreferencereference
git init --bare git remote add SubProject1 https://gitrepo.com/subproject1 git remote add SubProject2 https://gitrepo.com/subproject2 git fetch --all
Stringtimeouttimeout
intparentCredentialsparentCredentials
booleandepthdepth (optional)
intshallowshallow (optional)
booleanthreadsthreads (optional)
intmrTriggerCommentmrTriggerCommentcommentBody
StringonlyTrustedMembersCanTrigger
booleantuleapBranchDiscoverytuleapBranchDiscoverytuleapNotifyPullRequesttuleapNotifyPullRequesttuleapForkPullRequestDiscoverytuleapForkPullRequestDiscoverytuleapPullRequestDiscoverytuleapPullRequestDiscovery$class: 'UserIdentityTrait'$class: 'UserIdentityTrait'extension
namename
If given, "GIT_COMMITTER_NAME=[this]" and "GIT_AUTHOR_NAME=[this]" are set for builds. This overrides whatever is in the global settings.
Stringemailemail
If given, "GIT_COMMITTER_EMAIL=[this]" and "GIT_AUTHOR_EMAIL=[this]" are set for builds. This overrides whatever is in the global settings.
StringbitbucketWebhookConfigurationbitbucketWebhookConfigurationSets the value for committersToIgnore in the Bitbucket Webhook. Value should be a comma separated string.
committerToIgnore is used to prevent triggering Jenkins builds when commits by certain users are made.
committersToIgnore
StringheadWildcardFilterWithPRFromOriginheadWildcardFilterWithPRFromOriginincludes
* as a wildcard; for example: master release*
Stringexcludes
release
StringtagIncludes
* as a wildcard; for example: *-1.* to build only 1.0 tags from the maven release plugin.
StringtagExcludes
*-0.*
String$class: 'WipeWorkspaceTrait'$class: 'WipeWorkspaceTrait'bitbucketBranchDiscoverybitbucketBranchDiscoverystrategyId
intbitbucketForkDiscoverybitbucketForkDiscoverystrategyId
inttrust
One of the great powers of pull requests is that anyone with read access to a repository can fork it, commit some changes to their fork and then create a pull request against the original repository with their changes. There are some files stored in source control that are important. For example, a Jenkinsfile may contain configuration details to sandbox pull requests in order to mitigate against malicious pull requests. In order to protect against a malicious pull request itself modifying the Jenkinsfile to remove the protections, you can define the trust policy for pull requests from forks.
Other plugins can extend the available trust policies. The default policies are:
Jenkinsfile) the contents of that file will be retrieved from the target branch on the origin repository and not from the pull request branch on the fork repository.
jenkins.scm.api.trait.SCMHeadAuthority<? super com.cloudbees.jenkins.plugins.bitbucket.BitbucketSCMSourceRequest, ? extends jenkins.scm.api.mixin.ChangeRequestSCMHead2, ? extends jenkins.scm.api.SCMRevision>bitbucketPullRequestDiscoverybitbucketPullRequestDiscoverystrategyId
intbitbucketSshCheckoutbitbucketSshCheckouthttps:// protocol for the Git repository.
This behaviour allows you to select the SSH private key to be used for checking out sources, which will consequently force the checkout to use the ssh:// protocol.
credentialsId
It must be a SSH key based credential.
StringbitbucketTagDiscoverybitbucketTagDiscoverybitbucketWebhookRegistrationbitbucketWebhookRegistrationOverrides the defaults for webhook management.
Webhooks are used to inform Jenkins about changes to repositories. There are two ways webhooks can be configured:
The Manage Jenkins » Configure Jenkins › Bitbucket Endpoints allows defining the list of servers. Each server can be associated with credentials. If credentials are defined then the default behaviour is to use those credentials to automatically manage the webhooks of all repositories that Jenkins is interested in. If no credentials are defined then the default behaviour is to require the user to manually configure webhooks.
mode
String$class: 'com.cloudogu.scmmanager.scm.BranchDiscoveryTrait'$class: 'com.cloudogu.scmmanager.scm.BranchDiscoveryTrait'$class: 'com.cloudogu.scmmanager.scm.TagDiscoveryTrait'$class: 'com.cloudogu.scmmanager.scm.TagDiscoveryTrait'dagshubBranchDiscoverydagshubBranchDiscovery$class: 'io.jenkins.plugins.dagshubbranchsource.traits.ForkPullRequestDiscoveryTrait'$class: 'io.jenkins.plugins.dagshubbranchsource.traits.ForkPullRequestDiscoveryTrait'buildOnPullHead (optional)
boolean$class: 'io.jenkins.plugins.dagshubbranchsource.traits.OriginPullRequestDiscoveryTrait'$class: 'io.jenkins.plugins.dagshubbranchsource.traits.OriginPullRequestDiscoveryTrait'buildOnPullHead (optional)
booleandagshubTagDiscoverydagshubTagDiscoverygitLabBranchDiscoverygitLabBranchDiscoverystrategyId
int$class: 'io.jenkins.plugins.gitlabbranchsource.SSHCheckoutTrait'$class: 'io.jenkins.plugins.gitlabbranchsource.SSHCheckoutTrait'https:// protocol for the Git repository.
This behaviour allows you to select the SSH private key to be used for checking out sources, which will consequently force the checkout to use the ssh:// protocol.
credentialsId
StringgitLabTagDiscoverygitLabTagDiscoverygitBranchDiscoverygitBranchDiscoverygitTagDiscoverygitTagDiscoveryheadRegexFilterheadRegexFilterregex
StringheadWildcardFilterheadWildcardFilterincludes
* as a wildcard; for example: master release*
Stringexcludes
release alpha-* beta-*
StringheadRegexFilterWithPRheadRegexFilterWithPRregex
StringtagRegex
StringheadWildcardFilterWithPRheadWildcardFilterWithPRincludes
* as a wildcard; for example: master release*
Stringexcludes
release
StringtagIncludes
* as a wildcard; for example: *-1.* to build only 1.0 tags from the maven release plugin.
StringtagExcludes
*-0.*
StringgiteaBranchDiscoverygiteaBranchDiscoverystrategyId
intgiteaForkDiscoverygiteaForkDiscoverystrategyId
inttrust
One of the great powers of pull requests is that anyone with read access to a repository can fork it, commit some changes to their fork and then create a pull request against the original repository with their changes. There are some files stored in source control that are important. For example, a Jenkinsfile may contain configuration details to sandbox pull requests in order to mitigate against malicious pull requests. In order to protect against a malicious pull request itself modifying the Jenkinsfile to remove the protections, you can define the trust policy for pull requests from forks.
Other plugins can extend the available trust policies. The default policies are:
Jenkinsfile) the contents of that file will be retrieved from the target branch on the origin repository and not from the pull request branch on the fork repository.
Nobody.
gitLabTrustMembersgitLabTrustMembersbitbucketTrustTeambitbucketTrustTeambitbucketTrustEveryonebitbucketTrustEveryonebitbucketTrustNobodybitbucketTrustNobodygitLabTrustEveryonegitLabTrustEveryonegitLabTrustNobodygitLabTrustNobodygitLabTrustPermissionsgitLabTrustPermissionsgiteaTrustContributorsgiteaTrustContributorsgiteaTrustEveryonegiteaTrustEveryonegiteaTrustNobodygiteaTrustNobodygitHubTrustContributorsgitHubTrustContributorsgitHubTrustEveryonegitHubTrustEveryonegitHubTrustNobodygitHubTrustNobodygitHubTrustPermissionsgitHubTrustPermissionsgiteaPullRequestDiscoverygiteaPullRequestDiscoverystrategyId
intgiteaSSHCheckoutgiteaSSHCheckouthttps:// protocol for the Git repository.
This behaviour allows you to select the SSH private key to be used for checking out sources, which will consequently force the checkout to use the ssh:// protocol.
credentialsId
StringgiteaTagDiscoverygiteaTagDiscoverygiteaWebhookRegistrationgiteaWebhookRegistrationOverrides the defaults for webhook management.
Webhooks are used to inform Jenkins about changes to repositories. There are two ways webhooks can be configured:
The Manage Jenkins » Configure System › Gitea Server allows defining the list of servers. Each server can be associated with credentials. If credentials are defined then the default behaviour is to use those credentials to automatically manage the webhooks of all repositories that Jenkins is interested in. If no credentials are defined then the default behaviour is to require the user to manually configure webhooks.
mode
StringgitHubBranchDiscoverygitHubBranchDiscoverystrategyId
env.GIT_BRANCH will be set to the branch name rather than PR-#. Also, status notifications for these builds will only be applied to the commit and not to the pull request.
intgitHubForkDiscoverygitHubForkDiscoverystrategyId
inttrust
One of the great powers of pull requests is that anyone with read access to a repository can fork it, commit some changes to their fork and then create a pull request against the original repository with their changes. There are some files stored in source control that are important. For example, a Jenkinsfile may contain configuration details to sandbox pull requests in order to mitigate against malicious pull requests. In order to protect against a malicious pull request itself modifying the Jenkinsfile to remove the protections, you can define the trust policy for pull requests from forks.
Other plugins can extend the available trust policies. The default policies are:
Jenkinsfile) the contents of that file will be retrieved from the target branch on the origin repository and not from the pull request branch on the fork repository.
Nobody. NOTE: all collaborators are trusted, even if they are only members of a team with read permission.
jenkins.scm.api.trait.SCMHeadAuthority<? super org.jenkinsci.plugins.github_branch_source.GitHubSCMSourceRequest, ? extends jenkins.scm.api.mixin.ChangeRequestSCMHead2, ? extends jenkins.scm.api.SCMRevision>gitHubPullRequestDiscoverygitHubPullRequestDiscoverystrategyId
intgitHubSshCheckoutgitHubSshCheckouthttps:// protocol for the Git repository.
This behaviour allows you to select the SSH private key to be used for checking out sources, which will consequently force the checkout to use the ssh:// protocol.
credentialsId
StringgitHubTagDiscoverygitHubTagDiscovery$class: 'GiteaSCMSource'$class: 'GiteaSCMSource'serverUrl
StringrepoOwner
Stringrepository
StringcredentialsId (optional)
Stringid (optional)
Stringtraits (optional)
$class: 'ApprovedPullRequestTrait'$class: 'ApprovedPullRequestTrait'strategyId
int$class: 'AuthorInChangelogTrait'$class: 'AuthorInChangelogTrait'$class: 'BitbucketAgedRefsTrait'$class: 'BitbucketAgedRefsTrait'retentionDays
StringbitbucketBranchCommitSkipTraitbitbucketBranchCommitSkipTraitbitbucketBuildStatusNotificationsbitbucketBuildStatusNotificationssendSuccessNotificationForUnstableBuild (optional)
booleanbitbucketCommitSkipTraitbitbucketCommitSkipTrait$class: 'BitbucketJiraValidatorTrait'$class: 'BitbucketJiraValidatorTrait'jiraServerIdx
intbuildStatusNameCustomPartbuildStatusNameCustomPartbuildStatusNameCustomPart (optional)
String$class: 'ChangeDiscoveryTrait'$class: 'ChangeDiscoveryTrait'queryString
Provide an additional query string to search for open changes. The status:open is implicitly added and does not need to be specified. See Gerrit search operators documentation for a detailed list of the supported search operators.
-is:wipdoes not include work-in-progress changes
is:privateincludes private changes
String$class: 'CheckoutOptionTrait'$class: 'CheckoutOptionTrait'extension
timeouttimeout
int$class: 'CleanAfterCheckoutTrait'$class: 'CleanAfterCheckoutTrait'extension
.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.
deleteUntrackedNestedRepositoriesdeleteUntrackedNestedRepositories (optional)
.git directories.
boolean$class: 'CleanBeforeCheckoutTrait'$class: 'CleanBeforeCheckoutTrait'extension
.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.
deleteUntrackedNestedRepositoriesdeleteUntrackedNestedRepositories (optional)
.git directories.
boolean$class: 'CleanMercurialSCMSourceTrait'$class: 'CleanMercurialSCMSourceTrait'$class: 'CloneOptionTrait'$class: 'CloneOptionTrait'extension
shallowshallow
booleannoTagsnoTags
booleanreferencereference
Stringtimeouttimeout
intdepthdepth (optional)
inthonorRefspechonorRefspec (optional)
boolean$class: 'DisableStatusUpdateTrait'$class: 'DisableStatusUpdateTrait'$class: 'DiscoverOtherRefsTrait'$class: 'DiscoverOtherRefsTrait'ref
The pattern under /refs on the remote repository to discover, can contain a wildcard.
Example: test/*/merged
StringnameMapping (optional)
Mapping for how the ref can be named in for example the @Library.
Example: test-@{1}
Where @{1} replaces the first wildcard in the ref when discovered.
By default it will be "namespace_before_wildcard-@{1}". E.g. if ref is "test/*/merged" the default mapping would be "test-@{1}".
String$class: 'FilterChecksTrait'$class: 'FilterChecksTrait'queryOperator
ID, SCHEMEqueryString
StringgitLabForkDiscoverygitLabForkDiscoverystrategyId
inttrust
One of the great powers of merge requests is that anyone with read access to a project can fork it, commit some changes to their fork and then create a merge request against the original project with their changes. There are some files stored in source control that are important. For example, a Jenkinsfile may contain configuration details to sandbox merge requests in order to mitigate against malicious merge requests. In order to protect against a malicious merge request itself modifying the Jenkinsfile to remove the protections, you can define the trust policy for merge requests from forks.
Other plugins can extend the available trust policies. The default policies are:
Jenkinsfile) the contents of that file will be retrieved from the target branch on the origin project and not from the merge request branch on the fork project.
Nobody.
jenkins.scm.api.trait.SCMHeadAuthority<? super io.jenkins.plugins.gitlabbranchsource.GitLabSCMSourceRequest, ? extends jenkins.scm.api.mixin.ChangeRequestSCMHead2, ? extends jenkins.scm.api.SCMRevision>$class: 'GitBrowserSCMSourceTrait'$class: 'GitBrowserSCMSourceTrait'browser
$class: 'AssemblaWeb'$class: 'AssemblaWeb'repoUrl
String$class: 'BacklogGitRepositoryBrowser'$class: 'BacklogGitRepositoryBrowser'repoName
StringrepoUrl
StringbitbucketServerbitbucketServerrepoUrl
String$class: 'BitbucketWeb'$class: 'BitbucketWeb'repoUrl
String$class: 'CGit'$class: 'CGit'repoUrl
String$class: 'FisheyeGitRepositoryBrowser'$class: 'FisheyeGitRepositoryBrowser'repoUrl
String$class: 'GitBlitRepositoryBrowser'$class: 'GitBlitRepositoryBrowser'repoUrl
StringprojectName
String$class: 'GitBucketBrowser'$class: 'GitBucketBrowser'url
String$class: 'GitLab'$class: 'GitLab'repoUrl
Stringversion (optional)
String$class: 'GitLabBrowser'$class: 'GitLabBrowser'https://gitLab.example.com then the URL for bob's skunkworks project might be https://gitLab.example.com/bob/skunkworks.
projectUrl
https://gitLab.example.com then the URL for bob's skunkworks project might be https://gitLab.example.com/bob/skunkworks
String$class: 'GitList'$class: 'GitList'repoUrl
String$class: 'GitWeb'$class: 'GitWeb'repoUrl
String$class: 'GiteaBrowser'$class: 'GiteaBrowser'repoUrl
https://gitea.example.com then the URL for bob's skunkworks project repository might be https://gitea.example.com/bob/skunkworks
String$class: 'GithubWeb'$class: 'GithubWeb'repoUrl
String$class: 'Gitiles'$class: 'Gitiles'repoUrl
String$class: 'GitoriousWeb'$class: 'GitoriousWeb'repoUrl
String$class: 'GogsGit'$class: 'GogsGit'repoUrl
String$class: 'KilnGit'$class: 'KilnGit'repoUrl
String$class: 'Phabricator'$class: 'Phabricator'repoUrl
Stringrepo
String$class: 'RedmineWeb'$class: 'RedmineWeb'repoUrl
String$class: 'RhodeCode'$class: 'RhodeCode'repoUrl
String$class: 'ScmManagerGitRepositoryBrowser'$class: 'ScmManagerGitRepositoryBrowser'repoUrl
String$class: 'Stash'$class: 'Stash'repoUrl
String$class: 'TFS2013GitRepositoryBrowser'$class: 'TFS2013GitRepositoryBrowser'repoUrl
If TFS is also used as the repository server, this can usually be left blank.
String$class: 'TracGitRepositoryBrowser'$class: 'TracGitRepositoryBrowser'$class: 'TuleapBrowser'$class: 'TuleapBrowser'repositoryUrl
String$class: 'ViewGitWeb'$class: 'ViewGitWeb'repoUrl
StringprojectName
String$class: 'GitHubAgedRefsTrait'$class: 'GitHubAgedRefsTrait'retentionDays
StringgitHubBranchCommitSkipTraitgitHubBranchCommitSkipTraitgitHubCommitSkipTraitgitHubCommitSkipTrait$class: 'GitHubJiraValidatorTrait'$class: 'GitHubJiraValidatorTrait'jiraServerIdx
int$class: 'GitHubSCMSourceChecksTrait'$class: 'GitHubSCMSourceChecksTrait'verboseConsoleLog (optional)
boolean$class: 'GitHubSCMSourceStatusChecksTrait'$class: 'GitHubSCMSourceStatusChecksTrait'name (optional)
Stringskip (optional)
booleanskipNotifications (optional)
booleanskipProgressUpdates (optional)
booleansuppressLogs (optional)
booleanunstableBuildNeutral (optional)
boolean$class: 'GitLFSPullTrait'$class: 'GitLFSPullTrait'gitlabAvatargitlabAvatardisableProjectAvatar (optional)
booleangitlabSkipNotificationsgitlabSkipNotifications$class: 'GitToolSCMSourceTrait'$class: 'GitToolSCMSourceTrait'gitTool
String$class: 'HookRegistrationTrait'$class: 'HookRegistrationTrait'webHookMode
StringsystemHookMode
StringgitHubIgnoreDraftPullRequestFiltergitHubIgnoreDraftPullRequestFilter$class: 'IgnoreOnPushNotificationTrait'$class: 'IgnoreOnPushNotificationTrait'jervisFilterjervisFilterThis will look at the root of a GitHub reference for .jervis.yml for the branches and tags filtering. You can customize the name of the YAML file searched for if you like.
For Tags:
For Branches:
branches:
only:
- master
By default Jervis will generate Jenkins jobs for all branches that have a .jervis.yml file. You can control and limit this behavior by specifying the branches or tags key in your .jervis.yml.
You can either whitelist or blacklist branches that you want to be built:
# blacklist
branches:
except:
- legacy
- experimental
# whitelist
branches:
only:
- master
- stable
The same YAML can be applied to tags.
# blacklist
tags:
except:
- .*-rc
- .*-beta
# whitelist
tags:
only:
- v[.0-9]+
If you specify both only and except, then except will be ignored. .jervis.yml needs to be present on all branches you want to be built. .jervis.yml will be interpreted in the context of that branch so if you specify a whitelist in your master branch it will not propagate to other branches.
You can use regular expressions to whitelist or blacklist branches:
branches:
only:
- master
- /^[.0-9]+-hotfix$/
Any name surrounded with / in the list of branches is treated as a regular expression. The expression will use Pattern.compile to compile the regex string into a Groovy regular expression.
yamlFileName
The filename which will be read from GitHub to determine if a Jenkins branch, tag, or pull request should be built. Provide a comma separated list of paths to YAML files in a repository and it will check each path as a fallback.
For example, set the value to: .jervis.yml, .ci/jervis.yml and this plugin will first check for valid YAML in .jervis.yml. If no YAML exists, then it will fall back to checking .ci/jervis.yml.
String$class: 'LocalBranchTrait'$class: 'LocalBranchTrait'logCommentlogCommentlogSuccess (optional)
booleansudoUser (optional)
String$class: 'MercurialBrowserSCMSourceTrait'$class: 'MercurialBrowserSCMSourceTrait'browser
$class: 'FishEye'$class: 'FishEye'url
String$class: 'GoogleCode'$class: 'GoogleCode'url
String$class: 'HgWeb'$class: 'HgWeb'url
String$class: 'Kallithea'$class: 'Kallithea'url
String$class: 'KilnHG'$class: 'KilnHG'url
String$class: 'RhodeCode'$class: 'RhodeCode'url
String$class: 'RhodeCodeLegacy'$class: 'RhodeCodeLegacy'url
String$class: 'ScmManager'$class: 'ScmManager'url
http://YOURSCMMANAGER/scm/repo/NAMESPACE/NAME/).
String$class: 'MercurialInstallationSCMSourceTrait'$class: 'MercurialInstallationSCMSourceTrait'installation
String$class: 'NotificationContextTrait'$class: 'NotificationContextTrait'contextLabel
StringtypeSuffix
Appends the relevant suffix to the context label based on the build type. '/pr-merge', '/pr-head' or '/branch'
booleannotificationsSkipnotificationsSkipgitLabOriginDiscoverygitLabOriginDiscoverystrategyId
int$class: 'PathBasedPullRequestFilterTrait'$class: 'PathBasedPullRequestFilterTrait'inclusionField
StringexclusionField
String$class: 'PreBuildMergeTrait'$class: 'PreBuildMergeTrait'extension
optionsoptions
mergeTargetmergeTarget
master.
StringfastForwardModefastForwardMode (optional)
FF, FF_ONLY, NO_FFmergeRemotemergeRemote (optional)
origin, that contains the branch you specify below. If left blank, it'll default to the name of the first repository configured above.
StringmergeStrategymergeStrategy (optional)
DEFAULT, RESOLVE, RECURSIVE, OCTOPUS, OURS, SUBTREE, RECURSIVE_THEIRS$class: 'PretestedIntegrationSCMTrait'$class: 'PretestedIntegrationSCMTrait'extension
gitIntegrationStrategygitIntegrationStrategy
accumulatedaccumulatedsquashsquashintegrationBranchintegrationBranch
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>
StringrepoNamerepoName
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
String$class: 'PruneStaleBranchTrait'$class: 'PruneStaleBranchTrait'$class: 'PruneStaleTagTrait'$class: 'PruneStaleTagTrait'bitbucketPublicRepoPullRequestFilterbitbucketPublicRepoPullRequestFilter$class: 'PullRequestDiscoveryTrait'$class: 'PullRequestDiscoveryTrait'excludeBranchesWithPRs
boolean$class: 'PullRequestLabelsBlackListFilterTrait'$class: 'PullRequestLabelsBlackListFilterTrait'labels
String$class: 'PullRequestLabelsMatchAllFilterTrait'$class: 'PullRequestLabelsMatchAllFilterTrait'labels
String$class: 'PullRequestLabelsMatchAnyFilterTrait'$class: 'PullRequestLabelsMatchAnyFilterTrait'labels
String$class: 'PullRequestNameFilterTrait'$class: 'PullRequestNameFilterTrait'strategyId
intphrase
StringignoreCase
booleanregex
boolean$class: 'RefSpecsSCMSourceTrait'$class: 'RefSpecsSCMSourceTrait'templates
valuevalue
@{remote} will be replaced by the remote name (which defaults to origin) before use.
StringheadRegexFilterWithPRFromOriginheadRegexFilterWithPRFromOriginregex
StringtagRegex
String$class: 'RemoteNameSCMSourceTrait'$class: 'RemoteNameSCMSourceTrait'remoteName
StringskipNotificationsskipNotifications$class: 'SparseCheckoutPathsTrait'$class: 'SparseCheckoutPathsTrait'extension
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
sparseCheckoutPathssparseCheckoutPaths
pathpath
String$class: 'SubmoduleOptionTrait'$class: 'SubmoduleOptionTrait'extension
disableSubmodulesdisableSubmodules
booleanrecursiveSubmodulesrecursiveSubmodules
booleantrackingSubmodulestrackingSubmodules
booleanreferencereference
git init --bare git remote add SubProject1 https://gitrepo.com/subproject1 git remote add SubProject2 https://gitrepo.com/subproject2 git fetch --all
Stringtimeouttimeout
intparentCredentialsparentCredentials
booleandepthdepth (optional)
intshallowshallow (optional)
booleanthreadsthreads (optional)
intmrTriggerCommentmrTriggerCommentcommentBody
StringonlyTrustedMembersCanTrigger
booleantuleapBranchDiscoverytuleapBranchDiscoverytuleapNotifyPullRequesttuleapNotifyPullRequesttuleapForkPullRequestDiscoverytuleapForkPullRequestDiscoverytuleapPullRequestDiscoverytuleapPullRequestDiscovery$class: 'UserIdentityTrait'$class: 'UserIdentityTrait'extension
namename
If given, "GIT_COMMITTER_NAME=[this]" and "GIT_AUTHOR_NAME=[this]" are set for builds. This overrides whatever is in the global settings.
Stringemailemail
If given, "GIT_COMMITTER_EMAIL=[this]" and "GIT_AUTHOR_EMAIL=[this]" are set for builds. This overrides whatever is in the global settings.
StringbitbucketWebhookConfigurationbitbucketWebhookConfigurationSets the value for committersToIgnore in the Bitbucket Webhook. Value should be a comma separated string.
committerToIgnore is used to prevent triggering Jenkins builds when commits by certain users are made.
committersToIgnore
StringheadWildcardFilterWithPRFromOriginheadWildcardFilterWithPRFromOriginincludes
* as a wildcard; for example: master release*
Stringexcludes
release
StringtagIncludes
* as a wildcard; for example: *-1.* to build only 1.0 tags from the maven release plugin.
StringtagExcludes
*-0.*
String$class: 'WipeWorkspaceTrait'$class: 'WipeWorkspaceTrait'bitbucketBranchDiscoverybitbucketBranchDiscoverystrategyId
intbitbucketForkDiscoverybitbucketForkDiscoverystrategyId
inttrust
One of the great powers of pull requests is that anyone with read access to a repository can fork it, commit some changes to their fork and then create a pull request against the original repository with their changes. There are some files stored in source control that are important. For example, a Jenkinsfile may contain configuration details to sandbox pull requests in order to mitigate against malicious pull requests. In order to protect against a malicious pull request itself modifying the Jenkinsfile to remove the protections, you can define the trust policy for pull requests from forks.
Other plugins can extend the available trust policies. The default policies are:
Jenkinsfile) the contents of that file will be retrieved from the target branch on the origin repository and not from the pull request branch on the fork repository.
jenkins.scm.api.trait.SCMHeadAuthority<? super com.cloudbees.jenkins.plugins.bitbucket.BitbucketSCMSourceRequest, ? extends jenkins.scm.api.mixin.ChangeRequestSCMHead2, ? extends jenkins.scm.api.SCMRevision>bitbucketPullRequestDiscoverybitbucketPullRequestDiscoverystrategyId
intbitbucketSshCheckoutbitbucketSshCheckouthttps:// protocol for the Git repository.
This behaviour allows you to select the SSH private key to be used for checking out sources, which will consequently force the checkout to use the ssh:// protocol.
credentialsId
It must be a SSH key based credential.
StringbitbucketTagDiscoverybitbucketTagDiscoverybitbucketWebhookRegistrationbitbucketWebhookRegistrationOverrides the defaults for webhook management.
Webhooks are used to inform Jenkins about changes to repositories. There are two ways webhooks can be configured:
The Manage Jenkins » Configure Jenkins › Bitbucket Endpoints allows defining the list of servers. Each server can be associated with credentials. If credentials are defined then the default behaviour is to use those credentials to automatically manage the webhooks of all repositories that Jenkins is interested in. If no credentials are defined then the default behaviour is to require the user to manually configure webhooks.
mode
String$class: 'com.cloudogu.scmmanager.scm.BranchDiscoveryTrait'$class: 'com.cloudogu.scmmanager.scm.BranchDiscoveryTrait'$class: 'com.cloudogu.scmmanager.scm.TagDiscoveryTrait'$class: 'com.cloudogu.scmmanager.scm.TagDiscoveryTrait'dagshubBranchDiscoverydagshubBranchDiscovery$class: 'io.jenkins.plugins.dagshubbranchsource.traits.ForkPullRequestDiscoveryTrait'$class: 'io.jenkins.plugins.dagshubbranchsource.traits.ForkPullRequestDiscoveryTrait'buildOnPullHead (optional)
boolean$class: 'io.jenkins.plugins.dagshubbranchsource.traits.OriginPullRequestDiscoveryTrait'$class: 'io.jenkins.plugins.dagshubbranchsource.traits.OriginPullRequestDiscoveryTrait'buildOnPullHead (optional)
booleandagshubTagDiscoverydagshubTagDiscoverygitLabBranchDiscoverygitLabBranchDiscoverystrategyId
int$class: 'io.jenkins.plugins.gitlabbranchsource.SSHCheckoutTrait'$class: 'io.jenkins.plugins.gitlabbranchsource.SSHCheckoutTrait'https:// protocol for the Git repository.
This behaviour allows you to select the SSH private key to be used for checking out sources, which will consequently force the checkout to use the ssh:// protocol.
credentialsId
StringgitLabTagDiscoverygitLabTagDiscoverygitBranchDiscoverygitBranchDiscoverygitTagDiscoverygitTagDiscoveryheadRegexFilterheadRegexFilterregex
StringheadWildcardFilterheadWildcardFilterincludes
* as a wildcard; for example: master release*
Stringexcludes
release alpha-* beta-*
StringheadRegexFilterWithPRheadRegexFilterWithPRregex
StringtagRegex
StringheadWildcardFilterWithPRheadWildcardFilterWithPRincludes
* as a wildcard; for example: master release*
Stringexcludes
release
StringtagIncludes
* as a wildcard; for example: *-1.* to build only 1.0 tags from the maven release plugin.
StringtagExcludes
*-0.*
StringgiteaBranchDiscoverygiteaBranchDiscoverystrategyId
intgiteaForkDiscoverygiteaForkDiscoverystrategyId
inttrust
One of the great powers of pull requests is that anyone with read access to a repository can fork it, commit some changes to their fork and then create a pull request against the original repository with their changes. There are some files stored in source control that are important. For example, a Jenkinsfile may contain configuration details to sandbox pull requests in order to mitigate against malicious pull requests. In order to protect against a malicious pull request itself modifying the Jenkinsfile to remove the protections, you can define the trust policy for pull requests from forks.
Other plugins can extend the available trust policies. The default policies are:
Jenkinsfile) the contents of that file will be retrieved from the target branch on the origin repository and not from the pull request branch on the fork repository.
Nobody.
gitLabTrustMembersgitLabTrustMembersbitbucketTrustTeambitbucketTrustTeambitbucketTrustEveryonebitbucketTrustEveryonebitbucketTrustNobodybitbucketTrustNobodygitLabTrustEveryonegitLabTrustEveryonegitLabTrustNobodygitLabTrustNobodygitLabTrustPermissionsgitLabTrustPermissionsgiteaTrustContributorsgiteaTrustContributorsgiteaTrustEveryonegiteaTrustEveryonegiteaTrustNobodygiteaTrustNobodygitHubTrustContributorsgitHubTrustContributorsgitHubTrustEveryonegitHubTrustEveryonegitHubTrustNobodygitHubTrustNobodygitHubTrustPermissionsgitHubTrustPermissionsgiteaPullRequestDiscoverygiteaPullRequestDiscoverystrategyId
intgiteaSSHCheckoutgiteaSSHCheckouthttps:// protocol for the Git repository.
This behaviour allows you to select the SSH private key to be used for checking out sources, which will consequently force the checkout to use the ssh:// protocol.
credentialsId
StringgiteaTagDiscoverygiteaTagDiscoverygiteaWebhookRegistrationgiteaWebhookRegistrationOverrides the defaults for webhook management.
Webhooks are used to inform Jenkins about changes to repositories. There are two ways webhooks can be configured:
The Manage Jenkins » Configure System › Gitea Server allows defining the list of servers. Each server can be associated with credentials. If credentials are defined then the default behaviour is to use those credentials to automatically manage the webhooks of all repositories that Jenkins is interested in. If no credentials are defined then the default behaviour is to require the user to manually configure webhooks.
mode
StringgitHubBranchDiscoverygitHubBranchDiscoverystrategyId
env.GIT_BRANCH will be set to the branch name rather than PR-#. Also, status notifications for these builds will only be applied to the commit and not to the pull request.
intgitHubForkDiscoverygitHubForkDiscoverystrategyId
inttrust
One of the great powers of pull requests is that anyone with read access to a repository can fork it, commit some changes to their fork and then create a pull request against the original repository with their changes. There are some files stored in source control that are important. For example, a Jenkinsfile may contain configuration details to sandbox pull requests in order to mitigate against malicious pull requests. In order to protect against a malicious pull request itself modifying the Jenkinsfile to remove the protections, you can define the trust policy for pull requests from forks.
Other plugins can extend the available trust policies. The default policies are:
Jenkinsfile) the contents of that file will be retrieved from the target branch on the origin repository and not from the pull request branch on the fork repository.
Nobody. NOTE: all collaborators are trusted, even if they are only members of a team with read permission.
jenkins.scm.api.trait.SCMHeadAuthority<? super org.jenkinsci.plugins.github_branch_source.GitHubSCMSourceRequest, ? extends jenkins.scm.api.mixin.ChangeRequestSCMHead2, ? extends jenkins.scm.api.SCMRevision>gitHubPullRequestDiscoverygitHubPullRequestDiscoverystrategyId
intgitHubSshCheckoutgitHubSshCheckouthttps:// protocol for the Git repository.
This behaviour allows you to select the SSH private key to be used for checking out sources, which will consequently force the checkout to use the ssh:// protocol.
credentialsId
StringgitHubTagDiscoverygitHubTagDiscoveryglobalLibglobalLibcredential
Stringpath
A Perforce Depot path to the library.
For example: //depot/myLibrary/...
Stringcharset (optional)
Stringexcludes (optional)
Stringfilter (optional)
latestlatestlatestChange
booleanpathFilterpathFilterpath
Changes can be filtered to not trigger a build; if all the files within a change match the specified path, the build is filtered.
For example, with a Filter of " //depot/main/tests ":
Case A (change will be filtered):
Files:
//depot/main/tests/index.xml //depot/main/tests/001/test.xml //depot/main/tests/002/test.xml Case B (change will not be filtered, as build.xml is outside of the filter):
Files:
//depot/main/src/build.xml //depot/main/tests/004/test.xml //depot/main/tests/005/test.xml This is not Perforce syntax. Use of ... and * patterns are not supported. Only paths to directories are supported.
StringviewPatternviewPatternpatternText
Changes can be filtered to not trigger a build; if none of the files within a change match a Java pattern (regular expression) listed, the build is filtered.
For example, with the following regular expressions:
//depot/main/tests.*
//depot/main/src/.*\.cpp
//depot/main/build/.*(?:\.rb|\.py|\.bat|Jenkinsfile)
//depot/main/lib/(?!Lib1|Lib2).*
Case A (change will not be filtered, as these files match our first pattern on "tests"):
Files:
//depot/main/tests/CONTRIUBTING.md //depot/main/tests/001/index.xml Case B (Be careful with incomplete file paths! Change will NOT be filtered,
as this file matches a pattern which was likely intended as describing a "tests/" directory.)
Files:
//depot/main/tests.doc Case C (change will NOT be filtered, as all files match our fourth pattern looking for script files in 'build/'):
Files:
//depot/main/build/rbs/deploy_server.rb //depot/main/build/deploy/deploy.bat //depot/main/build/Jenkinsfile Case D (change will be filtered, as no file matches our second pattern for ".cpp" files under "main/src"):
Files:
//depot/main/src/howto.doc //depot/main/src/oldmain.c //depot/main/src/art/splash.bmp //depot/main/src/bt/funnelcake.php Case E (change will be filtered. Lib1 is included in a negative lookahead, and thus is excluded.)
Files:
//depot/main/lib/Lib1/build.xml StringcaseSensitive
booleanincrementalincrementalperChange
When enabled, only the one, oldest changelist returned by polling is built.
If P4_INCREMENTAL environment variable (or build parameter) is set to "false", polling per change is ignored and all changelists are built.
booleanuserFilteruserFilteruser
Changes can be filtered to not trigger a build; if the owner of a change matches the specified name, the build is filtered.
StringviewFilterviewFilterviewMask
Changes can be filtered to not trigger a build; if none of the files within a change are contained in the view mask, the build is filtered.
For example, with a View Mask Filter of:
//depot/main/tests
-//depot/main/tests/001
Case A (change will not be filtered, as index.xml is in the view mask):
Files:
//depot/main/tests/index.xml //depot/main/tests/001/test.xml Case B (change will not be filtered, as index.xml is in the view mask):
Files:
//depot/main/test/index.xml //depot/main/src/build.xml Case C (change will be filtered, as no file is in the view mask):
Files:
//depot/main/src/build.xml Case D (change will be filtered, as no file is in the view mask):
Files:
//depot/main/src/build.xml //depot/main/tests/001/test.xml Stringformat (optional)
Stringid (optional)
Stringincludes (optional)
Stringpopulate (optional)
autoCleanautoCleanreplace
Perforce will check out and overwrite any depot files which are either missing from workspace, or have been modified locally.
booleandelete
Perforce will delete any local files that are not in the depot.
booleantidy
booleanmodtime
booleanquiet
Enables the -q flag for all applicable Perforce operations. Summary details will still be displayed.
booleanpin
When a build is triggered by Polling, Build Now or an external Action, the workspace will sync only to the specified label. Any other specified change or label will be ignored.
Supports variable expansion e.g. ${VAR}. If 'now' is used, or a variable that expands to 'now', then the latest change is used (within the scope of the workspace view).
Stringparallel
enableenable
booleanpathpath
Stringthreadsthreads
Stringminfilesminfiles
Stringminbytesminbytes
StringpreviewOnlypreviewOnlyquiet
Enables the -q flag for all applicable Perforce operations. Summary details will still be displayed.
booleanpin
StringflushOnlyflushOnlyquiet
booleanpin
When a build is triggered by Polling, Build Now or an external Action, the workspace will flush only to the specified label or changelist number. Any other specified change or label will be ignored.
Supports variable expansion e.g. ${VAR}. If 'now' is used, or a variable that expands to 'now', then the latest change is used (within the scope of the workspace view).
StringforceCleanforceCleanhave
booleanquiet
Enables the -q flag for all applicable Perforce operations. Summary details will still be displayed.
booleanpin
When a build is triggered by Polling, Build Now or an external Action, the workspace will sync only to the specified label. Any other specified change or label will be ignored.
Supports variable expansion e.g. ${VAR}. If 'now' is used, or a variable that expands to 'now', then the latest change is used (within the scope of the workspace view).
Stringparallel
enableenable
booleanpathpath
Stringthreadsthreads
Stringminfilesminfiles
Stringminbytesminbytes
StringgraphCleangraphCleanquiet
Enables the -q flag for all applicable Perforce operations. Summary details will still be displayed.
booleanpin
When a build is triggered by Polling, Build Now or an external Action, the workspace will sync only to the specified label. Any other specified change or label will be ignored.
Supports variable expansion e.g. ${VAR}. If 'now' is used, or a variable that expands to 'now', then the latest change is used (within the scope of the workspace view).
Stringparallel
enableenable
booleanpathpath
Stringthreadsthreads
Stringminfilesminfiles
Stringminbytesminbytes
StringsyncOnlysyncOnlyrevert
booleanhave
booleanforce
booleanmodtime
booleanquiet
Enables the -q flag for all applicable Perforce operations. Summary details will still be displayed.
booleanpin
When a build is triggered by Polling, Build Now or an external Action, the workspace will sync only to the specified label. Any other specified change or label will be ignored.
Supports variable expansion e.g. ${VAR}. If 'now' is used, or a variable that expands to 'now', then the latest change is used (within the scope of the workspace view).
Stringparallel
enableenable
booleanpathpath
Stringthreadsthreads
Stringminfilesminfiles
Stringminbytesminbytes
Stringtraits (optional)
$class: 'ApprovedPullRequestTrait'$class: 'ApprovedPullRequestTrait'strategyId
int$class: 'AuthorInChangelogTrait'$class: 'AuthorInChangelogTrait'$class: 'BitbucketAgedRefsTrait'$class: 'BitbucketAgedRefsTrait'retentionDays
StringbitbucketBranchCommitSkipTraitbitbucketBranchCommitSkipTraitbitbucketBuildStatusNotificationsbitbucketBuildStatusNotificationssendSuccessNotificationForUnstableBuild (optional)
booleanbitbucketCommitSkipTraitbitbucketCommitSkipTrait$class: 'BitbucketJiraValidatorTrait'$class: 'BitbucketJiraValidatorTrait'jiraServerIdx
intbuildStatusNameCustomPartbuildStatusNameCustomPartbuildStatusNameCustomPart (optional)
String$class: 'ChangeDiscoveryTrait'$class: 'ChangeDiscoveryTrait'queryString
Provide an additional query string to search for open changes. The status:open is implicitly added and does not need to be specified. See Gerrit search operators documentation for a detailed list of the supported search operators.
-is:wipdoes not include work-in-progress changes
is:privateincludes private changes
String$class: 'CheckoutOptionTrait'$class: 'CheckoutOptionTrait'extension
timeouttimeout
int$class: 'CleanAfterCheckoutTrait'$class: 'CleanAfterCheckoutTrait'extension
.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.
deleteUntrackedNestedRepositoriesdeleteUntrackedNestedRepositories (optional)
.git directories.
boolean$class: 'CleanBeforeCheckoutTrait'$class: 'CleanBeforeCheckoutTrait'extension
.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.
deleteUntrackedNestedRepositoriesdeleteUntrackedNestedRepositories (optional)
.git directories.
boolean$class: 'CleanMercurialSCMSourceTrait'$class: 'CleanMercurialSCMSourceTrait'$class: 'CloneOptionTrait'$class: 'CloneOptionTrait'extension
shallowshallow
booleannoTagsnoTags
booleanreferencereference
Stringtimeouttimeout
intdepthdepth (optional)
inthonorRefspechonorRefspec (optional)
boolean$class: 'DisableStatusUpdateTrait'$class: 'DisableStatusUpdateTrait'$class: 'DiscoverOtherRefsTrait'$class: 'DiscoverOtherRefsTrait'ref
The pattern under /refs on the remote repository to discover, can contain a wildcard.
Example: test/*/merged
StringnameMapping (optional)
Mapping for how the ref can be named in for example the @Library.
Example: test-@{1}
Where @{1} replaces the first wildcard in the ref when discovered.
By default it will be "namespace_before_wildcard-@{1}". E.g. if ref is "test/*/merged" the default mapping would be "test-@{1}".
String$class: 'FilterChecksTrait'$class: 'FilterChecksTrait'queryOperator
ID, SCHEMEqueryString
StringgitLabForkDiscoverygitLabForkDiscoverystrategyId
inttrust
One of the great powers of merge requests is that anyone with read access to a project can fork it, commit some changes to their fork and then create a merge request against the original project with their changes. There are some files stored in source control that are important. For example, a Jenkinsfile may contain configuration details to sandbox merge requests in order to mitigate against malicious merge requests. In order to protect against a malicious merge request itself modifying the Jenkinsfile to remove the protections, you can define the trust policy for merge requests from forks.
Other plugins can extend the available trust policies. The default policies are:
Jenkinsfile) the contents of that file will be retrieved from the target branch on the origin project and not from the merge request branch on the fork project.
Nobody.
jenkins.scm.api.trait.SCMHeadAuthority<? super io.jenkins.plugins.gitlabbranchsource.GitLabSCMSourceRequest, ? extends jenkins.scm.api.mixin.ChangeRequestSCMHead2, ? extends jenkins.scm.api.SCMRevision>$class: 'GitBrowserSCMSourceTrait'$class: 'GitBrowserSCMSourceTrait'browser
$class: 'AssemblaWeb'$class: 'AssemblaWeb'repoUrl
String$class: 'BacklogGitRepositoryBrowser'$class: 'BacklogGitRepositoryBrowser'repoName
StringrepoUrl
StringbitbucketServerbitbucketServerrepoUrl
String$class: 'BitbucketWeb'$class: 'BitbucketWeb'repoUrl
String$class: 'CGit'$class: 'CGit'repoUrl
String$class: 'FisheyeGitRepositoryBrowser'$class: 'FisheyeGitRepositoryBrowser'repoUrl
String$class: 'GitBlitRepositoryBrowser'$class: 'GitBlitRepositoryBrowser'repoUrl
StringprojectName
String$class: 'GitBucketBrowser'$class: 'GitBucketBrowser'url
String$class: 'GitLab'$class: 'GitLab'repoUrl
Stringversion (optional)
String$class: 'GitLabBrowser'$class: 'GitLabBrowser'https://gitLab.example.com then the URL for bob's skunkworks project might be https://gitLab.example.com/bob/skunkworks.
projectUrl
https://gitLab.example.com then the URL for bob's skunkworks project might be https://gitLab.example.com/bob/skunkworks
String$class: 'GitList'$class: 'GitList'repoUrl
String$class: 'GitWeb'$class: 'GitWeb'repoUrl
String$class: 'GiteaBrowser'$class: 'GiteaBrowser'repoUrl
https://gitea.example.com then the URL for bob's skunkworks project repository might be https://gitea.example.com/bob/skunkworks
String$class: 'GithubWeb'$class: 'GithubWeb'repoUrl
String$class: 'Gitiles'$class: 'Gitiles'repoUrl
String$class: 'GitoriousWeb'$class: 'GitoriousWeb'repoUrl
String$class: 'GogsGit'$class: 'GogsGit'repoUrl
String$class: 'KilnGit'$class: 'KilnGit'repoUrl
String$class: 'Phabricator'$class: 'Phabricator'repoUrl
Stringrepo
String$class: 'RedmineWeb'$class: 'RedmineWeb'repoUrl
String$class: 'RhodeCode'$class: 'RhodeCode'repoUrl
String$class: 'ScmManagerGitRepositoryBrowser'$class: 'ScmManagerGitRepositoryBrowser'repoUrl
String$class: 'Stash'$class: 'Stash'repoUrl
String$class: 'TFS2013GitRepositoryBrowser'$class: 'TFS2013GitRepositoryBrowser'repoUrl
If TFS is also used as the repository server, this can usually be left blank.
String$class: 'TracGitRepositoryBrowser'$class: 'TracGitRepositoryBrowser'$class: 'TuleapBrowser'$class: 'TuleapBrowser'repositoryUrl
String$class: 'ViewGitWeb'$class: 'ViewGitWeb'repoUrl
StringprojectName
String$class: 'GitHubAgedRefsTrait'$class: 'GitHubAgedRefsTrait'retentionDays
StringgitHubBranchCommitSkipTraitgitHubBranchCommitSkipTraitgitHubCommitSkipTraitgitHubCommitSkipTrait$class: 'GitHubJiraValidatorTrait'$class: 'GitHubJiraValidatorTrait'jiraServerIdx
int$class: 'GitHubSCMSourceChecksTrait'$class: 'GitHubSCMSourceChecksTrait'verboseConsoleLog (optional)
boolean$class: 'GitHubSCMSourceStatusChecksTrait'$class: 'GitHubSCMSourceStatusChecksTrait'name (optional)
Stringskip (optional)
booleanskipNotifications (optional)
booleanskipProgressUpdates (optional)
booleansuppressLogs (optional)
booleanunstableBuildNeutral (optional)
boolean$class: 'GitLFSPullTrait'$class: 'GitLFSPullTrait'gitlabAvatargitlabAvatardisableProjectAvatar (optional)
booleangitlabSkipNotificationsgitlabSkipNotifications$class: 'GitToolSCMSourceTrait'$class: 'GitToolSCMSourceTrait'gitTool
String$class: 'HookRegistrationTrait'$class: 'HookRegistrationTrait'webHookMode
StringsystemHookMode
StringgitHubIgnoreDraftPullRequestFiltergitHubIgnoreDraftPullRequestFilter$class: 'IgnoreOnPushNotificationTrait'$class: 'IgnoreOnPushNotificationTrait'jervisFilterjervisFilterThis will look at the root of a GitHub reference for .jervis.yml for the branches and tags filtering. You can customize the name of the YAML file searched for if you like.
For Tags:
For Branches:
branches:
only:
- master
By default Jervis will generate Jenkins jobs for all branches that have a .jervis.yml file. You can control and limit this behavior by specifying the branches or tags key in your .jervis.yml.
You can either whitelist or blacklist branches that you want to be built:
# blacklist
branches:
except:
- legacy
- experimental
# whitelist
branches:
only:
- master
- stable
The same YAML can be applied to tags.
# blacklist
tags:
except:
- .*-rc
- .*-beta
# whitelist
tags:
only:
- v[.0-9]+
If you specify both only and except, then except will be ignored. .jervis.yml needs to be present on all branches you want to be built. .jervis.yml will be interpreted in the context of that branch so if you specify a whitelist in your master branch it will not propagate to other branches.
You can use regular expressions to whitelist or blacklist branches:
branches:
only:
- master
- /^[.0-9]+-hotfix$/
Any name surrounded with / in the list of branches is treated as a regular expression. The expression will use Pattern.compile to compile the regex string into a Groovy regular expression.
yamlFileName
The filename which will be read from GitHub to determine if a Jenkins branch, tag, or pull request should be built. Provide a comma separated list of paths to YAML files in a repository and it will check each path as a fallback.
For example, set the value to: .jervis.yml, .ci/jervis.yml and this plugin will first check for valid YAML in .jervis.yml. If no YAML exists, then it will fall back to checking .ci/jervis.yml.
String$class: 'LocalBranchTrait'$class: 'LocalBranchTrait'logCommentlogCommentlogSuccess (optional)
booleansudoUser (optional)
String$class: 'MercurialBrowserSCMSourceTrait'$class: 'MercurialBrowserSCMSourceTrait'browser
$class: 'FishEye'$class: 'FishEye'url
String$class: 'GoogleCode'$class: 'GoogleCode'url
String$class: 'HgWeb'$class: 'HgWeb'url
String$class: 'Kallithea'$class: 'Kallithea'url
String$class: 'KilnHG'$class: 'KilnHG'url
String$class: 'RhodeCode'$class: 'RhodeCode'url
String$class: 'RhodeCodeLegacy'$class: 'RhodeCodeLegacy'url
String$class: 'ScmManager'$class: 'ScmManager'url
http://YOURSCMMANAGER/scm/repo/NAMESPACE/NAME/).
String$class: 'MercurialInstallationSCMSourceTrait'$class: 'MercurialInstallationSCMSourceTrait'installation
String$class: 'NotificationContextTrait'$class: 'NotificationContextTrait'contextLabel
StringtypeSuffix
Appends the relevant suffix to the context label based on the build type. '/pr-merge', '/pr-head' or '/branch'
booleannotificationsSkipnotificationsSkipgitLabOriginDiscoverygitLabOriginDiscoverystrategyId
int$class: 'PathBasedPullRequestFilterTrait'$class: 'PathBasedPullRequestFilterTrait'inclusionField
StringexclusionField
String$class: 'PreBuildMergeTrait'$class: 'PreBuildMergeTrait'extension
optionsoptions
mergeTargetmergeTarget
master.
StringfastForwardModefastForwardMode (optional)
FF, FF_ONLY, NO_FFmergeRemotemergeRemote (optional)
origin, that contains the branch you specify below. If left blank, it'll default to the name of the first repository configured above.
StringmergeStrategymergeStrategy (optional)
DEFAULT, RESOLVE, RECURSIVE, OCTOPUS, OURS, SUBTREE, RECURSIVE_THEIRS$class: 'PretestedIntegrationSCMTrait'$class: 'PretestedIntegrationSCMTrait'extension
gitIntegrationStrategygitIntegrationStrategy
accumulatedaccumulatedsquashsquashintegrationBranchintegrationBranch
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>
StringrepoNamerepoName
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
String$class: 'PruneStaleBranchTrait'$class: 'PruneStaleBranchTrait'$class: 'PruneStaleTagTrait'$class: 'PruneStaleTagTrait'bitbucketPublicRepoPullRequestFilterbitbucketPublicRepoPullRequestFilter$class: 'PullRequestDiscoveryTrait'$class: 'PullRequestDiscoveryTrait'excludeBranchesWithPRs
boolean$class: 'PullRequestLabelsBlackListFilterTrait'$class: 'PullRequestLabelsBlackListFilterTrait'labels
String$class: 'PullRequestLabelsMatchAllFilterTrait'$class: 'PullRequestLabelsMatchAllFilterTrait'labels
String$class: 'PullRequestLabelsMatchAnyFilterTrait'$class: 'PullRequestLabelsMatchAnyFilterTrait'labels
String$class: 'PullRequestNameFilterTrait'$class: 'PullRequestNameFilterTrait'strategyId
intphrase
StringignoreCase
booleanregex
boolean$class: 'RefSpecsSCMSourceTrait'$class: 'RefSpecsSCMSourceTrait'templates
valuevalue
@{remote} will be replaced by the remote name (which defaults to origin) before use.
StringheadRegexFilterWithPRFromOriginheadRegexFilterWithPRFromOriginregex
StringtagRegex
String$class: 'RemoteNameSCMSourceTrait'$class: 'RemoteNameSCMSourceTrait'remoteName
StringskipNotificationsskipNotifications$class: 'SparseCheckoutPathsTrait'$class: 'SparseCheckoutPathsTrait'extension
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
sparseCheckoutPathssparseCheckoutPaths
pathpath
String$class: 'SubmoduleOptionTrait'$class: 'SubmoduleOptionTrait'extension
disableSubmodulesdisableSubmodules
booleanrecursiveSubmodulesrecursiveSubmodules
booleantrackingSubmodulestrackingSubmodules
booleanreferencereference
git init --bare git remote add SubProject1 https://gitrepo.com/subproject1 git remote add SubProject2 https://gitrepo.com/subproject2 git fetch --all
Stringtimeouttimeout
intparentCredentialsparentCredentials
booleandepthdepth (optional)
intshallowshallow (optional)
booleanthreadsthreads (optional)
intmrTriggerCommentmrTriggerCommentcommentBody
StringonlyTrustedMembersCanTrigger
booleantuleapBranchDiscoverytuleapBranchDiscoverytuleapNotifyPullRequesttuleapNotifyPullRequesttuleapForkPullRequestDiscoverytuleapForkPullRequestDiscoverytuleapPullRequestDiscoverytuleapPullRequestDiscovery$class: 'UserIdentityTrait'$class: 'UserIdentityTrait'extension
namename
If given, "GIT_COMMITTER_NAME=[this]" and "GIT_AUTHOR_NAME=[this]" are set for builds. This overrides whatever is in the global settings.
Stringemailemail
If given, "GIT_COMMITTER_EMAIL=[this]" and "GIT_AUTHOR_EMAIL=[this]" are set for builds. This overrides whatever is in the global settings.
StringbitbucketWebhookConfigurationbitbucketWebhookConfigurationSets the value for committersToIgnore in the Bitbucket Webhook. Value should be a comma separated string.
committerToIgnore is used to prevent triggering Jenkins builds when commits by certain users are made.
committersToIgnore
StringheadWildcardFilterWithPRFromOriginheadWildcardFilterWithPRFromOriginincludes
* as a wildcard; for example: master release*
Stringexcludes
release
StringtagIncludes
* as a wildcard; for example: *-1.* to build only 1.0 tags from the maven release plugin.
StringtagExcludes
*-0.*
String$class: 'WipeWorkspaceTrait'$class: 'WipeWorkspaceTrait'bitbucketBranchDiscoverybitbucketBranchDiscoverystrategyId
intbitbucketForkDiscoverybitbucketForkDiscoverystrategyId
inttrust
One of the great powers of pull requests is that anyone with read access to a repository can fork it, commit some changes to their fork and then create a pull request against the original repository with their changes. There are some files stored in source control that are important. For example, a Jenkinsfile may contain configuration details to sandbox pull requests in order to mitigate against malicious pull requests. In order to protect against a malicious pull request itself modifying the Jenkinsfile to remove the protections, you can define the trust policy for pull requests from forks.
Other plugins can extend the available trust policies. The default policies are:
Jenkinsfile) the contents of that file will be retrieved from the target branch on the origin repository and not from the pull request branch on the fork repository.
jenkins.scm.api.trait.SCMHeadAuthority<? super com.cloudbees.jenkins.plugins.bitbucket.BitbucketSCMSourceRequest, ? extends jenkins.scm.api.mixin.ChangeRequestSCMHead2, ? extends jenkins.scm.api.SCMRevision>bitbucketPullRequestDiscoverybitbucketPullRequestDiscoverystrategyId
intbitbucketSshCheckoutbitbucketSshCheckouthttps:// protocol for the Git repository.
This behaviour allows you to select the SSH private key to be used for checking out sources, which will consequently force the checkout to use the ssh:// protocol.
credentialsId
It must be a SSH key based credential.
StringbitbucketTagDiscoverybitbucketTagDiscoverybitbucketWebhookRegistrationbitbucketWebhookRegistrationOverrides the defaults for webhook management.
Webhooks are used to inform Jenkins about changes to repositories. There are two ways webhooks can be configured:
The Manage Jenkins » Configure Jenkins › Bitbucket Endpoints allows defining the list of servers. Each server can be associated with credentials. If credentials are defined then the default behaviour is to use those credentials to automatically manage the webhooks of all repositories that Jenkins is interested in. If no credentials are defined then the default behaviour is to require the user to manually configure webhooks.
mode
String$class: 'com.cloudogu.scmmanager.scm.BranchDiscoveryTrait'$class: 'com.cloudogu.scmmanager.scm.BranchDiscoveryTrait'$class: 'com.cloudogu.scmmanager.scm.TagDiscoveryTrait'$class: 'com.cloudogu.scmmanager.scm.TagDiscoveryTrait'dagshubBranchDiscoverydagshubBranchDiscovery$class: 'io.jenkins.plugins.dagshubbranchsource.traits.ForkPullRequestDiscoveryTrait'$class: 'io.jenkins.plugins.dagshubbranchsource.traits.ForkPullRequestDiscoveryTrait'buildOnPullHead (optional)
boolean$class: 'io.jenkins.plugins.dagshubbranchsource.traits.OriginPullRequestDiscoveryTrait'$class: 'io.jenkins.plugins.dagshubbranchsource.traits.OriginPullRequestDiscoveryTrait'buildOnPullHead (optional)
booleandagshubTagDiscoverydagshubTagDiscoverygitLabBranchDiscoverygitLabBranchDiscoverystrategyId
int$class: 'io.jenkins.plugins.gitlabbranchsource.SSHCheckoutTrait'$class: 'io.jenkins.plugins.gitlabbranchsource.SSHCheckoutTrait'https:// protocol for the Git repository.
This behaviour allows you to select the SSH private key to be used for checking out sources, which will consequently force the checkout to use the ssh:// protocol.
credentialsId
StringgitLabTagDiscoverygitLabTagDiscoverygitBranchDiscoverygitBranchDiscoverygitTagDiscoverygitTagDiscoveryheadRegexFilterheadRegexFilterregex
StringheadWildcardFilterheadWildcardFilterincludes
* as a wildcard; for example: master release*
Stringexcludes
release alpha-* beta-*
StringheadRegexFilterWithPRheadRegexFilterWithPRregex
StringtagRegex
StringheadWildcardFilterWithPRheadWildcardFilterWithPRincludes
* as a wildcard; for example: master release*
Stringexcludes
release
StringtagIncludes
* as a wildcard; for example: *-1.* to build only 1.0 tags from the maven release plugin.
StringtagExcludes
*-0.*
StringgiteaBranchDiscoverygiteaBranchDiscoverystrategyId
intgiteaForkDiscoverygiteaForkDiscoverystrategyId
inttrust
One of the great powers of pull requests is that anyone with read access to a repository can fork it, commit some changes to their fork and then create a pull request against the original repository with their changes. There are some files stored in source control that are important. For example, a Jenkinsfile may contain configuration details to sandbox pull requests in order to mitigate against malicious pull requests. In order to protect against a malicious pull request itself modifying the Jenkinsfile to remove the protections, you can define the trust policy for pull requests from forks.
Other plugins can extend the available trust policies. The default policies are:
Jenkinsfile) the contents of that file will be retrieved from the target branch on the origin repository and not from the pull request branch on the fork repository.
Nobody.
gitLabTrustMembersgitLabTrustMembersbitbucketTrustTeambitbucketTrustTeambitbucketTrustEveryonebitbucketTrustEveryonebitbucketTrustNobodybitbucketTrustNobodygitLabTrustEveryonegitLabTrustEveryonegitLabTrustNobodygitLabTrustNobodygitLabTrustPermissionsgitLabTrustPermissionsgiteaTrustContributorsgiteaTrustContributorsgiteaTrustEveryonegiteaTrustEveryonegiteaTrustNobodygiteaTrustNobodygitHubTrustContributorsgitHubTrustContributorsgitHubTrustEveryonegitHubTrustEveryonegitHubTrustNobodygitHubTrustNobodygitHubTrustPermissionsgitHubTrustPermissionsgiteaPullRequestDiscoverygiteaPullRequestDiscoverystrategyId
intgiteaSSHCheckoutgiteaSSHCheckouthttps:// protocol for the Git repository.
This behaviour allows you to select the SSH private key to be used for checking out sources, which will consequently force the checkout to use the ssh:// protocol.
credentialsId
StringgiteaTagDiscoverygiteaTagDiscoverygiteaWebhookRegistrationgiteaWebhookRegistrationOverrides the defaults for webhook management.
Webhooks are used to inform Jenkins about changes to repositories. There are two ways webhooks can be configured:
The Manage Jenkins » Configure System › Gitea Server allows defining the list of servers. Each server can be associated with credentials. If credentials are defined then the default behaviour is to use those credentials to automatically manage the webhooks of all repositories that Jenkins is interested in. If no credentials are defined then the default behaviour is to require the user to manually configure webhooks.
mode
StringgitHubBranchDiscoverygitHubBranchDiscoverystrategyId
env.GIT_BRANCH will be set to the branch name rather than PR-#. Also, status notifications for these builds will only be applied to the commit and not to the pull request.
intgitHubForkDiscoverygitHubForkDiscoverystrategyId
inttrust
One of the great powers of pull requests is that anyone with read access to a repository can fork it, commit some changes to their fork and then create a pull request against the original repository with their changes. There are some files stored in source control that are important. For example, a Jenkinsfile may contain configuration details to sandbox pull requests in order to mitigate against malicious pull requests. In order to protect against a malicious pull request itself modifying the Jenkinsfile to remove the protections, you can define the trust policy for pull requests from forks.
Other plugins can extend the available trust policies. The default policies are:
Jenkinsfile) the contents of that file will be retrieved from the target branch on the origin repository and not from the pull request branch on the fork repository.
Nobody. NOTE: all collaborators are trusted, even if they are only members of a team with read permission.
jenkins.scm.api.trait.SCMHeadAuthority<? super org.jenkinsci.plugins.github_branch_source.GitHubSCMSourceRequest, ? extends jenkins.scm.api.mixin.ChangeRequestSCMHead2, ? extends jenkins.scm.api.SCMRevision>gitHubPullRequestDiscoverygitHubPullRequestDiscoverystrategyId
intgitHubSshCheckoutgitHubSshCheckouthttps:// protocol for the Git repository.
This behaviour allows you to select the SSH private key to be used for checking out sources, which will consequently force the checkout to use the ssh:// protocol.
credentialsId
StringgitHubTagDiscoverygitHubTagDiscoverymultiGraphmultiGraphcredential
Stringincludes (optional)
A List of Perforce Graph repos (separated by new lines). The plugin will recursively search for a Jenkinsfile (or defined item) using the last directory name for the multi-branch name.
For example: //graph/...
Stringcharset (optional)
Stringformat (optional)
Stringbrowser (optional)
fishEyefishEyeurl
StringrootModule
StringopenGrokopenGrokurl
StringdepotPath
StringprojectName
Stringp4Webp4Weburl
Stringswarmswarmurl
Stringexcludes (optional)
Stringfilter (optional)
latestlatestlatestChange
booleanpathFilterpathFilterpath
Changes can be filtered to not trigger a build; if all the files within a change match the specified path, the build is filtered.
For example, with a Filter of " //depot/main/tests ":
Case A (change will be filtered):
Files:
//depot/main/tests/index.xml //depot/main/tests/001/test.xml //depot/main/tests/002/test.xml Case B (change will not be filtered, as build.xml is outside of the filter):
Files:
//depot/main/src/build.xml //depot/main/tests/004/test.xml //depot/main/tests/005/test.xml This is not Perforce syntax. Use of ... and * patterns are not supported. Only paths to directories are supported.
StringviewPatternviewPatternpatternText
Changes can be filtered to not trigger a build; if none of the files within a change match a Java pattern (regular expression) listed, the build is filtered.
For example, with the following regular expressions:
//depot/main/tests.*
//depot/main/src/.*\.cpp
//depot/main/build/.*(?:\.rb|\.py|\.bat|Jenkinsfile)
//depot/main/lib/(?!Lib1|Lib2).*
Case A (change will not be filtered, as these files match our first pattern on "tests"):
Files:
//depot/main/tests/CONTRIUBTING.md //depot/main/tests/001/index.xml Case B (Be careful with incomplete file paths! Change will NOT be filtered,
as this file matches a pattern which was likely intended as describing a "tests/" directory.)
Files:
//depot/main/tests.doc Case C (change will NOT be filtered, as all files match our fourth pattern looking for script files in 'build/'):
Files:
//depot/main/build/rbs/deploy_server.rb //depot/main/build/deploy/deploy.bat //depot/main/build/Jenkinsfile Case D (change will be filtered, as no file matches our second pattern for ".cpp" files under "main/src"):
Files:
//depot/main/src/howto.doc //depot/main/src/oldmain.c //depot/main/src/art/splash.bmp //depot/main/src/bt/funnelcake.php Case E (change will be filtered. Lib1 is included in a negative lookahead, and thus is excluded.)
Files:
//depot/main/lib/Lib1/build.xml StringcaseSensitive
booleanincrementalincrementalperChange
When enabled, only the one, oldest changelist returned by polling is built.
If P4_INCREMENTAL environment variable (or build parameter) is set to "false", polling per change is ignored and all changelists are built.
booleanuserFilteruserFilteruser
Changes can be filtered to not trigger a build; if the owner of a change matches the specified name, the build is filtered.
StringviewFilterviewFilterviewMask
Changes can be filtered to not trigger a build; if none of the files within a change are contained in the view mask, the build is filtered.
For example, with a View Mask Filter of:
//depot/main/tests
-//depot/main/tests/001
Case A (change will not be filtered, as index.xml is in the view mask):
Files:
//depot/main/tests/index.xml //depot/main/tests/001/test.xml Case B (change will not be filtered, as index.xml is in the view mask):
Files:
//depot/main/test/index.xml //depot/main/src/build.xml Case C (change will be filtered, as no file is in the view mask):
Files:
//depot/main/src/build.xml Case D (change will be filtered, as no file is in the view mask):
Files:
//depot/main/src/build.xml //depot/main/tests/001/test.xml Stringid (optional)
Stringpopulate (optional)
autoCleanautoCleanreplace
Perforce will check out and overwrite any depot files which are either missing from workspace, or have been modified locally.
booleandelete
Perforce will delete any local files that are not in the depot.
booleantidy
booleanmodtime
booleanquiet
Enables the -q flag for all applicable Perforce operations. Summary details will still be displayed.
booleanpin
When a build is triggered by Polling, Build Now or an external Action, the workspace will sync only to the specified label. Any other specified change or label will be ignored.
Supports variable expansion e.g. ${VAR}. If 'now' is used, or a variable that expands to 'now', then the latest change is used (within the scope of the workspace view).
Stringparallel
enableenable
booleanpathpath
Stringthreadsthreads
Stringminfilesminfiles
Stringminbytesminbytes
StringpreviewOnlypreviewOnlyquiet
Enables the -q flag for all applicable Perforce operations. Summary details will still be displayed.
booleanpin
StringflushOnlyflushOnlyquiet
booleanpin
When a build is triggered by Polling, Build Now or an external Action, the workspace will flush only to the specified label or changelist number. Any other specified change or label will be ignored.
Supports variable expansion e.g. ${VAR}. If 'now' is used, or a variable that expands to 'now', then the latest change is used (within the scope of the workspace view).
StringforceCleanforceCleanhave
booleanquiet
Enables the -q flag for all applicable Perforce operations. Summary details will still be displayed.
booleanpin
When a build is triggered by Polling, Build Now or an external Action, the workspace will sync only to the specified label. Any other specified change or label will be ignored.
Supports variable expansion e.g. ${VAR}. If 'now' is used, or a variable that expands to 'now', then the latest change is used (within the scope of the workspace view).
Stringparallel
enableenable
booleanpathpath
Stringthreadsthreads
Stringminfilesminfiles
Stringminbytesminbytes
StringgraphCleangraphCleanquiet
Enables the -q flag for all applicable Perforce operations. Summary details will still be displayed.
booleanpin
When a build is triggered by Polling, Build Now or an external Action, the workspace will sync only to the specified label. Any other specified change or label will be ignored.
Supports variable expansion e.g. ${VAR}. If 'now' is used, or a variable that expands to 'now', then the latest change is used (within the scope of the workspace view).
Stringparallel
enableenable
booleanpathpath
Stringthreadsthreads
Stringminfilesminfiles
Stringminbytesminbytes
StringsyncOnlysyncOnlyrevert
booleanhave
booleanforce
booleanmodtime
booleanquiet
Enables the -q flag for all applicable Perforce operations. Summary details will still be displayed.
booleanpin
When a build is triggered by Polling, Build Now or an external Action, the workspace will sync only to the specified label. Any other specified change or label will be ignored.
Supports variable expansion e.g. ${VAR}. If 'now' is used, or a variable that expands to 'now', then the latest change is used (within the scope of the workspace view).
Stringparallel
enableenable
booleanpathpath
Stringthreadsthreads
Stringminfilesminfiles
Stringminbytesminbytes
Stringtraits (optional)
$class: 'ApprovedPullRequestTrait'$class: 'ApprovedPullRequestTrait'strategyId
int$class: 'AuthorInChangelogTrait'$class: 'AuthorInChangelogTrait'$class: 'BitbucketAgedRefsTrait'$class: 'BitbucketAgedRefsTrait'retentionDays
StringbitbucketBranchCommitSkipTraitbitbucketBranchCommitSkipTraitbitbucketBuildStatusNotificationsbitbucketBuildStatusNotificationssendSuccessNotificationForUnstableBuild (optional)
booleanbitbucketCommitSkipTraitbitbucketCommitSkipTrait$class: 'BitbucketJiraValidatorTrait'$class: 'BitbucketJiraValidatorTrait'jiraServerIdx
intbuildStatusNameCustomPartbuildStatusNameCustomPartbuildStatusNameCustomPart (optional)
String$class: 'ChangeDiscoveryTrait'$class: 'ChangeDiscoveryTrait'queryString
Provide an additional query string to search for open changes. The status:open is implicitly added and does not need to be specified. See Gerrit search operators documentation for a detailed list of the supported search operators.
-is:wipdoes not include work-in-progress changes
is:privateincludes private changes
String$class: 'CheckoutOptionTrait'$class: 'CheckoutOptionTrait'extension
timeouttimeout
int$class: 'CleanAfterCheckoutTrait'$class: 'CleanAfterCheckoutTrait'extension
.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.
deleteUntrackedNestedRepositoriesdeleteUntrackedNestedRepositories (optional)
.git directories.
boolean$class: 'CleanBeforeCheckoutTrait'$class: 'CleanBeforeCheckoutTrait'extension
.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.
deleteUntrackedNestedRepositoriesdeleteUntrackedNestedRepositories (optional)
.git directories.
boolean$class: 'CleanMercurialSCMSourceTrait'$class: 'CleanMercurialSCMSourceTrait'$class: 'CloneOptionTrait'$class: 'CloneOptionTrait'extension
shallowshallow
booleannoTagsnoTags
booleanreferencereference
Stringtimeouttimeout
intdepthdepth (optional)
inthonorRefspechonorRefspec (optional)
boolean$class: 'DisableStatusUpdateTrait'$class: 'DisableStatusUpdateTrait'$class: 'DiscoverOtherRefsTrait'$class: 'DiscoverOtherRefsTrait'ref
The pattern under /refs on the remote repository to discover, can contain a wildcard.
Example: test/*/merged
StringnameMapping (optional)
Mapping for how the ref can be named in for example the @Library.
Example: test-@{1}
Where @{1} replaces the first wildcard in the ref when discovered.
By default it will be "namespace_before_wildcard-@{1}". E.g. if ref is "test/*/merged" the default mapping would be "test-@{1}".
String$class: 'FilterChecksTrait'$class: 'FilterChecksTrait'queryOperator
ID, SCHEMEqueryString
StringgitLabForkDiscoverygitLabForkDiscoverystrategyId
inttrust
One of the great powers of merge requests is that anyone with read access to a project can fork it, commit some changes to their fork and then create a merge request against the original project with their changes. There are some files stored in source control that are important. For example, a Jenkinsfile may contain configuration details to sandbox merge requests in order to mitigate against malicious merge requests. In order to protect against a malicious merge request itself modifying the Jenkinsfile to remove the protections, you can define the trust policy for merge requests from forks.
Other plugins can extend the available trust policies. The default policies are:
Jenkinsfile) the contents of that file will be retrieved from the target branch on the origin project and not from the merge request branch on the fork project.
Nobody.
jenkins.scm.api.trait.SCMHeadAuthority<? super io.jenkins.plugins.gitlabbranchsource.GitLabSCMSourceRequest, ? extends jenkins.scm.api.mixin.ChangeRequestSCMHead2, ? extends jenkins.scm.api.SCMRevision>$class: 'GitBrowserSCMSourceTrait'$class: 'GitBrowserSCMSourceTrait'browser
$class: 'AssemblaWeb'$class: 'AssemblaWeb'repoUrl
String$class: 'BacklogGitRepositoryBrowser'$class: 'BacklogGitRepositoryBrowser'repoName
StringrepoUrl
StringbitbucketServerbitbucketServerrepoUrl
String$class: 'BitbucketWeb'$class: 'BitbucketWeb'repoUrl
String$class: 'CGit'$class: 'CGit'repoUrl
String$class: 'FisheyeGitRepositoryBrowser'$class: 'FisheyeGitRepositoryBrowser'repoUrl
String$class: 'GitBlitRepositoryBrowser'$class: 'GitBlitRepositoryBrowser'repoUrl
StringprojectName
String$class: 'GitBucketBrowser'$class: 'GitBucketBrowser'url
String$class: 'GitLab'$class: 'GitLab'repoUrl
Stringversion (optional)
String$class: 'GitLabBrowser'$class: 'GitLabBrowser'https://gitLab.example.com then the URL for bob's skunkworks project might be https://gitLab.example.com/bob/skunkworks.
projectUrl
https://gitLab.example.com then the URL for bob's skunkworks project might be https://gitLab.example.com/bob/skunkworks
String$class: 'GitList'$class: 'GitList'repoUrl
String$class: 'GitWeb'$class: 'GitWeb'repoUrl
String$class: 'GiteaBrowser'$class: 'GiteaBrowser'repoUrl
https://gitea.example.com then the URL for bob's skunkworks project repository might be https://gitea.example.com/bob/skunkworks
String$class: 'GithubWeb'$class: 'GithubWeb'repoUrl
String$class: 'Gitiles'$class: 'Gitiles'repoUrl
String$class: 'GitoriousWeb'$class: 'GitoriousWeb'repoUrl
String$class: 'GogsGit'$class: 'GogsGit'repoUrl
String$class: 'KilnGit'$class: 'KilnGit'repoUrl
String$class: 'Phabricator'$class: 'Phabricator'repoUrl
Stringrepo
String$class: 'RedmineWeb'$class: 'RedmineWeb'repoUrl
String$class: 'RhodeCode'$class: 'RhodeCode'repoUrl
String$class: 'ScmManagerGitRepositoryBrowser'$class: 'ScmManagerGitRepositoryBrowser'repoUrl
String$class: 'Stash'$class: 'Stash'repoUrl
String$class: 'TFS2013GitRepositoryBrowser'$class: 'TFS2013GitRepositoryBrowser'repoUrl
If TFS is also used as the repository server, this can usually be left blank.
String$class: 'TracGitRepositoryBrowser'$class: 'TracGitRepositoryBrowser'$class: 'TuleapBrowser'$class: 'TuleapBrowser'repositoryUrl
String$class: 'ViewGitWeb'$class: 'ViewGitWeb'repoUrl
StringprojectName
String$class: 'GitHubAgedRefsTrait'$class: 'GitHubAgedRefsTrait'retentionDays
StringgitHubBranchCommitSkipTraitgitHubBranchCommitSkipTraitgitHubCommitSkipTraitgitHubCommitSkipTrait$class: 'GitHubJiraValidatorTrait'$class: 'GitHubJiraValidatorTrait'jiraServerIdx
int$class: 'GitHubSCMSourceChecksTrait'$class: 'GitHubSCMSourceChecksTrait'verboseConsoleLog (optional)
boolean$class: 'GitHubSCMSourceStatusChecksTrait'$class: 'GitHubSCMSourceStatusChecksTrait'name (optional)
Stringskip (optional)
booleanskipNotifications (optional)
booleanskipProgressUpdates (optional)
booleansuppressLogs (optional)
booleanunstableBuildNeutral (optional)
boolean$class: 'GitLFSPullTrait'$class: 'GitLFSPullTrait'gitlabAvatargitlabAvatardisableProjectAvatar (optional)
booleangitlabSkipNotificationsgitlabSkipNotifications$class: 'GitToolSCMSourceTrait'$class: 'GitToolSCMSourceTrait'gitTool
String$class: 'HookRegistrationTrait'$class: 'HookRegistrationTrait'webHookMode
StringsystemHookMode
StringgitHubIgnoreDraftPullRequestFiltergitHubIgnoreDraftPullRequestFilter$class: 'IgnoreOnPushNotificationTrait'$class: 'IgnoreOnPushNotificationTrait'jervisFilterjervisFilterThis will look at the root of a GitHub reference for .jervis.yml for the branches and tags filtering. You can customize the name of the YAML file searched for if you like.
For Tags:
For Branches:
branches:
only:
- master
By default Jervis will generate Jenkins jobs for all branches that have a .jervis.yml file. You can control and limit this behavior by specifying the branches or tags key in your .jervis.yml.
You can either whitelist or blacklist branches that you want to be built:
# blacklist
branches:
except:
- legacy
- experimental
# whitelist
branches:
only:
- master
- stable
The same YAML can be applied to tags.
# blacklist
tags:
except:
- .*-rc
- .*-beta
# whitelist
tags:
only:
- v[.0-9]+
If you specify both only and except, then except will be ignored. .jervis.yml needs to be present on all branches you want to be built. .jervis.yml will be interpreted in the context of that branch so if you specify a whitelist in your master branch it will not propagate to other branches.
You can use regular expressions to whitelist or blacklist branches:
branches:
only:
- master
- /^[.0-9]+-hotfix$/
Any name surrounded with / in the list of branches is treated as a regular expression. The expression will use Pattern.compile to compile the regex string into a Groovy regular expression.
yamlFileName
The filename which will be read from GitHub to determine if a Jenkins branch, tag, or pull request should be built. Provide a comma separated list of paths to YAML files in a repository and it will check each path as a fallback.
For example, set the value to: .jervis.yml, .ci/jervis.yml and this plugin will first check for valid YAML in .jervis.yml. If no YAML exists, then it will fall back to checking .ci/jervis.yml.
String$class: 'LocalBranchTrait'$class: 'LocalBranchTrait'logCommentlogCommentlogSuccess (optional)
booleansudoUser (optional)
String$class: 'MercurialBrowserSCMSourceTrait'$class: 'MercurialBrowserSCMSourceTrait'browser
$class: 'FishEye'$class: 'FishEye'url
String$class: 'GoogleCode'$class: 'GoogleCode'url
String$class: 'HgWeb'$class: 'HgWeb'url
String$class: 'Kallithea'$class: 'Kallithea'url
String$class: 'KilnHG'$class: 'KilnHG'url
String$class: 'RhodeCode'$class: 'RhodeCode'url
String$class: 'RhodeCodeLegacy'$class: 'RhodeCodeLegacy'url
String$class: 'ScmManager'$class: 'ScmManager'url
http://YOURSCMMANAGER/scm/repo/NAMESPACE/NAME/).
String$class: 'MercurialInstallationSCMSourceTrait'$class: 'MercurialInstallationSCMSourceTrait'installation
String$class: 'NotificationContextTrait'$class: 'NotificationContextTrait'contextLabel
StringtypeSuffix
Appends the relevant suffix to the context label based on the build type. '/pr-merge', '/pr-head' or '/branch'
booleannotificationsSkipnotificationsSkipgitLabOriginDiscoverygitLabOriginDiscoverystrategyId
int$class: 'PathBasedPullRequestFilterTrait'$class: 'PathBasedPullRequestFilterTrait'inclusionField
StringexclusionField
String$class: 'PreBuildMergeTrait'$class: 'PreBuildMergeTrait'extension
optionsoptions
mergeTargetmergeTarget
master.
StringfastForwardModefastForwardMode (optional)
FF, FF_ONLY, NO_FFmergeRemotemergeRemote (optional)
origin, that contains the branch you specify below. If left blank, it'll default to the name of the first repository configured above.
StringmergeStrategymergeStrategy (optional)
DEFAULT, RESOLVE, RECURSIVE, OCTOPUS, OURS, SUBTREE, RECURSIVE_THEIRS$class: 'PretestedIntegrationSCMTrait'$class: 'PretestedIntegrationSCMTrait'extension
gitIntegrationStrategygitIntegrationStrategy
accumulatedaccumulatedsquashsquashintegrationBranchintegrationBranch
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>
StringrepoNamerepoName
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
String$class: 'PruneStaleBranchTrait'$class: 'PruneStaleBranchTrait'$class: 'PruneStaleTagTrait'$class: 'PruneStaleTagTrait'bitbucketPublicRepoPullRequestFilterbitbucketPublicRepoPullRequestFilter$class: 'PullRequestDiscoveryTrait'$class: 'PullRequestDiscoveryTrait'excludeBranchesWithPRs
boolean$class: 'PullRequestLabelsBlackListFilterTrait'$class: 'PullRequestLabelsBlackListFilterTrait'labels
String$class: 'PullRequestLabelsMatchAllFilterTrait'$class: 'PullRequestLabelsMatchAllFilterTrait'labels
String$class: 'PullRequestLabelsMatchAnyFilterTrait'$class: 'PullRequestLabelsMatchAnyFilterTrait'labels
String$class: 'PullRequestNameFilterTrait'$class: 'PullRequestNameFilterTrait'strategyId
intphrase
StringignoreCase
booleanregex
boolean$class: 'RefSpecsSCMSourceTrait'$class: 'RefSpecsSCMSourceTrait'templates
valuevalue
@{remote} will be replaced by the remote name (which defaults to origin) before use.
StringheadRegexFilterWithPRFromOriginheadRegexFilterWithPRFromOriginregex
StringtagRegex
String$class: 'RemoteNameSCMSourceTrait'$class: 'RemoteNameSCMSourceTrait'remoteName
StringskipNotificationsskipNotifications$class: 'SparseCheckoutPathsTrait'$class: 'SparseCheckoutPathsTrait'extension
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
sparseCheckoutPathssparseCheckoutPaths
pathpath
String$class: 'SubmoduleOptionTrait'$class: 'SubmoduleOptionTrait'extension
disableSubmodulesdisableSubmodules
booleanrecursiveSubmodulesrecursiveSubmodules
booleantrackingSubmodulestrackingSubmodules
booleanreferencereference
git init --bare git remote add SubProject1 https://gitrepo.com/subproject1 git remote add SubProject2 https://gitrepo.com/subproject2 git fetch --all
Stringtimeouttimeout
intparentCredentialsparentCredentials
booleandepthdepth (optional)
intshallowshallow (optional)
booleanthreadsthreads (optional)
intmrTriggerCommentmrTriggerCommentcommentBody
StringonlyTrustedMembersCanTrigger
booleantuleapBranchDiscoverytuleapBranchDiscoverytuleapNotifyPullRequesttuleapNotifyPullRequesttuleapForkPullRequestDiscoverytuleapForkPullRequestDiscoverytuleapPullRequestDiscoverytuleapPullRequestDiscovery$class: 'UserIdentityTrait'$class: 'UserIdentityTrait'extension
namename
If given, "GIT_COMMITTER_NAME=[this]" and "GIT_AUTHOR_NAME=[this]" are set for builds. This overrides whatever is in the global settings.
Stringemailemail
If given, "GIT_COMMITTER_EMAIL=[this]" and "GIT_AUTHOR_EMAIL=[this]" are set for builds. This overrides whatever is in the global settings.
StringbitbucketWebhookConfigurationbitbucketWebhookConfigurationSets the value for committersToIgnore in the Bitbucket Webhook. Value should be a comma separated string.
committerToIgnore is used to prevent triggering Jenkins builds when commits by certain users are made.
committersToIgnore
StringheadWildcardFilterWithPRFromOriginheadWildcardFilterWithPRFromOriginincludes
* as a wildcard; for example: master release*
Stringexcludes
release
StringtagIncludes
* as a wildcard; for example: *-1.* to build only 1.0 tags from the maven release plugin.
StringtagExcludes
*-0.*
String$class: 'WipeWorkspaceTrait'$class: 'WipeWorkspaceTrait'bitbucketBranchDiscoverybitbucketBranchDiscoverystrategyId
intbitbucketForkDiscoverybitbucketForkDiscoverystrategyId
inttrust
One of the great powers of pull requests is that anyone with read access to a repository can fork it, commit some changes to their fork and then create a pull request against the original repository with their changes. There are some files stored in source control that are important. For example, a Jenkinsfile may contain configuration details to sandbox pull requests in order to mitigate against malicious pull requests. In order to protect against a malicious pull request itself modifying the Jenkinsfile to remove the protections, you can define the trust policy for pull requests from forks.
Other plugins can extend the available trust policies. The default policies are:
Jenkinsfile) the contents of that file will be retrieved from the target branch on the origin repository and not from the pull request branch on the fork repository.
jenkins.scm.api.trait.SCMHeadAuthority<? super com.cloudbees.jenkins.plugins.bitbucket.BitbucketSCMSourceRequest, ? extends jenkins.scm.api.mixin.ChangeRequestSCMHead2, ? extends jenkins.scm.api.SCMRevision>bitbucketPullRequestDiscoverybitbucketPullRequestDiscoverystrategyId
intbitbucketSshCheckoutbitbucketSshCheckouthttps:// protocol for the Git repository.
This behaviour allows you to select the SSH private key to be used for checking out sources, which will consequently force the checkout to use the ssh:// protocol.
credentialsId
It must be a SSH key based credential.
StringbitbucketTagDiscoverybitbucketTagDiscoverybitbucketWebhookRegistrationbitbucketWebhookRegistrationOverrides the defaults for webhook management.
Webhooks are used to inform Jenkins about changes to repositories. There are two ways webhooks can be configured:
The Manage Jenkins » Configure Jenkins › Bitbucket Endpoints allows defining the list of servers. Each server can be associated with credentials. If credentials are defined then the default behaviour is to use those credentials to automatically manage the webhooks of all repositories that Jenkins is interested in. If no credentials are defined then the default behaviour is to require the user to manually configure webhooks.
mode
String$class: 'com.cloudogu.scmmanager.scm.BranchDiscoveryTrait'$class: 'com.cloudogu.scmmanager.scm.BranchDiscoveryTrait'$class: 'com.cloudogu.scmmanager.scm.TagDiscoveryTrait'$class: 'com.cloudogu.scmmanager.scm.TagDiscoveryTrait'dagshubBranchDiscoverydagshubBranchDiscovery$class: 'io.jenkins.plugins.dagshubbranchsource.traits.ForkPullRequestDiscoveryTrait'$class: 'io.jenkins.plugins.dagshubbranchsource.traits.ForkPullRequestDiscoveryTrait'buildOnPullHead (optional)
boolean$class: 'io.jenkins.plugins.dagshubbranchsource.traits.OriginPullRequestDiscoveryTrait'$class: 'io.jenkins.plugins.dagshubbranchsource.traits.OriginPullRequestDiscoveryTrait'buildOnPullHead (optional)
booleandagshubTagDiscoverydagshubTagDiscoverygitLabBranchDiscoverygitLabBranchDiscoverystrategyId
int$class: 'io.jenkins.plugins.gitlabbranchsource.SSHCheckoutTrait'$class: 'io.jenkins.plugins.gitlabbranchsource.SSHCheckoutTrait'https:// protocol for the Git repository.
This behaviour allows you to select the SSH private key to be used for checking out sources, which will consequently force the checkout to use the ssh:// protocol.
credentialsId
StringgitLabTagDiscoverygitLabTagDiscoverygitBranchDiscoverygitBranchDiscoverygitTagDiscoverygitTagDiscoveryheadRegexFilterheadRegexFilterregex
StringheadWildcardFilterheadWildcardFilterincludes
* as a wildcard; for example: master release*
Stringexcludes
release alpha-* beta-*
StringheadRegexFilterWithPRheadRegexFilterWithPRregex
StringtagRegex
StringheadWildcardFilterWithPRheadWildcardFilterWithPRincludes
* as a wildcard; for example: master release*
Stringexcludes
release
StringtagIncludes
* as a wildcard; for example: *-1.* to build only 1.0 tags from the maven release plugin.
StringtagExcludes
*-0.*
StringgiteaBranchDiscoverygiteaBranchDiscoverystrategyId
intgiteaForkDiscoverygiteaForkDiscoverystrategyId
inttrust
One of the great powers of pull requests is that anyone with read access to a repository can fork it, commit some changes to their fork and then create a pull request against the original repository with their changes. There are some files stored in source control that are important. For example, a Jenkinsfile may contain configuration details to sandbox pull requests in order to mitigate against malicious pull requests. In order to protect against a malicious pull request itself modifying the Jenkinsfile to remove the protections, you can define the trust policy for pull requests from forks.
Other plugins can extend the available trust policies. The default policies are:
Jenkinsfile) the contents of that file will be retrieved from the target branch on the origin repository and not from the pull request branch on the fork repository.
Nobody.
gitLabTrustMembersgitLabTrustMembersbitbucketTrustTeambitbucketTrustTeambitbucketTrustEveryonebitbucketTrustEveryonebitbucketTrustNobodybitbucketTrustNobodygitLabTrustEveryonegitLabTrustEveryonegitLabTrustNobodygitLabTrustNobodygitLabTrustPermissionsgitLabTrustPermissionsgiteaTrustContributorsgiteaTrustContributorsgiteaTrustEveryonegiteaTrustEveryonegiteaTrustNobodygiteaTrustNobodygitHubTrustContributorsgitHubTrustContributorsgitHubTrustEveryonegitHubTrustEveryonegitHubTrustNobodygitHubTrustNobodygitHubTrustPermissionsgitHubTrustPermissionsgiteaPullRequestDiscoverygiteaPullRequestDiscoverystrategyId
intgiteaSSHCheckoutgiteaSSHCheckouthttps:// protocol for the Git repository.
This behaviour allows you to select the SSH private key to be used for checking out sources, which will consequently force the checkout to use the ssh:// protocol.
credentialsId
StringgiteaTagDiscoverygiteaTagDiscoverygiteaWebhookRegistrationgiteaWebhookRegistrationOverrides the defaults for webhook management.
Webhooks are used to inform Jenkins about changes to repositories. There are two ways webhooks can be configured:
The Manage Jenkins » Configure System › Gitea Server allows defining the list of servers. Each server can be associated with credentials. If credentials are defined then the default behaviour is to use those credentials to automatically manage the webhooks of all repositories that Jenkins is interested in. If no credentials are defined then the default behaviour is to require the user to manually configure webhooks.
mode
StringgitHubBranchDiscoverygitHubBranchDiscoverystrategyId
env.GIT_BRANCH will be set to the branch name rather than PR-#. Also, status notifications for these builds will only be applied to the commit and not to the pull request.
intgitHubForkDiscoverygitHubForkDiscoverystrategyId
inttrust
One of the great powers of pull requests is that anyone with read access to a repository can fork it, commit some changes to their fork and then create a pull request against the original repository with their changes. There are some files stored in source control that are important. For example, a Jenkinsfile may contain configuration details to sandbox pull requests in order to mitigate against malicious pull requests. In order to protect against a malicious pull request itself modifying the Jenkinsfile to remove the protections, you can define the trust policy for pull requests from forks.
Other plugins can extend the available trust policies. The default policies are:
Jenkinsfile) the contents of that file will be retrieved from the target branch on the origin repository and not from the pull request branch on the fork repository.
Nobody. NOTE: all collaborators are trusted, even if they are only members of a team with read permission.
jenkins.scm.api.trait.SCMHeadAuthority<? super org.jenkinsci.plugins.github_branch_source.GitHubSCMSourceRequest, ? extends jenkins.scm.api.mixin.ChangeRequestSCMHead2, ? extends jenkins.scm.api.SCMRevision>gitHubPullRequestDiscoverygitHubPullRequestDiscoverystrategyId
intgitHubSshCheckoutgitHubSshCheckouthttps:// protocol for the Git repository.
This behaviour allows you to select the SSH private key to be used for checking out sources, which will consequently force the checkout to use the ssh:// protocol.
credentialsId
StringgitHubTagDiscoverygitHubTagDiscovery$class: 'MercurialSCMSource'$class: 'MercurialSCMSource'source
StringcredentialsId (optional)
Stringid (optional)
Stringtraits (optional)
$class: 'ApprovedPullRequestTrait'$class: 'ApprovedPullRequestTrait'strategyId
int$class: 'AuthorInChangelogTrait'$class: 'AuthorInChangelogTrait'$class: 'BitbucketAgedRefsTrait'$class: 'BitbucketAgedRefsTrait'retentionDays
StringbitbucketBranchCommitSkipTraitbitbucketBranchCommitSkipTraitbitbucketBuildStatusNotificationsbitbucketBuildStatusNotificationssendSuccessNotificationForUnstableBuild (optional)
booleanbitbucketCommitSkipTraitbitbucketCommitSkipTrait$class: 'BitbucketJiraValidatorTrait'$class: 'BitbucketJiraValidatorTrait'jiraServerIdx
intbuildStatusNameCustomPartbuildStatusNameCustomPartbuildStatusNameCustomPart (optional)
String$class: 'ChangeDiscoveryTrait'$class: 'ChangeDiscoveryTrait'queryString
Provide an additional query string to search for open changes. The status:open is implicitly added and does not need to be specified. See Gerrit search operators documentation for a detailed list of the supported search operators.
-is:wipdoes not include work-in-progress changes
is:privateincludes private changes
String$class: 'CheckoutOptionTrait'$class: 'CheckoutOptionTrait'extension
timeouttimeout
int$class: 'CleanAfterCheckoutTrait'$class: 'CleanAfterCheckoutTrait'extension
.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.
deleteUntrackedNestedRepositoriesdeleteUntrackedNestedRepositories (optional)
.git directories.
boolean$class: 'CleanBeforeCheckoutTrait'$class: 'CleanBeforeCheckoutTrait'extension
.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.
deleteUntrackedNestedRepositoriesdeleteUntrackedNestedRepositories (optional)
.git directories.
boolean$class: 'CleanMercurialSCMSourceTrait'$class: 'CleanMercurialSCMSourceTrait'$class: 'CloneOptionTrait'$class: 'CloneOptionTrait'extension
shallowshallow
booleannoTagsnoTags
booleanreferencereference
Stringtimeouttimeout
intdepthdepth (optional)
inthonorRefspechonorRefspec (optional)
boolean$class: 'DisableStatusUpdateTrait'$class: 'DisableStatusUpdateTrait'$class: 'DiscoverOtherRefsTrait'$class: 'DiscoverOtherRefsTrait'ref
The pattern under /refs on the remote repository to discover, can contain a wildcard.
Example: test/*/merged
StringnameMapping (optional)
Mapping for how the ref can be named in for example the @Library.
Example: test-@{1}
Where @{1} replaces the first wildcard in the ref when discovered.
By default it will be "namespace_before_wildcard-@{1}". E.g. if ref is "test/*/merged" the default mapping would be "test-@{1}".
String$class: 'FilterChecksTrait'$class: 'FilterChecksTrait'queryOperator
ID, SCHEMEqueryString
StringgitLabForkDiscoverygitLabForkDiscoverystrategyId
inttrust
One of the great powers of merge requests is that anyone with read access to a project can fork it, commit some changes to their fork and then create a merge request against the original project with their changes. There are some files stored in source control that are important. For example, a Jenkinsfile may contain configuration details to sandbox merge requests in order to mitigate against malicious merge requests. In order to protect against a malicious merge request itself modifying the Jenkinsfile to remove the protections, you can define the trust policy for merge requests from forks.
Other plugins can extend the available trust policies. The default policies are:
Jenkinsfile) the contents of that file will be retrieved from the target branch on the origin project and not from the merge request branch on the fork project.
Nobody.
jenkins.scm.api.trait.SCMHeadAuthority<? super io.jenkins.plugins.gitlabbranchsource.GitLabSCMSourceRequest, ? extends jenkins.scm.api.mixin.ChangeRequestSCMHead2, ? extends jenkins.scm.api.SCMRevision>$class: 'GitBrowserSCMSourceTrait'$class: 'GitBrowserSCMSourceTrait'browser
$class: 'AssemblaWeb'$class: 'AssemblaWeb'repoUrl
String$class: 'BacklogGitRepositoryBrowser'$class: 'BacklogGitRepositoryBrowser'repoName
StringrepoUrl
StringbitbucketServerbitbucketServerrepoUrl
String$class: 'BitbucketWeb'$class: 'BitbucketWeb'repoUrl
String$class: 'CGit'$class: 'CGit'repoUrl
String$class: 'FisheyeGitRepositoryBrowser'$class: 'FisheyeGitRepositoryBrowser'repoUrl
String$class: 'GitBlitRepositoryBrowser'$class: 'GitBlitRepositoryBrowser'repoUrl
StringprojectName
String$class: 'GitBucketBrowser'$class: 'GitBucketBrowser'url
String$class: 'GitLab'$class: 'GitLab'repoUrl
Stringversion (optional)
String$class: 'GitLabBrowser'$class: 'GitLabBrowser'https://gitLab.example.com then the URL for bob's skunkworks project might be https://gitLab.example.com/bob/skunkworks.
projectUrl
https://gitLab.example.com then the URL for bob's skunkworks project might be https://gitLab.example.com/bob/skunkworks
String$class: 'GitList'$class: 'GitList'repoUrl
String$class: 'GitWeb'$class: 'GitWeb'repoUrl
String$class: 'GiteaBrowser'$class: 'GiteaBrowser'repoUrl
https://gitea.example.com then the URL for bob's skunkworks project repository might be https://gitea.example.com/bob/skunkworks
String$class: 'GithubWeb'$class: 'GithubWeb'repoUrl
String$class: 'Gitiles'$class: 'Gitiles'repoUrl
String$class: 'GitoriousWeb'$class: 'GitoriousWeb'repoUrl
String$class: 'GogsGit'$class: 'GogsGit'repoUrl
String$class: 'KilnGit'$class: 'KilnGit'repoUrl
String$class: 'Phabricator'$class: 'Phabricator'repoUrl
Stringrepo
String$class: 'RedmineWeb'$class: 'RedmineWeb'repoUrl
String$class: 'RhodeCode'$class: 'RhodeCode'repoUrl
String$class: 'ScmManagerGitRepositoryBrowser'$class: 'ScmManagerGitRepositoryBrowser'repoUrl
String$class: 'Stash'$class: 'Stash'repoUrl
String$class: 'TFS2013GitRepositoryBrowser'$class: 'TFS2013GitRepositoryBrowser'repoUrl
If TFS is also used as the repository server, this can usually be left blank.
String$class: 'TracGitRepositoryBrowser'$class: 'TracGitRepositoryBrowser'$class: 'TuleapBrowser'$class: 'TuleapBrowser'repositoryUrl
String$class: 'ViewGitWeb'$class: 'ViewGitWeb'repoUrl
StringprojectName
String$class: 'GitHubAgedRefsTrait'$class: 'GitHubAgedRefsTrait'retentionDays
StringgitHubBranchCommitSkipTraitgitHubBranchCommitSkipTraitgitHubCommitSkipTraitgitHubCommitSkipTrait$class: 'GitHubJiraValidatorTrait'$class: 'GitHubJiraValidatorTrait'jiraServerIdx
int$class: 'GitHubSCMSourceChecksTrait'$class: 'GitHubSCMSourceChecksTrait'verboseConsoleLog (optional)
boolean$class: 'GitHubSCMSourceStatusChecksTrait'$class: 'GitHubSCMSourceStatusChecksTrait'name (optional)
Stringskip (optional)
booleanskipNotifications (optional)
booleanskipProgressUpdates (optional)
booleansuppressLogs (optional)
booleanunstableBuildNeutral (optional)
boolean$class: 'GitLFSPullTrait'$class: 'GitLFSPullTrait'gitlabAvatargitlabAvatardisableProjectAvatar (optional)
booleangitlabSkipNotificationsgitlabSkipNotifications$class: 'GitToolSCMSourceTrait'$class: 'GitToolSCMSourceTrait'gitTool
String$class: 'HookRegistrationTrait'$class: 'HookRegistrationTrait'webHookMode
StringsystemHookMode
StringgitHubIgnoreDraftPullRequestFiltergitHubIgnoreDraftPullRequestFilter$class: 'IgnoreOnPushNotificationTrait'$class: 'IgnoreOnPushNotificationTrait'jervisFilterjervisFilterThis will look at the root of a GitHub reference for .jervis.yml for the branches and tags filtering. You can customize the name of the YAML file searched for if you like.
For Tags:
For Branches:
branches:
only:
- master
By default Jervis will generate Jenkins jobs for all branches that have a .jervis.yml file. You can control and limit this behavior by specifying the branches or tags key in your .jervis.yml.
You can either whitelist or blacklist branches that you want to be built:
# blacklist
branches:
except:
- legacy
- experimental
# whitelist
branches:
only:
- master
- stable
The same YAML can be applied to tags.
# blacklist
tags:
except:
- .*-rc
- .*-beta
# whitelist
tags:
only:
- v[.0-9]+
If you specify both only and except, then except will be ignored. .jervis.yml needs to be present on all branches you want to be built. .jervis.yml will be interpreted in the context of that branch so if you specify a whitelist in your master branch it will not propagate to other branches.
You can use regular expressions to whitelist or blacklist branches:
branches:
only:
- master
- /^[.0-9]+-hotfix$/
Any name surrounded with / in the list of branches is treated as a regular expression. The expression will use Pattern.compile to compile the regex string into a Groovy regular expression.
yamlFileName
The filename which will be read from GitHub to determine if a Jenkins branch, tag, or pull request should be built. Provide a comma separated list of paths to YAML files in a repository and it will check each path as a fallback.
For example, set the value to: .jervis.yml, .ci/jervis.yml and this plugin will first check for valid YAML in .jervis.yml. If no YAML exists, then it will fall back to checking .ci/jervis.yml.
String$class: 'LocalBranchTrait'$class: 'LocalBranchTrait'logCommentlogCommentlogSuccess (optional)
booleansudoUser (optional)
String$class: 'MercurialBrowserSCMSourceTrait'$class: 'MercurialBrowserSCMSourceTrait'browser
$class: 'FishEye'$class: 'FishEye'url
String$class: 'GoogleCode'$class: 'GoogleCode'url
String$class: 'HgWeb'$class: 'HgWeb'url
String$class: 'Kallithea'$class: 'Kallithea'url
String$class: 'KilnHG'$class: 'KilnHG'url
String$class: 'RhodeCode'$class: 'RhodeCode'url
String$class: 'RhodeCodeLegacy'$class: 'RhodeCodeLegacy'url
String$class: 'ScmManager'$class: 'ScmManager'url
http://YOURSCMMANAGER/scm/repo/NAMESPACE/NAME/).
String$class: 'MercurialInstallationSCMSourceTrait'$class: 'MercurialInstallationSCMSourceTrait'installation
String$class: 'NotificationContextTrait'$class: 'NotificationContextTrait'contextLabel
StringtypeSuffix
Appends the relevant suffix to the context label based on the build type. '/pr-merge', '/pr-head' or '/branch'
booleannotificationsSkipnotificationsSkipgitLabOriginDiscoverygitLabOriginDiscoverystrategyId
int$class: 'PathBasedPullRequestFilterTrait'$class: 'PathBasedPullRequestFilterTrait'inclusionField
StringexclusionField
String$class: 'PreBuildMergeTrait'$class: 'PreBuildMergeTrait'extension
optionsoptions
mergeTargetmergeTarget
master.
StringfastForwardModefastForwardMode (optional)
FF, FF_ONLY, NO_FFmergeRemotemergeRemote (optional)
origin, that contains the branch you specify below. If left blank, it'll default to the name of the first repository configured above.
StringmergeStrategymergeStrategy (optional)
DEFAULT, RESOLVE, RECURSIVE, OCTOPUS, OURS, SUBTREE, RECURSIVE_THEIRS$class: 'PretestedIntegrationSCMTrait'$class: 'PretestedIntegrationSCMTrait'extension
gitIntegrationStrategygitIntegrationStrategy
accumulatedaccumulatedsquashsquashintegrationBranchintegrationBranch
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>
StringrepoNamerepoName
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
String$class: 'PruneStaleBranchTrait'$class: 'PruneStaleBranchTrait'$class: 'PruneStaleTagTrait'$class: 'PruneStaleTagTrait'bitbucketPublicRepoPullRequestFilterbitbucketPublicRepoPullRequestFilter$class: 'PullRequestDiscoveryTrait'$class: 'PullRequestDiscoveryTrait'excludeBranchesWithPRs
boolean$class: 'PullRequestLabelsBlackListFilterTrait'$class: 'PullRequestLabelsBlackListFilterTrait'labels
String$class: 'PullRequestLabelsMatchAllFilterTrait'$class: 'PullRequestLabelsMatchAllFilterTrait'labels
String$class: 'PullRequestLabelsMatchAnyFilterTrait'$class: 'PullRequestLabelsMatchAnyFilterTrait'labels
String$class: 'PullRequestNameFilterTrait'$class: 'PullRequestNameFilterTrait'strategyId
intphrase
StringignoreCase
booleanregex
boolean$class: 'RefSpecsSCMSourceTrait'$class: 'RefSpecsSCMSourceTrait'templates
valuevalue
@{remote} will be replaced by the remote name (which defaults to origin) before use.
StringheadRegexFilterWithPRFromOriginheadRegexFilterWithPRFromOriginregex
StringtagRegex
String$class: 'RemoteNameSCMSourceTrait'$class: 'RemoteNameSCMSourceTrait'remoteName
StringskipNotificationsskipNotifications$class: 'SparseCheckoutPathsTrait'$class: 'SparseCheckoutPathsTrait'extension
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
sparseCheckoutPathssparseCheckoutPaths
pathpath
String$class: 'SubmoduleOptionTrait'$class: 'SubmoduleOptionTrait'extension
disableSubmodulesdisableSubmodules
booleanrecursiveSubmodulesrecursiveSubmodules
booleantrackingSubmodulestrackingSubmodules
booleanreferencereference
git init --bare git remote add SubProject1 https://gitrepo.com/subproject1 git remote add SubProject2 https://gitrepo.com/subproject2 git fetch --all
Stringtimeouttimeout
intparentCredentialsparentCredentials
booleandepthdepth (optional)
intshallowshallow (optional)
booleanthreadsthreads (optional)
intmrTriggerCommentmrTriggerCommentcommentBody
StringonlyTrustedMembersCanTrigger
booleantuleapBranchDiscoverytuleapBranchDiscoverytuleapNotifyPullRequesttuleapNotifyPullRequesttuleapForkPullRequestDiscoverytuleapForkPullRequestDiscoverytuleapPullRequestDiscoverytuleapPullRequestDiscovery$class: 'UserIdentityTrait'$class: 'UserIdentityTrait'extension
namename
If given, "GIT_COMMITTER_NAME=[this]" and "GIT_AUTHOR_NAME=[this]" are set for builds. This overrides whatever is in the global settings.
Stringemailemail
If given, "GIT_COMMITTER_EMAIL=[this]" and "GIT_AUTHOR_EMAIL=[this]" are set for builds. This overrides whatever is in the global settings.
StringbitbucketWebhookConfigurationbitbucketWebhookConfigurationSets the value for committersToIgnore in the Bitbucket Webhook. Value should be a comma separated string.
committerToIgnore is used to prevent triggering Jenkins builds when commits by certain users are made.
committersToIgnore
StringheadWildcardFilterWithPRFromOriginheadWildcardFilterWithPRFromOriginincludes
* as a wildcard; for example: master release*
Stringexcludes
release
StringtagIncludes
* as a wildcard; for example: *-1.* to build only 1.0 tags from the maven release plugin.
StringtagExcludes
*-0.*
String$class: 'WipeWorkspaceTrait'$class: 'WipeWorkspaceTrait'bitbucketBranchDiscoverybitbucketBranchDiscoverystrategyId
intbitbucketForkDiscoverybitbucketForkDiscoverystrategyId
inttrust
One of the great powers of pull requests is that anyone with read access to a repository can fork it, commit some changes to their fork and then create a pull request against the original repository with their changes. There are some files stored in source control that are important. For example, a Jenkinsfile may contain configuration details to sandbox pull requests in order to mitigate against malicious pull requests. In order to protect against a malicious pull request itself modifying the Jenkinsfile to remove the protections, you can define the trust policy for pull requests from forks.
Other plugins can extend the available trust policies. The default policies are:
Jenkinsfile) the contents of that file will be retrieved from the target branch on the origin repository and not from the pull request branch on the fork repository.
jenkins.scm.api.trait.SCMHeadAuthority<? super com.cloudbees.jenkins.plugins.bitbucket.BitbucketSCMSourceRequest, ? extends jenkins.scm.api.mixin.ChangeRequestSCMHead2, ? extends jenkins.scm.api.SCMRevision>bitbucketPullRequestDiscoverybitbucketPullRequestDiscoverystrategyId
intbitbucketSshCheckoutbitbucketSshCheckouthttps:// protocol for the Git repository.
This behaviour allows you to select the SSH private key to be used for checking out sources, which will consequently force the checkout to use the ssh:// protocol.
credentialsId
It must be a SSH key based credential.
StringbitbucketTagDiscoverybitbucketTagDiscoverybitbucketWebhookRegistrationbitbucketWebhookRegistrationOverrides the defaults for webhook management.
Webhooks are used to inform Jenkins about changes to repositories. There are two ways webhooks can be configured:
The Manage Jenkins » Configure Jenkins › Bitbucket Endpoints allows defining the list of servers. Each server can be associated with credentials. If credentials are defined then the default behaviour is to use those credentials to automatically manage the webhooks of all repositories that Jenkins is interested in. If no credentials are defined then the default behaviour is to require the user to manually configure webhooks.
mode
String$class: 'com.cloudogu.scmmanager.scm.BranchDiscoveryTrait'$class: 'com.cloudogu.scmmanager.scm.BranchDiscoveryTrait'$class: 'com.cloudogu.scmmanager.scm.TagDiscoveryTrait'$class: 'com.cloudogu.scmmanager.scm.TagDiscoveryTrait'dagshubBranchDiscoverydagshubBranchDiscovery$class: 'io.jenkins.plugins.dagshubbranchsource.traits.ForkPullRequestDiscoveryTrait'$class: 'io.jenkins.plugins.dagshubbranchsource.traits.ForkPullRequestDiscoveryTrait'buildOnPullHead (optional)
boolean$class: 'io.jenkins.plugins.dagshubbranchsource.traits.OriginPullRequestDiscoveryTrait'$class: 'io.jenkins.plugins.dagshubbranchsource.traits.OriginPullRequestDiscoveryTrait'buildOnPullHead (optional)
booleandagshubTagDiscoverydagshubTagDiscoverygitLabBranchDiscoverygitLabBranchDiscoverystrategyId
int$class: 'io.jenkins.plugins.gitlabbranchsource.SSHCheckoutTrait'$class: 'io.jenkins.plugins.gitlabbranchsource.SSHCheckoutTrait'https:// protocol for the Git repository.
This behaviour allows you to select the SSH private key to be used for checking out sources, which will consequently force the checkout to use the ssh:// protocol.
credentialsId
StringgitLabTagDiscoverygitLabTagDiscoverygitBranchDiscoverygitBranchDiscoverygitTagDiscoverygitTagDiscoveryheadRegexFilterheadRegexFilterregex
StringheadWildcardFilterheadWildcardFilterincludes
* as a wildcard; for example: master release*
Stringexcludes
release alpha-* beta-*
StringheadRegexFilterWithPRheadRegexFilterWithPRregex
StringtagRegex
StringheadWildcardFilterWithPRheadWildcardFilterWithPRincludes
* as a wildcard; for example: master release*
Stringexcludes
release
StringtagIncludes
* as a wildcard; for example: *-1.* to build only 1.0 tags from the maven release plugin.
StringtagExcludes
*-0.*
StringgiteaBranchDiscoverygiteaBranchDiscoverystrategyId
intgiteaForkDiscoverygiteaForkDiscoverystrategyId
inttrust
One of the great powers of pull requests is that anyone with read access to a repository can fork it, commit some changes to their fork and then create a pull request against the original repository with their changes. There are some files stored in source control that are important. For example, a Jenkinsfile may contain configuration details to sandbox pull requests in order to mitigate against malicious pull requests. In order to protect against a malicious pull request itself modifying the Jenkinsfile to remove the protections, you can define the trust policy for pull requests from forks.
Other plugins can extend the available trust policies. The default policies are:
Jenkinsfile) the contents of that file will be retrieved from the target branch on the origin repository and not from the pull request branch on the fork repository.
Nobody.
gitLabTrustMembersgitLabTrustMembersbitbucketTrustTeambitbucketTrustTeambitbucketTrustEveryonebitbucketTrustEveryonebitbucketTrustNobodybitbucketTrustNobodygitLabTrustEveryonegitLabTrustEveryonegitLabTrustNobodygitLabTrustNobodygitLabTrustPermissionsgitLabTrustPermissionsgiteaTrustContributorsgiteaTrustContributorsgiteaTrustEveryonegiteaTrustEveryonegiteaTrustNobodygiteaTrustNobodygitHubTrustContributorsgitHubTrustContributorsgitHubTrustEveryonegitHubTrustEveryonegitHubTrustNobodygitHubTrustNobodygitHubTrustPermissionsgitHubTrustPermissionsgiteaPullRequestDiscoverygiteaPullRequestDiscoverystrategyId
intgiteaSSHCheckoutgiteaSSHCheckouthttps:// protocol for the Git repository.
This behaviour allows you to select the SSH private key to be used for checking out sources, which will consequently force the checkout to use the ssh:// protocol.
credentialsId
StringgiteaTagDiscoverygiteaTagDiscoverygiteaWebhookRegistrationgiteaWebhookRegistrationOverrides the defaults for webhook management.
Webhooks are used to inform Jenkins about changes to repositories. There are two ways webhooks can be configured:
The Manage Jenkins » Configure System › Gitea Server allows defining the list of servers. Each server can be associated with credentials. If credentials are defined then the default behaviour is to use those credentials to automatically manage the webhooks of all repositories that Jenkins is interested in. If no credentials are defined then the default behaviour is to require the user to manually configure webhooks.
mode
StringgitHubBranchDiscoverygitHubBranchDiscoverystrategyId
env.GIT_BRANCH will be set to the branch name rather than PR-#. Also, status notifications for these builds will only be applied to the commit and not to the pull request.
intgitHubForkDiscoverygitHubForkDiscoverystrategyId
inttrust
One of the great powers of pull requests is that anyone with read access to a repository can fork it, commit some changes to their fork and then create a pull request against the original repository with their changes. There are some files stored in source control that are important. For example, a Jenkinsfile may contain configuration details to sandbox pull requests in order to mitigate against malicious pull requests. In order to protect against a malicious pull request itself modifying the Jenkinsfile to remove the protections, you can define the trust policy for pull requests from forks.
Other plugins can extend the available trust policies. The default policies are:
Jenkinsfile) the contents of that file will be retrieved from the target branch on the origin repository and not from the pull request branch on the fork repository.
Nobody. NOTE: all collaborators are trusted, even if they are only members of a team with read permission.
jenkins.scm.api.trait.SCMHeadAuthority<? super org.jenkinsci.plugins.github_branch_source.GitHubSCMSourceRequest, ? extends jenkins.scm.api.mixin.ChangeRequestSCMHead2, ? extends jenkins.scm.api.SCMRevision>gitHubPullRequestDiscoverygitHubPullRequestDiscoverystrategyId
intgitHubSshCheckoutgitHubSshCheckouthttps:// protocol for the Git repository.
This behaviour allows you to select the SSH private key to be used for checking out sources, which will consequently force the checkout to use the ssh:// protocol.
credentialsId
StringgitHubTagDiscoverygitHubTagDiscoveryscmManagerscmManagerserverUrl
Stringrepository
StringcredentialsId
Stringid (optional)
Stringtraits (optional)
$class: 'ApprovedPullRequestTrait'$class: 'ApprovedPullRequestTrait'strategyId
int$class: 'AuthorInChangelogTrait'$class: 'AuthorInChangelogTrait'$class: 'BitbucketAgedRefsTrait'$class: 'BitbucketAgedRefsTrait'retentionDays
StringbitbucketBranchCommitSkipTraitbitbucketBranchCommitSkipTraitbitbucketBuildStatusNotificationsbitbucketBuildStatusNotificationssendSuccessNotificationForUnstableBuild (optional)
booleanbitbucketCommitSkipTraitbitbucketCommitSkipTrait$class: 'BitbucketJiraValidatorTrait'$class: 'BitbucketJiraValidatorTrait'jiraServerIdx
intbuildStatusNameCustomPartbuildStatusNameCustomPartbuildStatusNameCustomPart (optional)
String$class: 'ChangeDiscoveryTrait'$class: 'ChangeDiscoveryTrait'queryString
Provide an additional query string to search for open changes. The status:open is implicitly added and does not need to be specified. See Gerrit search operators documentation for a detailed list of the supported search operators.
-is:wipdoes not include work-in-progress changes
is:privateincludes private changes
String$class: 'CheckoutOptionTrait'$class: 'CheckoutOptionTrait'extension
timeouttimeout
int$class: 'CleanAfterCheckoutTrait'$class: 'CleanAfterCheckoutTrait'extension
.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.
deleteUntrackedNestedRepositoriesdeleteUntrackedNestedRepositories (optional)
.git directories.
boolean$class: 'CleanBeforeCheckoutTrait'$class: 'CleanBeforeCheckoutTrait'extension
.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.
deleteUntrackedNestedRepositoriesdeleteUntrackedNestedRepositories (optional)
.git directories.
boolean$class: 'CleanMercurialSCMSourceTrait'$class: 'CleanMercurialSCMSourceTrait'$class: 'CloneOptionTrait'$class: 'CloneOptionTrait'extension
shallowshallow
booleannoTagsnoTags
booleanreferencereference
Stringtimeouttimeout
intdepthdepth (optional)
inthonorRefspechonorRefspec (optional)
boolean$class: 'DisableStatusUpdateTrait'$class: 'DisableStatusUpdateTrait'$class: 'DiscoverOtherRefsTrait'$class: 'DiscoverOtherRefsTrait'ref
The pattern under /refs on the remote repository to discover, can contain a wildcard.
Example: test/*/merged
StringnameMapping (optional)
Mapping for how the ref can be named in for example the @Library.
Example: test-@{1}
Where @{1} replaces the first wildcard in the ref when discovered.
By default it will be "namespace_before_wildcard-@{1}". E.g. if ref is "test/*/merged" the default mapping would be "test-@{1}".
String$class: 'FilterChecksTrait'$class: 'FilterChecksTrait'queryOperator
ID, SCHEMEqueryString
StringgitLabForkDiscoverygitLabForkDiscoverystrategyId
inttrust
One of the great powers of merge requests is that anyone with read access to a project can fork it, commit some changes to their fork and then create a merge request against the original project with their changes. There are some files stored in source control that are important. For example, a Jenkinsfile may contain configuration details to sandbox merge requests in order to mitigate against malicious merge requests. In order to protect against a malicious merge request itself modifying the Jenkinsfile to remove the protections, you can define the trust policy for merge requests from forks.
Other plugins can extend the available trust policies. The default policies are:
Jenkinsfile) the contents of that file will be retrieved from the target branch on the origin project and not from the merge request branch on the fork project.
Nobody.
jenkins.scm.api.trait.SCMHeadAuthority<? super io.jenkins.plugins.gitlabbranchsource.GitLabSCMSourceRequest, ? extends jenkins.scm.api.mixin.ChangeRequestSCMHead2, ? extends jenkins.scm.api.SCMRevision>$class: 'GitBrowserSCMSourceTrait'$class: 'GitBrowserSCMSourceTrait'browser
$class: 'AssemblaWeb'$class: 'AssemblaWeb'repoUrl
String$class: 'BacklogGitRepositoryBrowser'$class: 'BacklogGitRepositoryBrowser'repoName
StringrepoUrl
StringbitbucketServerbitbucketServerrepoUrl
String$class: 'BitbucketWeb'$class: 'BitbucketWeb'repoUrl
String$class: 'CGit'$class: 'CGit'repoUrl
String$class: 'FisheyeGitRepositoryBrowser'$class: 'FisheyeGitRepositoryBrowser'repoUrl
String$class: 'GitBlitRepositoryBrowser'$class: 'GitBlitRepositoryBrowser'repoUrl
StringprojectName
String$class: 'GitBucketBrowser'$class: 'GitBucketBrowser'url
String$class: 'GitLab'$class: 'GitLab'repoUrl
Stringversion (optional)
String$class: 'GitLabBrowser'$class: 'GitLabBrowser'https://gitLab.example.com then the URL for bob's skunkworks project might be https://gitLab.example.com/bob/skunkworks.
projectUrl
https://gitLab.example.com then the URL for bob's skunkworks project might be https://gitLab.example.com/bob/skunkworks
String$class: 'GitList'$class: 'GitList'repoUrl
String$class: 'GitWeb'$class: 'GitWeb'repoUrl
String$class: 'GiteaBrowser'$class: 'GiteaBrowser'repoUrl
https://gitea.example.com then the URL for bob's skunkworks project repository might be https://gitea.example.com/bob/skunkworks
String$class: 'GithubWeb'$class: 'GithubWeb'repoUrl
String$class: 'Gitiles'$class: 'Gitiles'repoUrl
String$class: 'GitoriousWeb'$class: 'GitoriousWeb'repoUrl
String$class: 'GogsGit'$class: 'GogsGit'repoUrl
String$class: 'KilnGit'$class: 'KilnGit'repoUrl
String$class: 'Phabricator'$class: 'Phabricator'repoUrl
Stringrepo
String$class: 'RedmineWeb'$class: 'RedmineWeb'repoUrl
String$class: 'RhodeCode'$class: 'RhodeCode'repoUrl
String$class: 'ScmManagerGitRepositoryBrowser'$class: 'ScmManagerGitRepositoryBrowser'repoUrl
String$class: 'Stash'$class: 'Stash'repoUrl
String$class: 'TFS2013GitRepositoryBrowser'$class: 'TFS2013GitRepositoryBrowser'repoUrl
If TFS is also used as the repository server, this can usually be left blank.
String$class: 'TracGitRepositoryBrowser'$class: 'TracGitRepositoryBrowser'$class: 'TuleapBrowser'$class: 'TuleapBrowser'repositoryUrl
String$class: 'ViewGitWeb'$class: 'ViewGitWeb'repoUrl
StringprojectName
String$class: 'GitHubAgedRefsTrait'$class: 'GitHubAgedRefsTrait'retentionDays
StringgitHubBranchCommitSkipTraitgitHubBranchCommitSkipTraitgitHubCommitSkipTraitgitHubCommitSkipTrait$class: 'GitHubJiraValidatorTrait'$class: 'GitHubJiraValidatorTrait'jiraServerIdx
int$class: 'GitHubSCMSourceChecksTrait'$class: 'GitHubSCMSourceChecksTrait'verboseConsoleLog (optional)
boolean$class: 'GitHubSCMSourceStatusChecksTrait'$class: 'GitHubSCMSourceStatusChecksTrait'name (optional)
Stringskip (optional)
booleanskipNotifications (optional)
booleanskipProgressUpdates (optional)
booleansuppressLogs (optional)
booleanunstableBuildNeutral (optional)
boolean$class: 'GitLFSPullTrait'$class: 'GitLFSPullTrait'gitlabAvatargitlabAvatardisableProjectAvatar (optional)
booleangitlabSkipNotificationsgitlabSkipNotifications$class: 'GitToolSCMSourceTrait'$class: 'GitToolSCMSourceTrait'gitTool
String$class: 'HookRegistrationTrait'$class: 'HookRegistrationTrait'webHookMode
StringsystemHookMode
StringgitHubIgnoreDraftPullRequestFiltergitHubIgnoreDraftPullRequestFilter$class: 'IgnoreOnPushNotificationTrait'$class: 'IgnoreOnPushNotificationTrait'jervisFilterjervisFilterThis will look at the root of a GitHub reference for .jervis.yml for the branches and tags filtering. You can customize the name of the YAML file searched for if you like.
For Tags:
For Branches:
branches:
only:
- master
By default Jervis will generate Jenkins jobs for all branches that have a .jervis.yml file. You can control and limit this behavior by specifying the branches or tags key in your .jervis.yml.
You can either whitelist or blacklist branches that you want to be built:
# blacklist
branches:
except:
- legacy
- experimental
# whitelist
branches:
only:
- master
- stable
The same YAML can be applied to tags.
# blacklist
tags:
except:
- .*-rc
- .*-beta
# whitelist
tags:
only:
- v[.0-9]+
If you specify both only and except, then except will be ignored. .jervis.yml needs to be present on all branches you want to be built. .jervis.yml will be interpreted in the context of that branch so if you specify a whitelist in your master branch it will not propagate to other branches.
You can use regular expressions to whitelist or blacklist branches:
branches:
only:
- master
- /^[.0-9]+-hotfix$/
Any name surrounded with / in the list of branches is treated as a regular expression. The expression will use Pattern.compile to compile the regex string into a Groovy regular expression.
yamlFileName
The filename which will be read from GitHub to determine if a Jenkins branch, tag, or pull request should be built. Provide a comma separated list of paths to YAML files in a repository and it will check each path as a fallback.
For example, set the value to: .jervis.yml, .ci/jervis.yml and this plugin will first check for valid YAML in .jervis.yml. If no YAML exists, then it will fall back to checking .ci/jervis.yml.
String$class: 'LocalBranchTrait'$class: 'LocalBranchTrait'logCommentlogCommentlogSuccess (optional)
booleansudoUser (optional)
String$class: 'MercurialBrowserSCMSourceTrait'$class: 'MercurialBrowserSCMSourceTrait'browser
$class: 'FishEye'$class: 'FishEye'url
String$class: 'GoogleCode'$class: 'GoogleCode'url
String$class: 'HgWeb'$class: 'HgWeb'url
String$class: 'Kallithea'$class: 'Kallithea'url
String$class: 'KilnHG'$class: 'KilnHG'url
String$class: 'RhodeCode'$class: 'RhodeCode'url
String$class: 'RhodeCodeLegacy'$class: 'RhodeCodeLegacy'url
String$class: 'ScmManager'$class: 'ScmManager'url
http://YOURSCMMANAGER/scm/repo/NAMESPACE/NAME/).
String$class: 'MercurialInstallationSCMSourceTrait'$class: 'MercurialInstallationSCMSourceTrait'installation
String$class: 'NotificationContextTrait'$class: 'NotificationContextTrait'contextLabel
StringtypeSuffix
Appends the relevant suffix to the context label based on the build type. '/pr-merge', '/pr-head' or '/branch'
booleannotificationsSkipnotificationsSkipgitLabOriginDiscoverygitLabOriginDiscoverystrategyId
int$class: 'PathBasedPullRequestFilterTrait'$class: 'PathBasedPullRequestFilterTrait'inclusionField
StringexclusionField
String$class: 'PreBuildMergeTrait'$class: 'PreBuildMergeTrait'extension
optionsoptions
mergeTargetmergeTarget
master.
StringfastForwardModefastForwardMode (optional)
FF, FF_ONLY, NO_FFmergeRemotemergeRemote (optional)
origin, that contains the branch you specify below. If left blank, it'll default to the name of the first repository configured above.
StringmergeStrategymergeStrategy (optional)
DEFAULT, RESOLVE, RECURSIVE, OCTOPUS, OURS, SUBTREE, RECURSIVE_THEIRS$class: 'PretestedIntegrationSCMTrait'$class: 'PretestedIntegrationSCMTrait'extension
gitIntegrationStrategygitIntegrationStrategy
accumulatedaccumulatedsquashsquashintegrationBranchintegrationBranch
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>
StringrepoNamerepoName
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
String$class: 'PruneStaleBranchTrait'$class: 'PruneStaleBranchTrait'$class: 'PruneStaleTagTrait'$class: 'PruneStaleTagTrait'bitbucketPublicRepoPullRequestFilterbitbucketPublicRepoPullRequestFilter$class: 'PullRequestDiscoveryTrait'$class: 'PullRequestDiscoveryTrait'excludeBranchesWithPRs
boolean$class: 'PullRequestLabelsBlackListFilterTrait'$class: 'PullRequestLabelsBlackListFilterTrait'labels
String$class: 'PullRequestLabelsMatchAllFilterTrait'$class: 'PullRequestLabelsMatchAllFilterTrait'labels
String$class: 'PullRequestLabelsMatchAnyFilterTrait'$class: 'PullRequestLabelsMatchAnyFilterTrait'labels
String$class: 'PullRequestNameFilterTrait'$class: 'PullRequestNameFilterTrait'strategyId
intphrase
StringignoreCase
booleanregex
boolean$class: 'RefSpecsSCMSourceTrait'$class: 'RefSpecsSCMSourceTrait'templates
valuevalue
@{remote} will be replaced by the remote name (which defaults to origin) before use.
StringheadRegexFilterWithPRFromOriginheadRegexFilterWithPRFromOriginregex
StringtagRegex
String$class: 'RemoteNameSCMSourceTrait'$class: 'RemoteNameSCMSourceTrait'remoteName
StringskipNotificationsskipNotifications$class: 'SparseCheckoutPathsTrait'$class: 'SparseCheckoutPathsTrait'extension
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
sparseCheckoutPathssparseCheckoutPaths
pathpath
String$class: 'SubmoduleOptionTrait'$class: 'SubmoduleOptionTrait'extension
disableSubmodulesdisableSubmodules
booleanrecursiveSubmodulesrecursiveSubmodules
booleantrackingSubmodulestrackingSubmodules
booleanreferencereference
git init --bare git remote add SubProject1 https://gitrepo.com/subproject1 git remote add SubProject2 https://gitrepo.com/subproject2 git fetch --all
Stringtimeouttimeout
intparentCredentialsparentCredentials
booleandepthdepth (optional)
intshallowshallow (optional)
booleanthreadsthreads (optional)
intmrTriggerCommentmrTriggerCommentcommentBody
StringonlyTrustedMembersCanTrigger
booleantuleapBranchDiscoverytuleapBranchDiscoverytuleapNotifyPullRequesttuleapNotifyPullRequesttuleapForkPullRequestDiscoverytuleapForkPullRequestDiscoverytuleapPullRequestDiscoverytuleapPullRequestDiscovery$class: 'UserIdentityTrait'$class: 'UserIdentityTrait'extension
namename
If given, "GIT_COMMITTER_NAME=[this]" and "GIT_AUTHOR_NAME=[this]" are set for builds. This overrides whatever is in the global settings.
Stringemailemail
If given, "GIT_COMMITTER_EMAIL=[this]" and "GIT_AUTHOR_EMAIL=[this]" are set for builds. This overrides whatever is in the global settings.
StringbitbucketWebhookConfigurationbitbucketWebhookConfigurationSets the value for committersToIgnore in the Bitbucket Webhook. Value should be a comma separated string.
committerToIgnore is used to prevent triggering Jenkins builds when commits by certain users are made.
committersToIgnore
StringheadWildcardFilterWithPRFromOriginheadWildcardFilterWithPRFromOriginincludes
* as a wildcard; for example: master release*
Stringexcludes
release
StringtagIncludes
* as a wildcard; for example: *-1.* to build only 1.0 tags from the maven release plugin.
StringtagExcludes
*-0.*
String$class: 'WipeWorkspaceTrait'$class: 'WipeWorkspaceTrait'bitbucketBranchDiscoverybitbucketBranchDiscoverystrategyId
intbitbucketForkDiscoverybitbucketForkDiscoverystrategyId
inttrust
One of the great powers of pull requests is that anyone with read access to a repository can fork it, commit some changes to their fork and then create a pull request against the original repository with their changes. There are some files stored in source control that are important. For example, a Jenkinsfile may contain configuration details to sandbox pull requests in order to mitigate against malicious pull requests. In order to protect against a malicious pull request itself modifying the Jenkinsfile to remove the protections, you can define the trust policy for pull requests from forks.
Other plugins can extend the available trust policies. The default policies are:
Jenkinsfile) the contents of that file will be retrieved from the target branch on the origin repository and not from the pull request branch on the fork repository.
jenkins.scm.api.trait.SCMHeadAuthority<? super com.cloudbees.jenkins.plugins.bitbucket.BitbucketSCMSourceRequest, ? extends jenkins.scm.api.mixin.ChangeRequestSCMHead2, ? extends jenkins.scm.api.SCMRevision>bitbucketPullRequestDiscoverybitbucketPullRequestDiscoverystrategyId
intbitbucketSshCheckoutbitbucketSshCheckouthttps:// protocol for the Git repository.
This behaviour allows you to select the SSH private key to be used for checking out sources, which will consequently force the checkout to use the ssh:// protocol.
credentialsId
It must be a SSH key based credential.
StringbitbucketTagDiscoverybitbucketTagDiscoverybitbucketWebhookRegistrationbitbucketWebhookRegistrationOverrides the defaults for webhook management.
Webhooks are used to inform Jenkins about changes to repositories. There are two ways webhooks can be configured:
The Manage Jenkins » Configure Jenkins › Bitbucket Endpoints allows defining the list of servers. Each server can be associated with credentials. If credentials are defined then the default behaviour is to use those credentials to automatically manage the webhooks of all repositories that Jenkins is interested in. If no credentials are defined then the default behaviour is to require the user to manually configure webhooks.
mode
String$class: 'com.cloudogu.scmmanager.scm.BranchDiscoveryTrait'$class: 'com.cloudogu.scmmanager.scm.BranchDiscoveryTrait'$class: 'com.cloudogu.scmmanager.scm.TagDiscoveryTrait'$class: 'com.cloudogu.scmmanager.scm.TagDiscoveryTrait'dagshubBranchDiscoverydagshubBranchDiscovery$class: 'io.jenkins.plugins.dagshubbranchsource.traits.ForkPullRequestDiscoveryTrait'$class: 'io.jenkins.plugins.dagshubbranchsource.traits.ForkPullRequestDiscoveryTrait'buildOnPullHead (optional)
boolean$class: 'io.jenkins.plugins.dagshubbranchsource.traits.OriginPullRequestDiscoveryTrait'$class: 'io.jenkins.plugins.dagshubbranchsource.traits.OriginPullRequestDiscoveryTrait'buildOnPullHead (optional)
booleandagshubTagDiscoverydagshubTagDiscoverygitLabBranchDiscoverygitLabBranchDiscoverystrategyId
int$class: 'io.jenkins.plugins.gitlabbranchsource.SSHCheckoutTrait'$class: 'io.jenkins.plugins.gitlabbranchsource.SSHCheckoutTrait'https:// protocol for the Git repository.
This behaviour allows you to select the SSH private key to be used for checking out sources, which will consequently force the checkout to use the ssh:// protocol.
credentialsId
StringgitLabTagDiscoverygitLabTagDiscoverygitBranchDiscoverygitBranchDiscoverygitTagDiscoverygitTagDiscoveryheadRegexFilterheadRegexFilterregex
StringheadWildcardFilterheadWildcardFilterincludes
* as a wildcard; for example: master release*
Stringexcludes
release alpha-* beta-*
StringheadRegexFilterWithPRheadRegexFilterWithPRregex
StringtagRegex
StringheadWildcardFilterWithPRheadWildcardFilterWithPRincludes
* as a wildcard; for example: master release*
Stringexcludes
release
StringtagIncludes
* as a wildcard; for example: *-1.* to build only 1.0 tags from the maven release plugin.
StringtagExcludes
*-0.*
StringgiteaBranchDiscoverygiteaBranchDiscoverystrategyId
intgiteaForkDiscoverygiteaForkDiscoverystrategyId
inttrust
One of the great powers of pull requests is that anyone with read access to a repository can fork it, commit some changes to their fork and then create a pull request against the original repository with their changes. There are some files stored in source control that are important. For example, a Jenkinsfile may contain configuration details to sandbox pull requests in order to mitigate against malicious pull requests. In order to protect against a malicious pull request itself modifying the Jenkinsfile to remove the protections, you can define the trust policy for pull requests from forks.
Other plugins can extend the available trust policies. The default policies are:
Jenkinsfile) the contents of that file will be retrieved from the target branch on the origin repository and not from the pull request branch on the fork repository.
Nobody.
gitLabTrustMembersgitLabTrustMembersbitbucketTrustTeambitbucketTrustTeambitbucketTrustEveryonebitbucketTrustEveryonebitbucketTrustNobodybitbucketTrustNobodygitLabTrustEveryonegitLabTrustEveryonegitLabTrustNobodygitLabTrustNobodygitLabTrustPermissionsgitLabTrustPermissionsgiteaTrustContributorsgiteaTrustContributorsgiteaTrustEveryonegiteaTrustEveryonegiteaTrustNobodygiteaTrustNobodygitHubTrustContributorsgitHubTrustContributorsgitHubTrustEveryonegitHubTrustEveryonegitHubTrustNobodygitHubTrustNobodygitHubTrustPermissionsgitHubTrustPermissionsgiteaPullRequestDiscoverygiteaPullRequestDiscoverystrategyId
intgiteaSSHCheckoutgiteaSSHCheckouthttps:// protocol for the Git repository.
This behaviour allows you to select the SSH private key to be used for checking out sources, which will consequently force the checkout to use the ssh:// protocol.
credentialsId
StringgiteaTagDiscoverygiteaTagDiscoverygiteaWebhookRegistrationgiteaWebhookRegistrationOverrides the defaults for webhook management.
Webhooks are used to inform Jenkins about changes to repositories. There are two ways webhooks can be configured:
The Manage Jenkins » Configure System › Gitea Server allows defining the list of servers. Each server can be associated with credentials. If credentials are defined then the default behaviour is to use those credentials to automatically manage the webhooks of all repositories that Jenkins is interested in. If no credentials are defined then the default behaviour is to require the user to manually configure webhooks.
mode
StringgitHubBranchDiscoverygitHubBranchDiscoverystrategyId
env.GIT_BRANCH will be set to the branch name rather than PR-#. Also, status notifications for these builds will only be applied to the commit and not to the pull request.
intgitHubForkDiscoverygitHubForkDiscoverystrategyId
inttrust
One of the great powers of pull requests is that anyone with read access to a repository can fork it, commit some changes to their fork and then create a pull request against the original repository with their changes. There are some files stored in source control that are important. For example, a Jenkinsfile may contain configuration details to sandbox pull requests in order to mitigate against malicious pull requests. In order to protect against a malicious pull request itself modifying the Jenkinsfile to remove the protections, you can define the trust policy for pull requests from forks.
Other plugins can extend the available trust policies. The default policies are:
Jenkinsfile) the contents of that file will be retrieved from the target branch on the origin repository and not from the pull request branch on the fork repository.
Nobody. NOTE: all collaborators are trusted, even if they are only members of a team with read permission.
jenkins.scm.api.trait.SCMHeadAuthority<? super org.jenkinsci.plugins.github_branch_source.GitHubSCMSourceRequest, ? extends jenkins.scm.api.mixin.ChangeRequestSCMHead2, ? extends jenkins.scm.api.SCMRevision>gitHubPullRequestDiscoverygitHubPullRequestDiscoverystrategyId
intgitHubSshCheckoutgitHubSshCheckouthttps:// protocol for the Git repository.
This behaviour allows you to select the SSH private key to be used for checking out sources, which will consequently force the checkout to use the ssh:// protocol.
credentialsId
StringgitHubTagDiscoverygitHubTagDiscoveryscmManagerSvnscmManagerSvnserverUrl
Stringrepository
Stringid (optional)
StringcredentialsId (optional)
Stringbrowser (optional)
$class: 'Assembla'$class: 'Assembla'spaceName
String$class: 'BacklogRepositoryBrowser'$class: 'BacklogRepositoryBrowser'url
When no value is set, project of "Backlog URL" set above is used.
String$class: 'Phabricator'$class: 'Phabricator'url
Stringrepo
String$class: 'PolarionRepositoryBrowser'$class: 'PolarionRepositoryBrowser'url
Stringlocation
String$class: 'RedmineRepositoryBrowser'$class: 'RedmineRepositoryBrowser'repositoryId
String$class: 'SVNWeb'$class: 'SVNWeb'url
String$class: 'ScmManagerSvnRepositoryBrowser'$class: 'ScmManagerSvnRepositoryBrowser'repoUrl
String$class: 'TeamForge'$class: 'TeamForge'connectionFactory
urlurl
This should be the URL of your CollabNet TeamForge site. It should be of the form 'https://forge.collab.net'.
Stringusernameusername
The user who will upload the files.
Stringpasswordpassword
The password for the user specified above. If incorrectly given, the login to the CollabNet TeamForge server will fail.
Stringproject
Stringrepo
String$class: 'TracRepositoryBrowser'$class: 'TracRepositoryBrowser'$class: 'ViewVCRepositoryBrowser'$class: 'ViewVCRepositoryBrowser'url
Stringlocation
String$class: 'VisualSVN'$class: 'VisualSVN'url
Stringexcludes (optional)
Stringincludes (optional)
StringworkspaceUpdater (optional)
$class: 'CheckoutUpdater'$class: 'CheckoutUpdater'$class: 'NoopUpdater'$class: 'NoopUpdater'$class: 'UpdateUpdater'$class: 'UpdateUpdater'$class: 'UpdateWithCleanUpdater'$class: 'UpdateWithCleanUpdater'$class: 'UpdateWithRevertUpdater'$class: 'UpdateWithRevertUpdater'fromScmfromScmname
Stringscm
$class: 'AWSCodePipelineSCM'$class: 'AWSCodePipelineSCM'name
StringclearWorkspace
booleanregion
StringawsAccessKey
In order to integrate with AWS CodePipeline, you must authorize access to the pipeline and its related artifacts. If you installed Jenkins on a supported Amazon EC2 instance type, such as Amazon Linux, you can install the AWS CLI and configure a profile with the required credentials. This is the preferred method. In all other cases, you can store AWS credentials in these fields. You should securely configure your Jenkins instance to use HTTPS so that these credentials are not sent unencrypted. For more information, see AWS CodePipeline Integration for Other Products and Services.
StringawsSecretKey
>In order to integrate with AWS CodePipeline, you must authorize access to the pipeline and its related artifacts. If you installed Jenkins on a supported Amazon EC2 instance type, such as Amazon Linux, you can install the AWS CLI and configure a profile with the required credentials. This is the preferred method. In all other cases, you can store AWS credentials in these fields. You should securely configure your Jenkins instance to use HTTPS so that these credentials are not sent unencrypted. For more information, see AWS CodePipeline Integration for Other Products and Services.
StringproxyHost
You might need a proxy host address if you are hosting Jenkins on a private network. The proxy name can be an IP address or DNS address. The AWS CodePipeline Plugin for Jenkins requires internet access. If access is not configured, you might see errors in the AWS CodePipeline Polling Log.
StringproxyPort
You might need a proxy port for your proxy host address if you are hosting Jenkins on a private network. The proxy port is a number, might be on port 8080, 3128, or 8443, depending on your network protocols and security settings. If access is not configured, you might see errors in the AWS CodePipeline Polling Log.
Stringcategory
This is the category of the action type in AWS CodePipeline, and is usually either Build or Test. To see an example usage, see Install and Configure the AWS CodePipeline Plugin for Jenkins.
Stringprovider
This is the provider name of the action type in AWS CodePipeline. You must provide this exact string when adding an action for Jenkins in AWS CodePipeline. To see an example usage, see Install and Configure the AWS CodePipeline Plugin for Jenkins.
Stringversion
Leave the default as 1.
Stringaccurevaccurevdepot
Stringstream
StringserverName (optional)
StringserverUUID (optional)
StringwspaceORreftree (optional)
StringaccurevTool (optional)
Stringcleanreftree (optional)
booleandirectoryOffset (optional)
StringdontPopContent (optional)
booleanfilterForPollSCM (optional)
StringignoreStreamParent (optional)
booleanreftree (optional)
StringsnapshotNameFormat (optional)
StringsubPath (optional)
StringsubPathOnly (optional)
booleansynctime (optional)
booleanuseSnapshot (optional)
booleanworkspace (optional)
String$class: 'BazaarSCM'$class: 'BazaarSCM'source
Stringcleantree
booleanbrowser
$class: 'Loggerhead'$class: 'Loggerhead'url
String$class: 'OpenGrok'$class: 'OpenGrok'url
StringrootModule
Stringcheckout
boolean$class: 'BitKeeperSCM'$class: 'BitKeeperSCM'parent
StringlocalRepository
StringusePull
booleanquiet
booleanBbSBbSid
Stringbranches
namename
Specify the branches if you'd like to track a specific branch in a repository. If left blank, all branches will be examined for changes and built.
The safest way is to use the refs/heads/<branchName> syntax. This way the expected branch is unambiguous.
If your branch name has a / in it make sure to use the full reference above. When not presented with a full path the plugin will only use the part of the string right of the last slash. Meaning foo/bar will actually match bar.
If you use a wildcard branch specifier, with a slash (e.g. release/), you'll need to specify the origin repository in the branch names to make sure changes are picked up. So e.g. origin/release/
Possible options:
<branchName>refs/heads/<branchName>.master, feature1, ... refs/heads/<branchName>refs/heads/master, refs/heads/feature1/master, ... <remoteRepoName>/<branchName>refs/heads/<branchName>.origin/master remotes/<remoteRepoName>/<branchName>remotes/origin/master refs/remotes/<remoteRepoName>/<branchName>refs/remotes/origin/master <tagName>refs/tags/<tagName> instead.git-2.3.0 refs/tags/<tagName>refs/tags/git-2.3.0 <commitId>5062ac843f2b947733e6a3b105977056821bd352, 5062ac84, ... ${ENV_VARIABLE}${TREEISH}, refs/tags/${TAGNAME}, ... <Wildcards>REPOSITORYNAME/BRANCH. In addition, BRANCH is recognized as a shorthand of */BRANCH, '*' is recognized as a wildcard, and '**' is recognized as wildcard that includes the separator '/'. Therefore, origin/branches* would match origin/branches-foo but not origin/branches/foo, while origin/branches** would match both origin/branches-foo and origin/branches/foo. :<regular expression>:regexp. Regular expression syntax in branches to build will only build those branches whose names match the regular expression.:^(?!(origin/prefix)).*
origin or origin/master or origin/featureorigin/prefix or origin/prefix_123 or origin/prefix-abc:origin/release-\d{8}
origin/release-20150101origin/release-2015010 or origin/release-201501011 or origin/release-20150101-something:^(?!origin/master$|origin/develop$).*
origin/branch1 or origin/branch-2 or origin/master123 or origin/develop-123origin/master or origin/developStringcredentialsId
When running a job, Jenkins requires credentials to authenticate with Bitbucket Server. For example, to checkout the source code for builds. To do this, it needs credentials with access to the projects and repositories you want it to build from.
You can provide Jenkins with credentials here by:
In addition, you can provide Jenkins with SSH credentials below. If you do, Jenkins will use them for clone operations instead of the credentials you select here.
StringsshCredentialsId
If specified, Jenkins will use these credentials to check out the source code for builds. If no SSH credentials are specified, Jenkins will use the basic credentials instead.
To provide Jenkins with SSH credentials, you can:
Stringextensions
$class: 'AuthorInChangelog'$class: 'AuthorInChangelog'$class: 'BuildChooserSetting'$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: 'AlternativeBuildChooser'$class: 'AncestryBuildChooser'$class: 'AncestryBuildChooser'maximumAgeInDays
intancestorCommitSha1
String$class: 'DefaultBuildChooser'$class: 'DefaultBuildChooser'$class: 'DeflakeGitBuildChooser'$class: 'DeflakeGitBuildChooser'$class: 'GerritTriggerBuildChooser'$class: 'GerritTriggerBuildChooser'$class: 'InverseBuildChooser'$class: 'InverseBuildChooser'$class: 'BuildSingleRevisionOnly'$class: 'BuildSingleRevisionOnly'$class: 'ChangelogToBranch'$class: 'ChangelogToBranch'options
compareRemotecompareRemote
origin, that contains the branch you specify below.
StringcompareTargetcompareTarget
String$class: 'CheckoutOption'$class: 'CheckoutOption'timeout
int$class: 'CleanBeforeCheckout'$class: '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 (optional)
.git directories.
boolean$class: 'CleanCheckout'$class: 'CleanCheckout'.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 (optional)
.git directories.
boolean$class: 'CloneOption'$class: 'CloneOption'shallow
booleannoTags
booleanreference
Stringtimeout
intdepth (optional)
inthonorRefspec (optional)
boolean$class: 'CodeCommitURLHelper'$class: 'CodeCommitURLHelper'credentialId
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.
StringrepositoryName
String$class: 'DisableRemotePoll'$class: 'DisableRemotePoll'$class: 'ExcludeFromChangeSet'$class: 'ExcludeFromChangeSet'$class: 'ExcludeFromPoll'$class: 'ExcludeFromPoll'$class: 'GitLFSPull'$class: 'GitLFSPull'$class: 'GitSCMChecksExtension'$class: 'GitSCMChecksExtension'verboseConsoleLog (optional)
boolean$class: 'GitSCMStatusChecksExtension'$class: 'GitSCMStatusChecksExtension'name (optional)
Stringskip (optional)
booleanskipProgressUpdates (optional)
booleansuppressLogs (optional)
booleanunstableBuildNeutral (optional)
boolean$class: 'GitTagMessageExtension'$class: 'GitTagMessageExtension'useMostRecentTag (optional)
boolean$class: 'IgnoreNotifyCommit'$class: 'IgnoreNotifyCommit'$class: 'LocalBranch'$class: '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'$class: 'MessageExclusion'excludedMessage
.*\[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.
String$class: 'PathRestriction'$class: 'PathRestriction'includedRegions
myapp/src/main/web/.*\.html
myapp/src/main/web/.*\.jpeg
myapp/src/main/web/.*\.gif
The 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.
StringexcludedRegions
myapp/src/main/web/.*\.html
myapp/src/main/web/.*\.jpeg
myapp/src/main/web/.*\.gif
The example above illustrates that if only html/jpeg/gif files have been committed to the SCM a build will not occur.
String$class: 'PerBuildTag'$class: 'PerBuildTag'$class: 'PreBuildMerge'$class: 'PreBuildMerge'options
mergeTargetmergeTarget
master.
StringfastForwardModefastForwardMode (optional)
FF, FF_ONLY, NO_FFmergeRemotemergeRemote (optional)
origin, that contains the branch you specify below. If left blank, it'll default to the name of the first repository configured above.
StringmergeStrategymergeStrategy (optional)
DEFAULT, RESOLVE, RECURSIVE, OCTOPUS, OURS, SUBTREE, RECURSIVE_THEIRSpretestedIntegrationpretestedIntegrationgitIntegrationStrategy
accumulatedaccumulatedsquashsquashintegrationBranch
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>
StringrepoName
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
String$class: 'PruneStaleBranch'$class: 'PruneStaleBranch'pruneTagspruneTagspruneTags
boolean$class: 'RelativeTargetDirectory'$class: 'RelativeTargetDirectory'relativeTargetDir
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.
String$class: 'ScmName'$class: 'ScmName'Unique name for this SCM. Needed when using Git within the Multi SCM plugin.
name
String$class: 'SparseCheckoutPaths'$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
pathpath
String$class: 'SubmoduleOption'$class: 'SubmoduleOption'disableSubmodules
booleanrecursiveSubmodules
booleantrackingSubmodules
booleanreference
git init --bare git remote add SubProject1 https://gitrepo.com/subproject1 git remote add SubProject2 https://gitrepo.com/subproject2 git fetch --all
Stringtimeout
intparentCredentials
booleandepth (optional)
intshallow (optional)
booleanthreads (optional)
int$class: 'UserExclusion'$class: 'UserExclusion'excludedUsers
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.
String$class: 'UserIdentity'$class: 'UserIdentity'name
If given, "GIT_COMMITTER_NAME=[this]" and "GIT_AUTHOR_NAME=[this]" are set for builds. This overrides whatever is in the global settings.
Stringemail
If given, "GIT_COMMITTER_EMAIL=[this]" and "GIT_AUTHOR_EMAIL=[this]" are set for builds. This overrides whatever is in the global settings.
String$class: 'WipeWorkspace'$class: 'WipeWorkspace'gitTool
StringprojectName
Enter the name of the Bitbucket Server project containing the repository you want Jenkins to build from. To find a project, start typing. If it doesn't appear in the search results, the credentials that you've chosen may not have read access to it and you'll need to provide different credentials.
To get Jenkins to build from a personal repository, enter a tilde (~) followed by repository owner's username. For example, ~jsmith.
StringrepositoryName
Enter the Bitbucket Server repository you want Jenkins to build from. To find a repository, start typing. If it doesn't appear in the search results, the credentials that you've chosen may not have read access to it and you'll need to provide different credentials.
To get Jenkins to build from a personal repository, enter its slug. This is the URL-friendly version of the repository name. For example, a repository called my example repo will have the slug my-example-repo, and you can see this in its URL, https://bitbucketserver.mycompany.com/myproject/my-example-repo.
StringserverId
Choose the Bitbucket Server instance containing the repository you want Jenkins to build from. If you can't find your instance, check this plugin's configuration and try again.
StringmirrorName
Choose the location that Jenkins should clone from when running this build. This can be the primary server or a mirror if one is available. To see available mirrors, first choose a Bitbucket Server project and repository.
String$class: 'BlameSubversionSCM'$class: 'BlameSubversionSCM'if it is false and the build is not triggered by upstream job,
the plugin will not collect any svn info from upstream job.
else the plugin will collect svn info from latest upstream job
alwaysCollectSVNInfo
boolean$class: 'CCUCMScm'$class: 'CCUCMScm'loadModule
Stringnewest
booleanmode
$class: 'PollChildMode'$class: 'PollChildMode'levelToPoll
Stringcomponent (optional)
StringcreateBaseline (optional)
Check this if you want create a baseline after a completed deliver.
This is only applicable for child and sibling poll mode.
booleannewest (optional)
boolean$class: 'PollRebaseMode'$class: 'PollRebaseMode'levelToPoll
Stringcomponent (optional)
StringcreateBaseline (optional)
booleanexcludeList (optional)
String$class: 'PollSelfMode'$class: 'PollSelfMode'levelToPoll
Stringcomponent (optional)
Stringnewest (optional)
boolean$class: 'PollSiblingMode'$class: 'PollSiblingMode'levelToPoll
Stringcomponent (optional)
StringcreateBaseline (optional)
Check this if you want create a baseline after a completed deliver.
This is only applicable for child and sibling poll mode.
booleannewest (optional)
booleanuseHyperLinkForPolling (optional)
boolean$class: 'PollSubscribeMode'$class: 'PollSubscribeMode'levelToPoll
StringcomponentsToMonitor
componentSelectioncomponentSelection
StringjobsToMonitor
jobnamejobname
Stringignoresignores
StringjobNamejobName (optional)
StringcascadePromotion (optional)
booleancomponent (optional)
Stringnewest (optional)
booleanstream
StringtreatUnstable
StringnameTemplate
StringforceDeliver
booleanrecommend
booleanmakeTag
booleansetDescription
booleanbuildProject
StringremoveViewPrivateFiles
booleantrimmedChangeSet
booleandiscard
boolean$class: 'CVSSCM'$class: 'CVSSCM'repositories
cvsRootcvsRoot
StringpasswordRequiredpasswordRequired
booleanpasswordpassword
StringrepositoryItemsrepositoryItems
locationlocation
$class: 'BranchRepositoryLocation'$class: 'BranchRepositoryLocation'branchName
StringuseHeadIfNotFound
boolean$class: 'HeadRepositoryLocation'$class: 'HeadRepositoryLocation'$class: 'TagRepositoryLocation'$class: 'TagRepositoryLocation'tagName
StringuseHeadIfNotFound
booleanmodulesmodules
remoteNameremoteName
StringlocalNamelocalName
StringprojectsetFileNameprojectsetFileName
StringexcludedRegionsexcludedRegions
src/main/web/.*\.html src/main/web/.*\.jpeg 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. More information on regular expressions can be found here.
patternpattern
StringcompressionLevelcompressionLevel
intrepositoryBrowserrepositoryBrowser
$class: 'FishEyeCVS'$class: 'FishEyeCVS'url
String$class: 'OpenGrok'$class: 'OpenGrok'url
String$class: 'ViewCVS'$class: 'ViewCVS'url
StringcanUseUpdate
booleanlegacy
If you have multiple modules to check out, this option is forced (otherwise they'll overlap.)
This affects other path specifiers, such as artifact archivers --- you now specify "build/foo.jar" instead of "foo/build/foo.jar".
booleanskipChangeLog
booleanpruneEmptyDirectories
booleandisableCvsQuiet
booleancleanOnFailedUpdate
booleanforceCleanCopy
booleancheckoutCurrentTimestamp
The build quiet period is designed to assist with CVS checkouts by waiting for a specific period of time without commits. Normally you want the checkout to reflect the time when the quiet period was exited successfully. Select this option if you need to re-enable the legacy behaviour of Jenkins, i.e. using the time that the build started checking out as the timestamp for the checkout operation. Note: enabling this option can result in the quiet period being defeated especially in those cases where the build is not able to start immediately after exiting the quiet period.
boolean$class: 'ClearCaseSCM'$class: 'ClearCaseSCM'branch
Stringlabel
StringextractConfigSpec
booleanconfigSpecFileName
StringrefreshConfigSpec
booleanrefreshConfigSpecCommand
StringconfigSpec
StringviewTag
Stringuseupdate
booleanextractLoadRules
booleanloadRules
StringuseOtherLoadRulesForPolling
booleanloadRulesForPolling
Stringusedynamicview
booleanviewdrive
Stringmkviewoptionalparam
StringfilterOutDestroySubBranchEvent
booleandoNotUpdateConfigSpec
booleanrmviewonrename
booleanexcludedRegions
StringmultiSitePollBuffer
StringuseTimeRule
booleancreateDynView
booleanviewPath
Stringchangeset
ALL, BRANCH, NONE, UPDTviewStorage
Three strategies are currently available to manage view storage location.
$class: 'DefaultViewStorage'$class: 'DefaultViewStorage'$class: 'ServerViewStorage'$class: 'ServerViewStorage'assignedLabelString
Label expression used to populate view storage location dropdown.
Stringserver
The view storage location that will be passed to the -stgloc option.
The list of available servers is retrieved using cleartool lsstgloc -view
Note that auto is always available.
String$class: 'SpecificViewStorage'$class: 'SpecificViewStorage'winStorageDir
StringunixStorageDir
String$class: 'ClearCaseUcmBaselineSCM'$class: 'ClearCaseUcmBaselineSCM'$class: 'ClearCaseUcmSCM'$class: 'ClearCaseUcmSCM'stream
Stringloadrules
StringviewTag
Stringusedynamicview
booleanviewdrive
Stringmkviewoptionalparam
StringfilterOutDestroySubBranchEvent
booleanuseUpdate
booleanrmviewonrename
booleanexcludedRegions
StringmultiSitePollBuffer
StringoverrideBranchName
StringcreateDynView
booleanfreezeCode
booleanrecreateView
booleanallocateViewName
booleanviewPath
StringuseManualLoadRules
booleanchangeset
ALL, BRANCH, NONE, UPDTviewStorage
Three strategies are currently available to manage view storage location.
$class: 'DefaultViewStorage'$class: 'DefaultViewStorage'$class: 'ServerViewStorage'$class: 'ServerViewStorage'assignedLabelString
Label expression used to populate view storage location dropdown.
Stringserver
The view storage location that will be passed to the -stgloc option.
The list of available servers is retrieved using cleartool lsstgloc -view
Note that auto is always available.
String$class: 'SpecificViewStorage'$class: 'SpecificViewStorage'winStorageDir
StringunixStorageDir
StringbuildFoundationBaseline
If checked, instead of creating a view on the current stream, the job will look up the current foundation baselines for the given stream and work in readonly on these baselines. If polling is enabled, the build will be triggered every time a new foundation baseline is detected on the given stream.
boolean$class: 'CloneWorkspaceSCM'$class: 'CloneWorkspaceSCM'parentJobName
Stringcriteria
String$class: 'CmvcSCM'$class: 'CmvcSCM'family
Stringbecome
Stringreleases
StringcheckoutScript
StringtrackViewReportWhereClause
String$class: 'ConfigurationRotator'$class: 'ConfigurationRotator'acrs
$class: 'ClearCaseUCM'$class: 'ClearCaseUCM'pvobName
Stringcontribute
Contribute data to a global database. Defined in the Compatibility Action Storage Plugin.
booleantargets
baselineNamebaselineName
Stringlevellevel
INITIAL, BUILT, TESTED, RELEASED, REJECTEDfixedfixed
booleanuseNewest (optional)
boolean$class: 'Git'$class: 'Git'targets
namename
Stringrepositoryrepository
Stringbranchbranch
StringcommitIdcommitId
Stringfixedfixed
booleanuseNewest (optional)
boolean$class: 'CvsProjectset'$class: 'CvsProjectset'repositories
cvsRootcvsRoot
StringpasswordRequiredpasswordRequired
booleanpasswordpassword
StringrepositoryItemsrepositoryItems
locationlocation
$class: 'BranchRepositoryLocation'$class: 'BranchRepositoryLocation'branchName
StringuseHeadIfNotFound
boolean$class: 'HeadRepositoryLocation'$class: 'HeadRepositoryLocation'$class: 'TagRepositoryLocation'$class: 'TagRepositoryLocation'tagName
StringuseHeadIfNotFound
booleanmodulesmodules
remoteNameremoteName
StringlocalNamelocalName
StringprojectsetFileNameprojectsetFileName
StringexcludedRegionsexcludedRegions
src/main/web/.*\.html src/main/web/.*\.jpeg 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. More information on regular expressions can be found here.
patternpattern
StringcompressionLevelcompressionLevel
intrepositoryBrowserrepositoryBrowser
$class: 'FishEyeCVS'$class: 'FishEyeCVS'url
String$class: 'OpenGrok'$class: 'OpenGrok'url
String$class: 'ViewCVS'$class: 'ViewCVS'url
StringcanUseUpdate
booleanusername
Stringpassword
Stringbrowser
$class: 'FishEyeCVS'$class: 'FishEyeCVS'url
String$class: 'OpenGrok'$class: 'OpenGrok'url
String$class: 'ViewCVS'$class: 'ViewCVS'url
StringskipChangeLog
booleanpruneEmptyDirectories
booleandisableCvsQuiet
booleancleanOnFailedUpdate
booleanforceCleanCopy
boolean$class: 'DarcsScm'$class: 'DarcsScm'source
StringlocalDir
Stringclean
booleanbrowser
$class: 'DarcsWeb'$class: 'DarcsWeb'url
Stringrepo
String$class: 'Darcsden'$class: 'Darcsden'url
String$class: 'DimensionsSCM'$class: 'DimensionsSCM'project
StringcredentialsType
StringuserName
Stringpassword
StringpluginServer
StringuserServer
StringkeystoreServer
StringpluginDatabase
StringuserDatabase
StringkeystoreDatabase
StringkeystorePath
StringcertificateAlias
StringcredentialsId
StringcertificatePassword
StringkeystorePassword
StringcertificatePath
StringremoteCertificatePassword
StringsecureAgentAuth
booleancanJobDelete (optional)
booleancanJobExpand (optional)
booleancanJobForce (optional)
booleancanJobNoMetadata (optional)
booleancanJobNoTouch (optional)
booleancanJobRevert (optional)
booleancanJobUpdate (optional)
booleaneol (optional)
Stringfolders (optional)
valuevalue
StringpathsToExclude (optional)
valuevalue
Stringpermissions (optional)
StringtimeZone (optional)
StringwebUrl (optional)
String$class: 'DrushMakefileSCM'$class: 'DrushMakefileSCM'makefile
Specify the content of the Makefile. Support for YAML Makefiles depends on the version of Drush you have installed.
This example will generate a vanilla Drupal 7.38:
api=2
core=7.x
projects[drupal][version]=7.38
Stringroot
String$class: 'EndevorConfiguration'$class: 'EndevorConfiguration'connectionId
StringfilterPattern
StringfileExtension
StringcredentialsId
StringtargetFolder
Stringfilesystemfilesystempath
The file path for the source code.
e.g. \\Server1\project1\src or c:\myproject\src
Note for distributed build environment, please make sure the path is accessible on remote node(s)
StringclearWorkspace
If true, the system will delete all existing files/sub-folders in workspace before checking-out. Poll changes will not be affected by this setting.
booleancopyHidden
If true, the system will copy hidden files and folders as well. Default is false.
booleanfilterSettings
includeFilterincludeFilter
booleanselectorsselectors
You can apply wildcard filter(s) when detecting changes and copying files. By default, the system will filter out hidden files, on Unix, that means files/folder starting with ".", on Windows, that means files/folders with "hidden" attribute. You may want to filter out, e.g. files with ".tmp" extension.
Note: filters are applied on both sides, source and destination (i.e. the workspace). E.g. if you filter out ".tmp" files, all ".tmp" files currently in workspace will not be removed.
wildcardwildcard
ANT style wildcard.
To include just *.java, set filter type to "Include" and type add "*.java" (without quote) in the wildcard. To exclude *.exe" and all JUnit test cases, set filter type to "Exclude" and add two wildcard, one for "*.dll" and one for "*Test*"
To exclude a directory, set filter to "**/dir_to_exclude/**"
Note: (1) the wildcard is case insensitive, (2) all backslashes (\) will be replaced with slashes (/)
String$class: 'FeatureBranchAwareMercurialSCM'$class: 'FeatureBranchAwareMercurialSCM'installation
Stringsource
Stringbranch
Stringmodules
Stringsubdir
my/sources (use forward slashes). If changing this entry, you probably want to clean the workspace first.
Stringbrowser
$class: 'FishEye'$class: 'FishEye'url
String$class: 'GoogleCode'$class: 'GoogleCode'url
String$class: 'HgWeb'$class: 'HgWeb'url
String$class: 'Kallithea'$class: 'Kallithea'url
String$class: 'KilnHG'$class: 'KilnHG'url
String$class: 'RhodeCode'$class: 'RhodeCode'url
String$class: 'RhodeCodeLegacy'$class: 'RhodeCodeLegacy'url
String$class: 'ScmManager'$class: 'ScmManager'url
http://YOURSCMMANAGER/scm/repo/NAMESPACE/NAME/).
Stringclean
booleanbranchPattern
String$class: 'GeneXusServerSCM'$class: 'GeneXusServerSCM'gxInstallationId
StringserverURL
StringcredentialsId
Credentials to use when authenticating to the GeneXus Server.
Select the credentials you want to use or click "Add" to enter a new user/password pair.
StringkbName
StringkbVersion
Name of the Version that will be selected when creating a local copy of the Knowledge Base.
If you leave it blank the 'Trunk' version will be selected by default.
StringlocalKbPath
Path to the local Knowledge Base to use as working copy.
If you leave it blank the default ${WORKSPACE}\KBname will apply.
StringlocalKbVersion
Name of the Version in the local Knowledge Base that is linked to the Version in the server.
If you leave it blank the 'Trunk' version will be selected by default.
StringkbDbServerInstance
StringkbDbCredentialsId
Credentials to use when to connecting to SQL Server.
Select "none" for Windows Authentication.
StringkbDbName
Name of the SQL Server database used for the local Knowledge Base.
Leave it blank to use the default database name.
StringkbDbInSameFolder
Create the database files in the same folder as the Knowledge Base when checking out. Default is 'true'.
If kbDbInSameFolder is true or not set, then the database files will be created in the same folder as the Knowledge Base. If kbDbInSameFolder is false, then the database files will be created in the default folder configured for the SQL Server at kbDbServerInstance (optional).
boolean$class: 'GitSCM'$class: 'GitSCM'The git plugin provides fundamental git operations for Jenkins projects. It can poll, fetch, checkout, and merge contents of git repositories.
The git plugin provides an SCM implementation to be used with the Pipeline SCM checkout step. The Pipeline Syntax Snippet Generator guides the user to select git plugin checkout options and provides online help for each of the options.
userRemoteConfigs
${SUPER_PROJECT_URL}/${SUBMODULE}, rather than relying on information from .gitmodules.urlurl
git clone command.
Stringnamename
origin, to uniquely identify this repository among other remote repositories. This is the same "name" that you use in your git remote command. If left empty, Jenkins will generate unique names for you.
You normally want to specify this when you have multiple remote repositories.
Stringrefspecrefspec
git fetch, which retrieves all the branch heads as remotes/REPOSITORYNAME/BRANCHNAME. This default behaviour is OK for most cases.
In other words, the default refspec is "+refs/heads/*:refs/remotes/REPOSITORYNAME/*" where REPOSITORYNAME is the value you specify in the above "name of repository" textbox.
When do you want to modify this value? A good example is when you want to just retrieve one branch. For example, +refs/heads/master:refs/remotes/origin/master would only retrieve the master branch and nothing else.
The plugin uses a default refspec for its initial fetch, unless the "Advanced Clone Option" is set to honor refspec. This keeps compatibility with previous behavior, and allows the job definition to decide if the refspec should be honored on initial clone.
Multiple refspecs can be entered by separating them with a space character. +refs/heads/master:refs/remotes/origin/master +refs/heads/develop:refs/remotes/origin/develop retrieves the master branch and the develop branch and nothing else.
See the refspec definition in Git user manual for more details.
StringcredentialsIdcredentialsId
Stringbranches
namename
Specify the branches if you'd like to track a specific branch in a repository. If left blank, all branches will be examined for changes and built.
The safest way is to use the refs/heads/<branchName> syntax. This way the expected branch is unambiguous.
If your branch name has a / in it make sure to use the full reference above. When not presented with a full path the plugin will only use the part of the string right of the last slash. Meaning foo/bar will actually match bar.
If you use a wildcard branch specifier, with a slash (e.g. release/), you'll need to specify the origin repository in the branch names to make sure changes are picked up. So e.g. origin/release/
Possible options:
<branchName>refs/heads/<branchName>.master, feature1, ... refs/heads/<branchName>refs/heads/master, refs/heads/feature1/master, ... <remoteRepoName>/<branchName>refs/heads/<branchName>.origin/master remotes/<remoteRepoName>/<branchName>remotes/origin/master refs/remotes/<remoteRepoName>/<branchName>refs/remotes/origin/master <tagName>refs/tags/<tagName> instead.git-2.3.0 refs/tags/<tagName>refs/tags/git-2.3.0 <commitId>5062ac843f2b947733e6a3b105977056821bd352, 5062ac84, ... ${ENV_VARIABLE}${TREEISH}, refs/tags/${TAGNAME}, ... <Wildcards>REPOSITORYNAME/BRANCH. In addition, BRANCH is recognized as a shorthand of */BRANCH, '*' is recognized as a wildcard, and '**' is recognized as wildcard that includes the separator '/'. Therefore, origin/branches* would match origin/branches-foo but not origin/branches/foo, while origin/branches** would match both origin/branches-foo and origin/branches/foo. :<regular expression>:regexp. Regular expression syntax in branches to build will only build those branches whose names match the regular expression.:^(?!(origin/prefix)).*
origin or origin/master or origin/featureorigin/prefix or origin/prefix_123 or origin/prefix-abc:origin/release-\d{8}
origin/release-20150101origin/release-2015010 or origin/release-201501011 or origin/release-20150101-something:^(?!origin/master$|origin/develop$).*
origin/branch1 or origin/branch-2 or origin/master123 or origin/develop-123origin/master or origin/developStringbrowser
$class: 'AssemblaWeb'$class: 'AssemblaWeb'repoUrl
String$class: 'BacklogGitRepositoryBrowser'$class: 'BacklogGitRepositoryBrowser'repoName
StringrepoUrl
StringbitbucketServerbitbucketServerrepoUrl
String$class: 'BitbucketWeb'$class: 'BitbucketWeb'repoUrl
String$class: 'CGit'$class: 'CGit'repoUrl
String$class: 'FisheyeGitRepositoryBrowser'$class: 'FisheyeGitRepositoryBrowser'repoUrl
String$class: 'GitBlitRepositoryBrowser'$class: 'GitBlitRepositoryBrowser'repoUrl
StringprojectName
String$class: 'GitBucketBrowser'$class: 'GitBucketBrowser'url
String$class: 'GitLab'$class: 'GitLab'repoUrl
Stringversion (optional)
String$class: 'GitLabBrowser'$class: 'GitLabBrowser'https://gitLab.example.com then the URL for bob's skunkworks project might be https://gitLab.example.com/bob/skunkworks.
projectUrl
https://gitLab.example.com then the URL for bob's skunkworks project might be https://gitLab.example.com/bob/skunkworks
String$class: 'GitList'$class: 'GitList'repoUrl
String$class: 'GitWeb'$class: 'GitWeb'repoUrl
String$class: 'GiteaBrowser'$class: 'GiteaBrowser'repoUrl
https://gitea.example.com then the URL for bob's skunkworks project repository might be https://gitea.example.com/bob/skunkworks
String$class: 'GithubWeb'$class: 'GithubWeb'repoUrl
String$class: 'Gitiles'$class: 'Gitiles'repoUrl
String$class: 'GitoriousWeb'$class: 'GitoriousWeb'repoUrl
String$class: 'GogsGit'$class: 'GogsGit'repoUrl
String$class: 'KilnGit'$class: 'KilnGit'repoUrl
String$class: 'Phabricator'$class: 'Phabricator'repoUrl
Stringrepo
String$class: 'RedmineWeb'$class: 'RedmineWeb'repoUrl
String$class: 'RhodeCode'$class: 'RhodeCode'repoUrl
String$class: 'ScmManagerGitRepositoryBrowser'$class: 'ScmManagerGitRepositoryBrowser'repoUrl
String$class: 'Stash'$class: 'Stash'repoUrl
String$class: 'TFS2013GitRepositoryBrowser'$class: 'TFS2013GitRepositoryBrowser'repoUrl
If TFS is also used as the repository server, this can usually be left blank.
String$class: 'TracGitRepositoryBrowser'$class: 'TracGitRepositoryBrowser'$class: 'TuleapBrowser'$class: 'TuleapBrowser'repositoryUrl
String$class: 'ViewGitWeb'$class: 'ViewGitWeb'repoUrl
StringprojectName
StringgitTool
Absolute path to the git executable.
This is different from other Jenkins tool definitions. Rather than providing the directory that contains the executable, you must provide the complete path to the executable. Setting '/usr/bin/git' would be correct, while setting '/usr/bin/' is not correct.
Stringextensions
Extensions add new behavior or modify existing plugin behavior for different uses. Extensions help users more precisely tune plugin behavior to meet their needs.
Extensions include:
$class: 'AuthorInChangelog'$class: 'AuthorInChangelog'$class: 'BuildChooserSetting'$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: 'AlternativeBuildChooser'$class: 'AncestryBuildChooser'$class: 'AncestryBuildChooser'maximumAgeInDays
intancestorCommitSha1
String$class: 'DefaultBuildChooser'$class: 'DefaultBuildChooser'$class: 'DeflakeGitBuildChooser'$class: 'DeflakeGitBuildChooser'$class: 'GerritTriggerBuildChooser'$class: 'GerritTriggerBuildChooser'$class: 'InverseBuildChooser'$class: 'InverseBuildChooser'$class: 'BuildSingleRevisionOnly'$class: 'BuildSingleRevisionOnly'$class: 'ChangelogToBranch'$class: 'ChangelogToBranch'options
compareRemotecompareRemote
origin, that contains the branch you specify below.
StringcompareTargetcompareTarget
String$class: 'CheckoutOption'$class: 'CheckoutOption'timeout
int$class: 'CleanBeforeCheckout'$class: '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 (optional)
.git directories.
boolean$class: 'CleanCheckout'$class: 'CleanCheckout'.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 (optional)
.git directories.
boolean$class: 'CloneOption'$class: 'CloneOption'shallow
booleannoTags
booleanreference
Stringtimeout
intdepth (optional)
inthonorRefspec (optional)
boolean$class: 'CodeCommitURLHelper'$class: 'CodeCommitURLHelper'credentialId
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.
StringrepositoryName
String$class: 'DisableRemotePoll'$class: 'DisableRemotePoll'$class: 'ExcludeFromChangeSet'$class: 'ExcludeFromChangeSet'$class: 'ExcludeFromPoll'$class: 'ExcludeFromPoll'$class: 'GitLFSPull'$class: 'GitLFSPull'$class: 'GitSCMChecksExtension'$class: 'GitSCMChecksExtension'verboseConsoleLog (optional)
boolean$class: 'GitSCMStatusChecksExtension'$class: 'GitSCMStatusChecksExtension'name (optional)
Stringskip (optional)
booleanskipProgressUpdates (optional)
booleansuppressLogs (optional)
booleanunstableBuildNeutral (optional)
boolean$class: 'GitTagMessageExtension'$class: 'GitTagMessageExtension'useMostRecentTag (optional)
boolean$class: 'IgnoreNotifyCommit'$class: 'IgnoreNotifyCommit'$class: 'LocalBranch'$class: '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'$class: 'MessageExclusion'excludedMessage
.*\[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.
String$class: 'PathRestriction'$class: 'PathRestriction'includedRegions
myapp/src/main/web/.*\.html
myapp/src/main/web/.*\.jpeg
myapp/src/main/web/.*\.gif
The 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.
StringexcludedRegions
myapp/src/main/web/.*\.html
myapp/src/main/web/.*\.jpeg
myapp/src/main/web/.*\.gif
The example above illustrates that if only html/jpeg/gif files have been committed to the SCM a build will not occur.
String$class: 'PerBuildTag'$class: 'PerBuildTag'$class: 'PreBuildMerge'$class: 'PreBuildMerge'options
mergeTargetmergeTarget
master.
StringfastForwardModefastForwardMode (optional)
FF, FF_ONLY, NO_FFmergeRemotemergeRemote (optional)
origin, that contains the branch you specify below. If left blank, it'll default to the name of the first repository configured above.
StringmergeStrategymergeStrategy (optional)
DEFAULT, RESOLVE, RECURSIVE, OCTOPUS, OURS, SUBTREE, RECURSIVE_THEIRSpretestedIntegrationpretestedIntegrationgitIntegrationStrategy
accumulatedaccumulatedsquashsquashintegrationBranch
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>
StringrepoName
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
String$class: 'PruneStaleBranch'$class: 'PruneStaleBranch'pruneTagspruneTagspruneTags
boolean$class: 'RelativeTargetDirectory'$class: 'RelativeTargetDirectory'relativeTargetDir
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.
String$class: 'ScmName'$class: 'ScmName'Unique name for this SCM. Needed when using Git within the Multi SCM plugin.
name
String$class: 'SparseCheckoutPaths'$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
pathpath
String$class: 'SubmoduleOption'$class: 'SubmoduleOption'disableSubmodules
booleanrecursiveSubmodules
booleantrackingSubmodules
booleanreference
git init --bare git remote add SubProject1 https://gitrepo.com/subproject1 git remote add SubProject2 https://gitrepo.com/subproject2 git fetch --all
Stringtimeout
intparentCredentials
booleandepth (optional)
intshallow (optional)
booleanthreads (optional)
int$class: 'UserExclusion'$class: 'UserExclusion'excludedUsers
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.
String$class: 'UserIdentity'$class: 'UserIdentity'name
If given, "GIT_COMMITTER_NAME=[this]" and "GIT_AUTHOR_NAME=[this]" are set for builds. This overrides whatever is in the global settings.
Stringemail
If given, "GIT_COMMITTER_EMAIL=[this]" and "GIT_AUTHOR_EMAIL=[this]" are set for builds. This overrides whatever is in the global settings.
String$class: 'WipeWorkspace'$class: 'WipeWorkspace'doGenerateSubmoduleConfigurations (optional)
Removed facility that was intended to test combinations of git submodule versions. Removed in git plugin 4.6.0. Ignores the user provided value and always uses false as its value.
booleansubmoduleCfg (optional)
Removed facility that was intended to test combinations of git submodule versions. Removed in git plugin 4.6.0. Ignores the user provided value(s) and always uses empty values.
submoduleNamesubmoduleName
Removed in git plugin 4.6.0.
Stringbranchesbranches
Removed in git plugin 4.6.0.
String$class: 'HarvestSCM'$class: 'HarvestSCM'broker
StringpasswordFile
StringuserId
Stringpassword
StringprojectName
Stringstate
StringviewPath
StringclientPath
StringprocessName
StringrecursiveSearch
StringuseSynchronize
booleanextraOptions
String$class: 'IntegritySCM'$class: 'IntegritySCM'serverConfig
StringconfigPath
StringconfigurationName
StringCPBasedMode (optional)
booleanalternateWorkspace (optional)
Stringbrowser (optional)
$class: 'IntegrityWebUI'$class: 'IntegrityWebUI'url
StringcheckoutThreadPoolSize (optional)
intcheckoutThreadTimeout (optional)
intcheckpointBeforeBuild (optional)
booleancheckpointLabel (optional)
StringcleanCopy (optional)
booleandeleteNonMembers (optional)
booleanexcludeList (optional)
StringfetchChangedWorkspaceFiles (optional)
booleanincludeList (optional)
StringlineTerminator (optional)
StringlocalClient (optional)
booleanpassword (optional)
StringrestoreTimestamp (optional)
booleansandboxScope (optional)
StringskipAuthorInfo (optional)
booleanuserName (optional)
String$class: 'IspwConfiguration'$class: 'IspwConfiguration'connectionId
StringcredentialsId
StringserverConfig
StringserverStream
StringserverApplication
StringserverLevel
StringlevelOption
StringcomponentType
StringfolderName
StringispwDownloadAll
booleantargetFolder
StringispwDownloadIncl
booleanispwDownloadWithCompileOnly
boolean$class: 'IspwContainerConfiguration'$class: 'IspwContainerConfiguration'connectionId
StringcredentialsId
StringserverConfig
StringcontainerName
StringcontainerType
StringserverLevel
StringcomponentType
StringispwDownloadAll
booleantargetFolder
StringispwDownloadIncl
boolean$class: 'MercurialSCM'$class: 'MercurialSCM'source
Stringbrowser (optional)
$class: 'FishEye'$class: 'FishEye'url
String$class: 'GoogleCode'$class: 'GoogleCode'url
String$class: 'HgWeb'$class: 'HgWeb'url
String$class: 'Kallithea'$class: 'Kallithea'url
String$class: 'KilnHG'$class: 'KilnHG'url
String$class: 'RhodeCode'$class: 'RhodeCode'url
String$class: 'RhodeCodeLegacy'$class: 'RhodeCodeLegacy'url
String$class: 'ScmManager'$class: 'ScmManager'url
http://YOURSCMMANAGER/scm/repo/NAMESPACE/NAME/).
Stringclean (optional)
booleancredentialsId (optional)
StringdisableChangeLog (optional)
booleaninstallation (optional)
Stringmodules (optional)
Stringrevision (optional)
default branch.)
StringrevisionType (optional)
BRANCH, TAG, CHANGESET, REVSETsubdir (optional)
my/sources (use forward slashes). If changing this entry, you probably want to clean the workspace first.
String$class: 'MergeBotUpdater'$class: 'MergeBotUpdater'$class: 'MultiSCM'$class: 'MultiSCM'scmList
$class: 'AWSCodePipelineSCM'$class: 'AWSCodePipelineSCM'name
StringclearWorkspace
booleanregion
StringawsAccessKey
In order to integrate with AWS CodePipeline, you must authorize access to the pipeline and its related artifacts. If you installed Jenkins on a supported Amazon EC2 instance type, such as Amazon Linux, you can install the AWS CLI and configure a profile with the required credentials. This is the preferred method. In all other cases, you can store AWS credentials in these fields. You should securely configure your Jenkins instance to use HTTPS so that these credentials are not sent unencrypted. For more information, see AWS CodePipeline Integration for Other Products and Services.
StringawsSecretKey
>In order to integrate with AWS CodePipeline, you must authorize access to the pipeline and its related artifacts. If you installed Jenkins on a supported Amazon EC2 instance type, such as Amazon Linux, you can install the AWS CLI and configure a profile with the required credentials. This is the preferred method. In all other cases, you can store AWS credentials in these fields. You should securely configure your Jenkins instance to use HTTPS so that these credentials are not sent unencrypted. For more information, see AWS CodePipeline Integration for Other Products and Services.
StringproxyHost
You might need a proxy host address if you are hosting Jenkins on a private network. The proxy name can be an IP address or DNS address. The AWS CodePipeline Plugin for Jenkins requires internet access. If access is not configured, you might see errors in the AWS CodePipeline Polling Log.
StringproxyPort
You might need a proxy port for your proxy host address if you are hosting Jenkins on a private network. The proxy port is a number, might be on port 8080, 3128, or 8443, depending on your network protocols and security settings. If access is not configured, you might see errors in the AWS CodePipeline Polling Log.
Stringcategory
This is the category of the action type in AWS CodePipeline, and is usually either Build or Test. To see an example usage, see Install and Configure the AWS CodePipeline Plugin for Jenkins.
Stringprovider
This is the provider name of the action type in AWS CodePipeline. You must provide this exact string when adding an action for Jenkins in AWS CodePipeline. To see an example usage, see Install and Configure the AWS CodePipeline Plugin for Jenkins.
Stringversion
Leave the default as 1.
Stringaccurevaccurevdepot
Stringstream
StringserverName (optional)
StringserverUUID (optional)
StringwspaceORreftree (optional)
StringaccurevTool (optional)
Stringcleanreftree (optional)
booleandirectoryOffset (optional)
StringdontPopContent (optional)
booleanfilterForPollSCM (optional)
StringignoreStreamParent (optional)
booleanreftree (optional)
StringsnapshotNameFormat (optional)
StringsubPath (optional)
StringsubPathOnly (optional)
booleansynctime (optional)
booleanuseSnapshot (optional)
booleanworkspace (optional)
String$class: 'BazaarSCM'$class: 'BazaarSCM'source
Stringcleantree
booleanbrowser
$class: 'Loggerhead'$class: 'Loggerhead'url
String$class: 'OpenGrok'$class: 'OpenGrok'url
StringrootModule
Stringcheckout
boolean$class: 'BitKeeperSCM'$class: 'BitKeeperSCM'parent
StringlocalRepository
StringusePull
booleanquiet
booleanBbSBbSid
Stringbranches
namename
Specify the branches if you'd like to track a specific branch in a repository. If left blank, all branches will be examined for changes and built.
The safest way is to use the refs/heads/<branchName> syntax. This way the expected branch is unambiguous.
If your branch name has a / in it make sure to use the full reference above. When not presented with a full path the plugin will only use the part of the string right of the last slash. Meaning foo/bar will actually match bar.
If you use a wildcard branch specifier, with a slash (e.g. release/), you'll need to specify the origin repository in the branch names to make sure changes are picked up. So e.g. origin/release/
Possible options:
<branchName>refs/heads/<branchName>.master, feature1, ... refs/heads/<branchName>refs/heads/master, refs/heads/feature1/master, ... <remoteRepoName>/<branchName>refs/heads/<branchName>.origin/master remotes/<remoteRepoName>/<branchName>remotes/origin/master refs/remotes/<remoteRepoName>/<branchName>refs/remotes/origin/master <tagName>refs/tags/<tagName> instead.git-2.3.0 refs/tags/<tagName>refs/tags/git-2.3.0 <commitId>5062ac843f2b947733e6a3b105977056821bd352, 5062ac84, ... ${ENV_VARIABLE}${TREEISH}, refs/tags/${TAGNAME}, ... <Wildcards>REPOSITORYNAME/BRANCH. In addition, BRANCH is recognized as a shorthand of */BRANCH, '*' is recognized as a wildcard, and '**' is recognized as wildcard that includes the separator '/'. Therefore, origin/branches* would match origin/branches-foo but not origin/branches/foo, while origin/branches** would match both origin/branches-foo and origin/branches/foo. :<regular expression>:regexp. Regular expression syntax in branches to build will only build those branches whose names match the regular expression.:^(?!(origin/prefix)).*
origin or origin/master or origin/featureorigin/prefix or origin/prefix_123 or origin/prefix-abc:origin/release-\d{8}
origin/release-20150101origin/release-2015010 or origin/release-201501011 or origin/release-20150101-something:^(?!origin/master$|origin/develop$).*
origin/branch1 or origin/branch-2 or origin/master123 or origin/develop-123origin/master or origin/developStringcredentialsId
When running a job, Jenkins requires credentials to authenticate with Bitbucket Server. For example, to checkout the source code for builds. To do this, it needs credentials with access to the projects and repositories you want it to build from.
You can provide Jenkins with credentials here by:
In addition, you can provide Jenkins with SSH credentials below. If you do, Jenkins will use them for clone operations instead of the credentials you select here.
StringsshCredentialsId
If specified, Jenkins will use these credentials to check out the source code for builds. If no SSH credentials are specified, Jenkins will use the basic credentials instead.
To provide Jenkins with SSH credentials, you can:
Stringextensions
$class: 'AuthorInChangelog'$class: 'AuthorInChangelog'$class: 'BuildChooserSetting'$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: 'AlternativeBuildChooser'$class: 'AncestryBuildChooser'$class: 'AncestryBuildChooser'maximumAgeInDays
intancestorCommitSha1
String$class: 'DefaultBuildChooser'$class: 'DefaultBuildChooser'$class: 'DeflakeGitBuildChooser'$class: 'DeflakeGitBuildChooser'$class: 'GerritTriggerBuildChooser'$class: 'GerritTriggerBuildChooser'$class: 'InverseBuildChooser'$class: 'InverseBuildChooser'$class: 'BuildSingleRevisionOnly'$class: 'BuildSingleRevisionOnly'$class: 'ChangelogToBranch'$class: 'ChangelogToBranch'options
compareRemotecompareRemote
origin, that contains the branch you specify below.
StringcompareTargetcompareTarget
String$class: 'CheckoutOption'$class: 'CheckoutOption'timeout
int$class: 'CleanBeforeCheckout'$class: '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 (optional)
.git directories.
boolean$class: 'CleanCheckout'$class: 'CleanCheckout'.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 (optional)
.git directories.
boolean$class: 'CloneOption'$class: 'CloneOption'shallow
booleannoTags
booleanreference
Stringtimeout
intdepth (optional)
inthonorRefspec (optional)
boolean$class: 'CodeCommitURLHelper'$class: 'CodeCommitURLHelper'credentialId
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.
StringrepositoryName
String$class: 'DisableRemotePoll'$class: 'DisableRemotePoll'$class: 'ExcludeFromChangeSet'$class: 'ExcludeFromChangeSet'$class: 'ExcludeFromPoll'$class: 'ExcludeFromPoll'$class: 'GitLFSPull'$class: 'GitLFSPull'$class: 'GitSCMChecksExtension'$class: 'GitSCMChecksExtension'verboseConsoleLog (optional)
boolean$class: 'GitSCMStatusChecksExtension'$class: 'GitSCMStatusChecksExtension'name (optional)
Stringskip (optional)
booleanskipProgressUpdates (optional)
booleansuppressLogs (optional)
booleanunstableBuildNeutral (optional)
boolean$class: 'GitTagMessageExtension'$class: 'GitTagMessageExtension'useMostRecentTag (optional)
boolean$class: 'IgnoreNotifyCommit'$class: 'IgnoreNotifyCommit'$class: 'LocalBranch'$class: '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'$class: 'MessageExclusion'excludedMessage
.*\[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.
String$class: 'PathRestriction'$class: 'PathRestriction'includedRegions
myapp/src/main/web/.*\.html
myapp/src/main/web/.*\.jpeg
myapp/src/main/web/.*\.gif
The 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.
StringexcludedRegions
myapp/src/main/web/.*\.html
myapp/src/main/web/.*\.jpeg
myapp/src/main/web/.*\.gif
The example above illustrates that if only html/jpeg/gif files have been committed to the SCM a build will not occur.
String$class: 'PerBuildTag'$class: 'PerBuildTag'$class: 'PreBuildMerge'$class: 'PreBuildMerge'options
mergeTargetmergeTarget
master.
StringfastForwardModefastForwardMode (optional)
FF, FF_ONLY, NO_FFmergeRemotemergeRemote (optional)
origin, that contains the branch you specify below. If left blank, it'll default to the name of the first repository configured above.
StringmergeStrategymergeStrategy (optional)
DEFAULT, RESOLVE, RECURSIVE, OCTOPUS, OURS, SUBTREE, RECURSIVE_THEIRSpretestedIntegrationpretestedIntegrationgitIntegrationStrategy
accumulatedaccumulatedsquashsquashintegrationBranch
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>
StringrepoName
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
String$class: 'PruneStaleBranch'$class: 'PruneStaleBranch'pruneTagspruneTagspruneTags
boolean$class: 'RelativeTargetDirectory'$class: 'RelativeTargetDirectory'relativeTargetDir
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.
String$class: 'ScmName'$class: 'ScmName'Unique name for this SCM. Needed when using Git within the Multi SCM plugin.
name
String$class: 'SparseCheckoutPaths'$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
pathpath
String$class: 'SubmoduleOption'$class: 'SubmoduleOption'disableSubmodules
booleanrecursiveSubmodules
booleantrackingSubmodules
booleanreference
git init --bare git remote add SubProject1 https://gitrepo.com/subproject1 git remote add SubProject2 https://gitrepo.com/subproject2 git fetch --all
Stringtimeout
intparentCredentials
booleandepth (optional)
intshallow (optional)
booleanthreads (optional)
int$class: 'UserExclusion'$class: 'UserExclusion'excludedUsers
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.
String$class: 'UserIdentity'$class: 'UserIdentity'name
If given, "GIT_COMMITTER_NAME=[this]" and "GIT_AUTHOR_NAME=[this]" are set for builds. This overrides whatever is in the global settings.
Stringemail
If given, "GIT_COMMITTER_EMAIL=[this]" and "GIT_AUTHOR_EMAIL=[this]" are set for builds. This overrides whatever is in the global settings.
String$class: 'WipeWorkspace'$class: 'WipeWorkspace'gitTool
StringprojectName
Enter the name of the Bitbucket Server project containing the repository you want Jenkins to build from. To find a project, start typing. If it doesn't appear in the search results, the credentials that you've chosen may not have read access to it and you'll need to provide different credentials.
To get Jenkins to build from a personal repository, enter a tilde (~) followed by repository owner's username. For example, ~jsmith.
StringrepositoryName
Enter the Bitbucket Server repository you want Jenkins to build from. To find a repository, start typing. If it doesn't appear in the search results, the credentials that you've chosen may not have read access to it and you'll need to provide different credentials.
To get Jenkins to build from a personal repository, enter its slug. This is the URL-friendly version of the repository name. For example, a repository called my example repo will have the slug my-example-repo, and you can see this in its URL, https://bitbucketserver.mycompany.com/myproject/my-example-repo.
StringserverId
Choose the Bitbucket Server instance containing the repository you want Jenkins to build from. If you can't find your instance, check this plugin's configuration and try again.
StringmirrorName
Choose the location that Jenkins should clone from when running this build. This can be the primary server or a mirror if one is available. To see available mirrors, first choose a Bitbucket Server project and repository.
String$class: 'BlameSubversionSCM'$class: 'BlameSubversionSCM'if it is false and the build is not triggered by upstream job,
the plugin will not collect any svn info from upstream job.
else the plugin will collect svn info from latest upstream job
alwaysCollectSVNInfo
boolean$class: 'CCUCMScm'$class: 'CCUCMScm'loadModule
Stringnewest
booleanmode
$class: 'PollChildMode'$class: 'PollChildMode'levelToPoll
Stringcomponent (optional)
StringcreateBaseline (optional)
Check this if you want create a baseline after a completed deliver.
This is only applicable for child and sibling poll mode.
booleannewest (optional)
boolean$class: 'PollRebaseMode'$class: 'PollRebaseMode'levelToPoll
Stringcomponent (optional)
StringcreateBaseline (optional)
booleanexcludeList (optional)
String$class: 'PollSelfMode'$class: 'PollSelfMode'levelToPoll
Stringcomponent (optional)
Stringnewest (optional)
boolean$class: 'PollSiblingMode'$class: 'PollSiblingMode'levelToPoll
Stringcomponent (optional)
StringcreateBaseline (optional)
Check this if you want create a baseline after a completed deliver.
This is only applicable for child and sibling poll mode.
booleannewest (optional)
booleanuseHyperLinkForPolling (optional)
boolean$class: 'PollSubscribeMode'$class: 'PollSubscribeMode'levelToPoll
StringcomponentsToMonitor
componentSelectioncomponentSelection
StringjobsToMonitor
jobnamejobname
Stringignoresignores
StringjobNamejobName (optional)
StringcascadePromotion (optional)
booleancomponent (optional)
Stringnewest (optional)
booleanstream
StringtreatUnstable
StringnameTemplate
StringforceDeliver
booleanrecommend
booleanmakeTag
booleansetDescription
booleanbuildProject
StringremoveViewPrivateFiles
booleantrimmedChangeSet
booleandiscard
boolean$class: 'CVSSCM'$class: 'CVSSCM'repositories
cvsRootcvsRoot
StringpasswordRequiredpasswordRequired
booleanpasswordpassword
StringrepositoryItemsrepositoryItems
locationlocation
$class: 'BranchRepositoryLocation'$class: 'BranchRepositoryLocation'branchName
StringuseHeadIfNotFound
boolean$class: 'HeadRepositoryLocation'$class: 'HeadRepositoryLocation'$class: 'TagRepositoryLocation'$class: 'TagRepositoryLocation'tagName
StringuseHeadIfNotFound
booleanmodulesmodules
remoteNameremoteName
StringlocalNamelocalName
StringprojectsetFileNameprojectsetFileName
StringexcludedRegionsexcludedRegions
src/main/web/.*\.html src/main/web/.*\.jpeg 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. More information on regular expressions can be found here.
patternpattern
StringcompressionLevelcompressionLevel
intrepositoryBrowserrepositoryBrowser
$class: 'FishEyeCVS'$class: 'FishEyeCVS'url
String$class: 'OpenGrok'$class: 'OpenGrok'url
String$class: 'ViewCVS'$class: 'ViewCVS'url
StringcanUseUpdate
booleanlegacy
If you have multiple modules to check out, this option is forced (otherwise they'll overlap.)
This affects other path specifiers, such as artifact archivers --- you now specify "build/foo.jar" instead of "foo/build/foo.jar".
booleanskipChangeLog
booleanpruneEmptyDirectories
booleandisableCvsQuiet
booleancleanOnFailedUpdate
booleanforceCleanCopy
booleancheckoutCurrentTimestamp
The build quiet period is designed to assist with CVS checkouts by waiting for a specific period of time without commits. Normally you want the checkout to reflect the time when the quiet period was exited successfully. Select this option if you need to re-enable the legacy behaviour of Jenkins, i.e. using the time that the build started checking out as the timestamp for the checkout operation. Note: enabling this option can result in the quiet period being defeated especially in those cases where the build is not able to start immediately after exiting the quiet period.
boolean$class: 'ClearCaseSCM'$class: 'ClearCaseSCM'branch
Stringlabel
StringextractConfigSpec
booleanconfigSpecFileName
StringrefreshConfigSpec
booleanrefreshConfigSpecCommand
StringconfigSpec
StringviewTag
Stringuseupdate
booleanextractLoadRules
booleanloadRules
StringuseOtherLoadRulesForPolling
booleanloadRulesForPolling
Stringusedynamicview
booleanviewdrive
Stringmkviewoptionalparam
StringfilterOutDestroySubBranchEvent
booleandoNotUpdateConfigSpec
booleanrmviewonrename
booleanexcludedRegions
StringmultiSitePollBuffer
StringuseTimeRule
booleancreateDynView
booleanviewPath
Stringchangeset
ALL, BRANCH, NONE, UPDTviewStorage
Three strategies are currently available to manage view storage location.
$class: 'DefaultViewStorage'$class: 'DefaultViewStorage'$class: 'ServerViewStorage'$class: 'ServerViewStorage'assignedLabelString
Label expression used to populate view storage location dropdown.
Stringserver
The view storage location that will be passed to the -stgloc option.
The list of available servers is retrieved using cleartool lsstgloc -view
Note that auto is always available.
String$class: 'SpecificViewStorage'$class: 'SpecificViewStorage'winStorageDir
StringunixStorageDir
String$class: 'ClearCaseUcmBaselineSCM'$class: 'ClearCaseUcmBaselineSCM'$class: 'ClearCaseUcmSCM'$class: 'ClearCaseUcmSCM'stream
Stringloadrules
StringviewTag
Stringusedynamicview
booleanviewdrive
Stringmkviewoptionalparam
StringfilterOutDestroySubBranchEvent
booleanuseUpdate
booleanrmviewonrename
booleanexcludedRegions
StringmultiSitePollBuffer
StringoverrideBranchName
StringcreateDynView
booleanfreezeCode
booleanrecreateView
booleanallocateViewName
booleanviewPath
StringuseManualLoadRules
booleanchangeset
ALL, BRANCH, NONE, UPDTviewStorage
Three strategies are currently available to manage view storage location.
$class: 'DefaultViewStorage'$class: 'DefaultViewStorage'$class: 'ServerViewStorage'$class: 'ServerViewStorage'assignedLabelString
Label expression used to populate view storage location dropdown.
Stringserver
The view storage location that will be passed to the -stgloc option.
The list of available servers is retrieved using cleartool lsstgloc -view
Note that auto is always available.
String$class: 'SpecificViewStorage'$class: 'SpecificViewStorage'winStorageDir
StringunixStorageDir
StringbuildFoundationBaseline
If checked, instead of creating a view on the current stream, the job will look up the current foundation baselines for the given stream and work in readonly on these baselines. If polling is enabled, the build will be triggered every time a new foundation baseline is detected on the given stream.
boolean$class: 'CloneWorkspaceSCM'$class: 'CloneWorkspaceSCM'parentJobName
Stringcriteria
String$class: 'CmvcSCM'$class: 'CmvcSCM'family
Stringbecome
Stringreleases
StringcheckoutScript
StringtrackViewReportWhereClause
String$class: 'ConfigurationRotator'$class: 'ConfigurationRotator'acrs
$class: 'ClearCaseUCM'$class: 'ClearCaseUCM'pvobName
Stringcontribute
Contribute data to a global database. Defined in the Compatibility Action Storage Plugin.
booleantargets
baselineNamebaselineName
Stringlevellevel
INITIAL, BUILT, TESTED, RELEASED, REJECTEDfixedfixed
booleanuseNewest (optional)
boolean$class: 'Git'$class: 'Git'targets
namename
Stringrepositoryrepository
Stringbranchbranch
StringcommitIdcommitId
Stringfixedfixed
booleanuseNewest (optional)
boolean$class: 'CvsProjectset'$class: 'CvsProjectset'repositories
cvsRootcvsRoot
StringpasswordRequiredpasswordRequired
booleanpasswordpassword
StringrepositoryItemsrepositoryItems
locationlocation
$class: 'BranchRepositoryLocation'$class: 'BranchRepositoryLocation'branchName
StringuseHeadIfNotFound
boolean$class: 'HeadRepositoryLocation'$class: 'HeadRepositoryLocation'$class: 'TagRepositoryLocation'$class: 'TagRepositoryLocation'tagName
StringuseHeadIfNotFound
booleanmodulesmodules
remoteNameremoteName
StringlocalNamelocalName
StringprojectsetFileNameprojectsetFileName
StringexcludedRegionsexcludedRegions
src/main/web/.*\.html src/main/web/.*\.jpeg 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. More information on regular expressions can be found here.
patternpattern
StringcompressionLevelcompressionLevel
intrepositoryBrowserrepositoryBrowser
$class: 'FishEyeCVS'$class: 'FishEyeCVS'url
String$class: 'OpenGrok'$class: 'OpenGrok'url
String$class: 'ViewCVS'$class: 'ViewCVS'url
StringcanUseUpdate
booleanusername
Stringpassword
Stringbrowser
$class: 'FishEyeCVS'$class: 'FishEyeCVS'url
String$class: 'OpenGrok'$class: 'OpenGrok'url
String$class: 'ViewCVS'$class: 'ViewCVS'url
StringskipChangeLog
booleanpruneEmptyDirectories
booleandisableCvsQuiet
booleancleanOnFailedUpdate
booleanforceCleanCopy
boolean$class: 'DarcsScm'$class: 'DarcsScm'source
StringlocalDir
Stringclean
booleanbrowser
$class: 'DarcsWeb'$class: 'DarcsWeb'url
Stringrepo
String$class: 'Darcsden'$class: 'Darcsden'url
String$class: 'DimensionsSCM'$class: 'DimensionsSCM'project
StringcredentialsType
StringuserName
Stringpassword
StringpluginServer
StringuserServer
StringkeystoreServer
StringpluginDatabase
StringuserDatabase
StringkeystoreDatabase
StringkeystorePath
StringcertificateAlias
StringcredentialsId
StringcertificatePassword
StringkeystorePassword
StringcertificatePath
StringremoteCertificatePassword
StringsecureAgentAuth
booleancanJobDelete (optional)
booleancanJobExpand (optional)
booleancanJobForce (optional)
booleancanJobNoMetadata (optional)
booleancanJobNoTouch (optional)
booleancanJobRevert (optional)
booleancanJobUpdate (optional)
booleaneol (optional)
Stringfolders (optional)
valuevalue
StringpathsToExclude (optional)
valuevalue
Stringpermissions (optional)
StringtimeZone (optional)
StringwebUrl (optional)
String$class: 'DrushMakefileSCM'$class: 'DrushMakefileSCM'makefile
Specify the content of the Makefile. Support for YAML Makefiles depends on the version of Drush you have installed.
This example will generate a vanilla Drupal 7.38:
api=2
core=7.x
projects[drupal][version]=7.38
Stringroot
String$class: 'EndevorConfiguration'$class: 'EndevorConfiguration'connectionId
StringfilterPattern
StringfileExtension
StringcredentialsId
StringtargetFolder
Stringfilesystemfilesystempath
The file path for the source code.
e.g. \\Server1\project1\src or c:\myproject\src
Note for distributed build environment, please make sure the path is accessible on remote node(s)
StringclearWorkspace
If true, the system will delete all existing files/sub-folders in workspace before checking-out. Poll changes will not be affected by this setting.
booleancopyHidden
If true, the system will copy hidden files and folders as well. Default is false.
booleanfilterSettings
includeFilterincludeFilter
booleanselectorsselectors
You can apply wildcard filter(s) when detecting changes and copying files. By default, the system will filter out hidden files, on Unix, that means files/folder starting with ".", on Windows, that means files/folders with "hidden" attribute. You may want to filter out, e.g. files with ".tmp" extension.
Note: filters are applied on both sides, source and destination (i.e. the workspace). E.g. if you filter out ".tmp" files, all ".tmp" files currently in workspace will not be removed.
wildcardwildcard
ANT style wildcard.
To include just *.java, set filter type to "Include" and type add "*.java" (without quote) in the wildcard. To exclude *.exe" and all JUnit test cases, set filter type to "Exclude" and add two wildcard, one for "*.dll" and one for "*Test*"
To exclude a directory, set filter to "**/dir_to_exclude/**"
Note: (1) the wildcard is case insensitive, (2) all backslashes (\) will be replaced with slashes (/)
String$class: 'FeatureBranchAwareMercurialSCM'$class: 'FeatureBranchAwareMercurialSCM'installation
Stringsource
Stringbranch
Stringmodules
Stringsubdir
my/sources (use forward slashes). If changing this entry, you probably want to clean the workspace first.
Stringbrowser
$class: 'FishEye'$class: 'FishEye'url
String$class: 'GoogleCode'$class: 'GoogleCode'url
String$class: 'HgWeb'$class: 'HgWeb'url
String$class: 'Kallithea'$class: 'Kallithea'url
String$class: 'KilnHG'$class: 'KilnHG'url
String$class: 'RhodeCode'$class: 'RhodeCode'url
String$class: 'RhodeCodeLegacy'$class: 'RhodeCodeLegacy'url
String$class: 'ScmManager'$class: 'ScmManager'url
http://YOURSCMMANAGER/scm/repo/NAMESPACE/NAME/).
Stringclean
booleanbranchPattern
String$class: 'GeneXusServerSCM'$class: 'GeneXusServerSCM'gxInstallationId
StringserverURL
StringcredentialsId
Credentials to use when authenticating to the GeneXus Server.
Select the credentials you want to use or click "Add" to enter a new user/password pair.
StringkbName
StringkbVersion
Name of the Version that will be selected when creating a local copy of the Knowledge Base.
If you leave it blank the 'Trunk' version will be selected by default.
StringlocalKbPath
Path to the local Knowledge Base to use as working copy.
If you leave it blank the default ${WORKSPACE}\KBname will apply.
StringlocalKbVersion
Name of the Version in the local Knowledge Base that is linked to the Version in the server.
If you leave it blank the 'Trunk' version will be selected by default.
StringkbDbServerInstance
StringkbDbCredentialsId
Credentials to use when to connecting to SQL Server.
Select "none" for Windows Authentication.
StringkbDbName
Name of the SQL Server database used for the local Knowledge Base.
Leave it blank to use the default database name.
StringkbDbInSameFolder
Create the database files in the same folder as the Knowledge Base when checking out. Default is 'true'.
If kbDbInSameFolder is true or not set, then the database files will be created in the same folder as the Knowledge Base. If kbDbInSameFolder is false, then the database files will be created in the default folder configured for the SQL Server at kbDbServerInstance (optional).
boolean$class: 'GitSCM'$class: 'GitSCM'The git plugin provides fundamental git operations for Jenkins projects. It can poll, fetch, checkout, and merge contents of git repositories.
The git plugin provides an SCM implementation to be used with the Pipeline SCM checkout step. The Pipeline Syntax Snippet Generator guides the user to select git plugin checkout options and provides online help for each of the options.
userRemoteConfigs
${SUPER_PROJECT_URL}/${SUBMODULE}, rather than relying on information from .gitmodules.urlurl
git clone command.
Stringnamename
origin, to uniquely identify this repository among other remote repositories. This is the same "name" that you use in your git remote command. If left empty, Jenkins will generate unique names for you.
You normally want to specify this when you have multiple remote repositories.
Stringrefspecrefspec
git fetch, which retrieves all the branch heads as remotes/REPOSITORYNAME/BRANCHNAME. This default behaviour is OK for most cases.
In other words, the default refspec is "+refs/heads/*:refs/remotes/REPOSITORYNAME/*" where REPOSITORYNAME is the value you specify in the above "name of repository" textbox.
When do you want to modify this value? A good example is when you want to just retrieve one branch. For example, +refs/heads/master:refs/remotes/origin/master would only retrieve the master branch and nothing else.
The plugin uses a default refspec for its initial fetch, unless the "Advanced Clone Option" is set to honor refspec. This keeps compatibility with previous behavior, and allows the job definition to decide if the refspec should be honored on initial clone.
Multiple refspecs can be entered by separating them with a space character. +refs/heads/master:refs/remotes/origin/master +refs/heads/develop:refs/remotes/origin/develop retrieves the master branch and the develop branch and nothing else.
See the refspec definition in Git user manual for more details.
StringcredentialsIdcredentialsId
Stringbranches
namename
Specify the branches if you'd like to track a specific branch in a repository. If left blank, all branches will be examined for changes and built.
The safest way is to use the refs/heads/<branchName> syntax. This way the expected branch is unambiguous.
If your branch name has a / in it make sure to use the full reference above. When not presented with a full path the plugin will only use the part of the string right of the last slash. Meaning foo/bar will actually match bar.
If you use a wildcard branch specifier, with a slash (e.g. release/), you'll need to specify the origin repository in the branch names to make sure changes are picked up. So e.g. origin/release/
Possible options:
<branchName>refs/heads/<branchName>.master, feature1, ... refs/heads/<branchName>refs/heads/master, refs/heads/feature1/master, ... <remoteRepoName>/<branchName>refs/heads/<branchName>.origin/master remotes/<remoteRepoName>/<branchName>remotes/origin/master refs/remotes/<remoteRepoName>/<branchName>refs/remotes/origin/master <tagName>refs/tags/<tagName> instead.git-2.3.0 refs/tags/<tagName>refs/tags/git-2.3.0 <commitId>5062ac843f2b947733e6a3b105977056821bd352, 5062ac84, ... ${ENV_VARIABLE}${TREEISH}, refs/tags/${TAGNAME}, ... <Wildcards>REPOSITORYNAME/BRANCH. In addition, BRANCH is recognized as a shorthand of */BRANCH, '*' is recognized as a wildcard, and '**' is recognized as wildcard that includes the separator '/'. Therefore, origin/branches* would match origin/branches-foo but not origin/branches/foo, while origin/branches** would match both origin/branches-foo and origin/branches/foo. :<regular expression>:regexp. Regular expression syntax in branches to build will only build those branches whose names match the regular expression.:^(?!(origin/prefix)).*
origin or origin/master or origin/featureorigin/prefix or origin/prefix_123 or origin/prefix-abc:origin/release-\d{8}
origin/release-20150101origin/release-2015010 or origin/release-201501011 or origin/release-20150101-something:^(?!origin/master$|origin/develop$).*
origin/branch1 or origin/branch-2 or origin/master123 or origin/develop-123origin/master or origin/developStringbrowser
$class: 'AssemblaWeb'$class: 'AssemblaWeb'repoUrl
String$class: 'BacklogGitRepositoryBrowser'$class: 'BacklogGitRepositoryBrowser'repoName
StringrepoUrl
StringbitbucketServerbitbucketServerrepoUrl
String$class: 'BitbucketWeb'$class: 'BitbucketWeb'repoUrl
String$class: 'CGit'$class: 'CGit'repoUrl
String$class: 'FisheyeGitRepositoryBrowser'$class: 'FisheyeGitRepositoryBrowser'repoUrl
String$class: 'GitBlitRepositoryBrowser'$class: 'GitBlitRepositoryBrowser'repoUrl
StringprojectName
String$class: 'GitBucketBrowser'$class: 'GitBucketBrowser'url
String$class: 'GitLab'$class: 'GitLab'repoUrl
Stringversion (optional)
String$class: 'GitLabBrowser'$class: 'GitLabBrowser'https://gitLab.example.com then the URL for bob's skunkworks project might be https://gitLab.example.com/bob/skunkworks.
projectUrl
https://gitLab.example.com then the URL for bob's skunkworks project might be https://gitLab.example.com/bob/skunkworks
String$class: 'GitList'$class: 'GitList'repoUrl
String$class: 'GitWeb'$class: 'GitWeb'repoUrl
String$class: 'GiteaBrowser'$class: 'GiteaBrowser'repoUrl
https://gitea.example.com then the URL for bob's skunkworks project repository might be https://gitea.example.com/bob/skunkworks
String$class: 'GithubWeb'$class: 'GithubWeb'repoUrl
String$class: 'Gitiles'$class: 'Gitiles'repoUrl
String$class: 'GitoriousWeb'$class: 'GitoriousWeb'repoUrl
String$class: 'GogsGit'$class: 'GogsGit'repoUrl
String$class: 'KilnGit'$class: 'KilnGit'repoUrl
String$class: 'Phabricator'$class: 'Phabricator'repoUrl
Stringrepo
String$class: 'RedmineWeb'$class: 'RedmineWeb'repoUrl
String$class: 'RhodeCode'$class: 'RhodeCode'repoUrl
String$class: 'ScmManagerGitRepositoryBrowser'$class: 'ScmManagerGitRepositoryBrowser'repoUrl
String$class: 'Stash'$class: 'Stash'repoUrl
String$class: 'TFS2013GitRepositoryBrowser'$class: 'TFS2013GitRepositoryBrowser'repoUrl
If TFS is also used as the repository server, this can usually be left blank.
String$class: 'TracGitRepositoryBrowser'$class: 'TracGitRepositoryBrowser'$class: 'TuleapBrowser'$class: 'TuleapBrowser'repositoryUrl
String$class: 'ViewGitWeb'$class: 'ViewGitWeb'repoUrl
StringprojectName
StringgitTool
Absolute path to the git executable.
This is different from other Jenkins tool definitions. Rather than providing the directory that contains the executable, you must provide the complete path to the executable. Setting '/usr/bin/git' would be correct, while setting '/usr/bin/' is not correct.
Stringextensions
Extensions add new behavior or modify existing plugin behavior for different uses. Extensions help users more precisely tune plugin behavior to meet their needs.
Extensions include:
$class: 'AuthorInChangelog'$class: 'AuthorInChangelog'$class: 'BuildChooserSetting'$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: 'AlternativeBuildChooser'$class: 'AncestryBuildChooser'$class: 'AncestryBuildChooser'maximumAgeInDays
intancestorCommitSha1
String$class: 'DefaultBuildChooser'$class: 'DefaultBuildChooser'$class: 'DeflakeGitBuildChooser'$class: 'DeflakeGitBuildChooser'$class: 'GerritTriggerBuildChooser'$class: 'GerritTriggerBuildChooser'$class: 'InverseBuildChooser'$class: 'InverseBuildChooser'$class: 'BuildSingleRevisionOnly'$class: 'BuildSingleRevisionOnly'$class: 'ChangelogToBranch'$class: 'ChangelogToBranch'options
compareRemotecompareRemote
origin, that contains the branch you specify below.
StringcompareTargetcompareTarget
String$class: 'CheckoutOption'$class: 'CheckoutOption'timeout
int$class: 'CleanBeforeCheckout'$class: '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 (optional)
.git directories.
boolean$class: 'CleanCheckout'$class: 'CleanCheckout'.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 (optional)
.git directories.
boolean$class: 'CloneOption'$class: 'CloneOption'shallow
booleannoTags
booleanreference
Stringtimeout
intdepth (optional)
inthonorRefspec (optional)
boolean$class: 'CodeCommitURLHelper'$class: 'CodeCommitURLHelper'credentialId
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.
StringrepositoryName
String$class: 'DisableRemotePoll'$class: 'DisableRemotePoll'$class: 'ExcludeFromChangeSet'$class: 'ExcludeFromChangeSet'$class: 'ExcludeFromPoll'$class: 'ExcludeFromPoll'$class: 'GitLFSPull'$class: 'GitLFSPull'$class: 'GitSCMChecksExtension'$class: 'GitSCMChecksExtension'verboseConsoleLog (optional)
boolean$class: 'GitSCMStatusChecksExtension'$class: 'GitSCMStatusChecksExtension'name (optional)
Stringskip (optional)
booleanskipProgressUpdates (optional)
booleansuppressLogs (optional)
booleanunstableBuildNeutral (optional)
boolean$class: 'GitTagMessageExtension'$class: 'GitTagMessageExtension'useMostRecentTag (optional)
boolean$class: 'IgnoreNotifyCommit'$class: 'IgnoreNotifyCommit'$class: 'LocalBranch'$class: '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'$class: 'MessageExclusion'excludedMessage
.*\[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.
String$class: 'PathRestriction'$class: 'PathRestriction'includedRegions
myapp/src/main/web/.*\.html
myapp/src/main/web/.*\.jpeg
myapp/src/main/web/.*\.gif
The 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.
StringexcludedRegions
myapp/src/main/web/.*\.html
myapp/src/main/web/.*\.jpeg
myapp/src/main/web/.*\.gif
The example above illustrates that if only html/jpeg/gif files have been committed to the SCM a build will not occur.
String$class: 'PerBuildTag'$class: 'PerBuildTag'$class: 'PreBuildMerge'$class: 'PreBuildMerge'options
mergeTargetmergeTarget
master.
StringfastForwardModefastForwardMode (optional)
FF, FF_ONLY, NO_FFmergeRemotemergeRemote (optional)
origin, that contains the branch you specify below. If left blank, it'll default to the name of the first repository configured above.
StringmergeStrategymergeStrategy (optional)
DEFAULT, RESOLVE, RECURSIVE, OCTOPUS, OURS, SUBTREE, RECURSIVE_THEIRSpretestedIntegrationpretestedIntegrationgitIntegrationStrategy
accumulatedaccumulatedsquashsquashintegrationBranch
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>
StringrepoName
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
String$class: 'PruneStaleBranch'$class: 'PruneStaleBranch'pruneTagspruneTagspruneTags
boolean$class: 'RelativeTargetDirectory'$class: 'RelativeTargetDirectory'relativeTargetDir
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.
String$class: 'ScmName'$class: 'ScmName'Unique name for this SCM. Needed when using Git within the Multi SCM plugin.
name
String$class: 'SparseCheckoutPaths'$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
pathpath
String$class: 'SubmoduleOption'$class: 'SubmoduleOption'disableSubmodules
booleanrecursiveSubmodules
booleantrackingSubmodules
booleanreference
git init --bare git remote add SubProject1 https://gitrepo.com/subproject1 git remote add SubProject2 https://gitrepo.com/subproject2 git fetch --all
Stringtimeout
intparentCredentials
booleandepth (optional)
intshallow (optional)
booleanthreads (optional)
int$class: 'UserExclusion'$class: 'UserExclusion'excludedUsers
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.
String$class: 'UserIdentity'$class: 'UserIdentity'name
If given, "GIT_COMMITTER_NAME=[this]" and "GIT_AUTHOR_NAME=[this]" are set for builds. This overrides whatever is in the global settings.
Stringemail
If given, "GIT_COMMITTER_EMAIL=[this]" and "GIT_AUTHOR_EMAIL=[this]" are set for builds. This overrides whatever is in the global settings.
String$class: 'WipeWorkspace'$class: 'WipeWorkspace'doGenerateSubmoduleConfigurations (optional)
Removed facility that was intended to test combinations of git submodule versions. Removed in git plugin 4.6.0. Ignores the user provided value and always uses false as its value.
booleansubmoduleCfg (optional)
Removed facility that was intended to test combinations of git submodule versions. Removed in git plugin 4.6.0. Ignores the user provided value(s) and always uses empty values.
submoduleNamesubmoduleName
Removed in git plugin 4.6.0.
Stringbranchesbranches
Removed in git plugin 4.6.0.
String$class: 'HarvestSCM'$class: 'HarvestSCM'broker
StringpasswordFile
StringuserId
Stringpassword
StringprojectName
Stringstate
StringviewPath
StringclientPath
StringprocessName
StringrecursiveSearch
StringuseSynchronize
booleanextraOptions
String$class: 'IntegritySCM'$class: 'IntegritySCM'serverConfig
StringconfigPath
StringconfigurationName
StringCPBasedMode (optional)
booleanalternateWorkspace (optional)
Stringbrowser (optional)
$class: 'IntegrityWebUI'$class: 'IntegrityWebUI'url
StringcheckoutThreadPoolSize (optional)
intcheckoutThreadTimeout (optional)
intcheckpointBeforeBuild (optional)
booleancheckpointLabel (optional)
StringcleanCopy (optional)
booleandeleteNonMembers (optional)
booleanexcludeList (optional)
StringfetchChangedWorkspaceFiles (optional)
booleanincludeList (optional)
StringlineTerminator (optional)
StringlocalClient (optional)
booleanpassword (optional)
StringrestoreTimestamp (optional)
booleansandboxScope (optional)
StringskipAuthorInfo (optional)
booleanuserName (optional)
String$class: 'IspwConfiguration'$class: 'IspwConfiguration'connectionId
StringcredentialsId
StringserverConfig
StringserverStream
StringserverApplication
StringserverLevel
StringlevelOption
StringcomponentType
StringfolderName
StringispwDownloadAll
booleantargetFolder
StringispwDownloadIncl
booleanispwDownloadWithCompileOnly
boolean$class: 'IspwContainerConfiguration'$class: 'IspwContainerConfiguration'connectionId
StringcredentialsId
StringserverConfig
StringcontainerName
StringcontainerType
StringserverLevel
StringcomponentType
StringispwDownloadAll
booleantargetFolder
StringispwDownloadIncl
boolean$class: 'MercurialSCM'$class: 'MercurialSCM'source
Stringbrowser (optional)
$class: 'FishEye'$class: 'FishEye'url
String$class: 'GoogleCode'$class: 'GoogleCode'url
String$class: 'HgWeb'$class: 'HgWeb'url
String$class: 'Kallithea'$class: 'Kallithea'url
String$class: 'KilnHG'$class: 'KilnHG'url
String$class: 'RhodeCode'$class: 'RhodeCode'url
String$class: 'RhodeCodeLegacy'$class: 'RhodeCodeLegacy'url
String$class: 'ScmManager'$class: 'ScmManager'url
http://YOURSCMMANAGER/scm/repo/NAMESPACE/NAME/).
Stringclean (optional)
booleancredentialsId (optional)
StringdisableChangeLog (optional)
booleaninstallation (optional)
Stringmodules (optional)
Stringrevision (optional)
default branch.)
StringrevisionType (optional)
BRANCH, TAG, CHANGESET, REVSETsubdir (optional)
my/sources (use forward slashes). If changing this entry, you probably want to clean the workspace first.
String$class: 'MergeBotUpdater'$class: 'MergeBotUpdater'$class: 'MultiSCM'$class: 'MultiSCM'nonenone$class: 'OpenShiftImageStreams'$class: 'OpenShiftImageStreams'imageStreamName
Stringtag
StringapiURL
Stringnamespace
StringauthToken
Stringverbose
String$class: 'PdsConfiguration'$class: 'PdsConfiguration'connectionId
StringfilterPattern
StringfileExtension
StringcredentialsId
StringtargetFolder
Stringperforceperforcecredential
Select the appropriate credential for the Perforce connection. Perforce Credentials are defined in the Jenkins Credentials plugin here.
There are two types:
Stringworkspace
Select the appropriate Perforce workspace behaviour from the list. Not all modes will suit all Jenkins Job build types.
There are five types:
manualSpecmanualSpeccharset
The character set used by Jenkins when syncing files from the Perforce server. This should be set to 'none' unless connected to a Unicode enabled Perforce server.
StringpinHost
booleanname
Specify the name of the Perforce workspace to be used as the Jenkins build workspace. If the workspace does not yet exist, the configuration will be saved in Jenkins; the workspace is created only when it is to be used. If the workspace exists and you are connected to a Perforce server the auto-text fill should list suitable workspaces; updates are only applied when the workspace is used.
Stringspec
allwriteallwrite
booleanclobberclobber
booleancompresscompress
booleanlockedlocked
booleanmodtimemodtime
booleanrmdirrmdir
booleanstreamNamestreamName
Stringlineline
Set line-ending character(s) for client text files.
linefeed: UNIX style.
carriage return: Macintosh style. (obsolete)
carriage return-linefeed: Windows style.
hybrid: writes UNIX style but reads UNIX, Mac or Windows style.
Stringviewview
Lines to map depot files into the client workspace.
The variable ${P4_CLIENT} will expand to the client name, for example, a simple mapping:
//depot/... //${P4_CLIENT}/...
Maps files in the depot to files in your client workspace. Defines the files that you want in your client workspace and specifies where you want them to reside. The default view maps all depot files onto the client. See 'p4 help views' for view syntax. A new view takes effect on the next 'p4 sync'.
To support migration from the old Perforce plugin, a View Mapping can be inserted from a file in Perforce. Add the depot path to the "View Mappings" field Prefix "@" (this only applies to the "Manual" Workspace behaviour).
StringchangeViewchangeView
Stringtypetype
Type of client: writeable/readonly/partitioned/graph
By default all clients are 'writeable', certain clients are short lived and perform long sync and build cycles. Over time these build clients can fragment the 'db.have' table which is used to track what files a client has synced. Setting a type of 'readonly' gives the client its own personal 'db.have' database table. A 'readonly' client cannot 'edit' or 'submit' files, however for build automation this is not usually a requirement and the performance tradeoff is worth considering if your build automation is causing issues with the 'db.have' table. This option requires that an administrator has first configured the 'client.readonly.dir' setting. If it is necessary to submit changes as part of your build, you may specify a 'partitioned' client: like a 'reaonly' client, this type also has a separate 'db.have' table under the 'client.readonly.dir' directory, but allows journalled 'edit' and 'submit' of files.
StringserverIDserverID
Stringbackupbackup
Client's participation in backup enable/disable. If not specified backup of a writable client defaults to enabled.
booleancleanup
booleansyncID (optional)
StringspecFileSpecspecFileSpeccharset
The character set used by Jenkins when syncing files from the Perforce server. This should be set to 'none' unless connected to a Unicode enabled Perforce server.
StringpinHost
booleanname
Specify the name of the Perforce workspace to be used as the Jenkins build workspace. If the workspace does not yet exist, the configuration will be saved in Jenkins; the workspace is created only when it is to be used. If the workspace exists and you are connected to a Perforce server the auto-text fill should list suitable workspaces; updates are only applied when the workspace is used.
StringspecPath
StringsyncID (optional)
StringstaticSpecstaticSpeccharset
The character set used by Jenkins when syncing files from the Perforce server. This should be set to 'none' unless connected to a Unicode enabled Perforce server.
StringpinHost
booleanname
Specify the name of an existing workspace in Perforce to be used as the Jenkins build workspace. If connected to a Perforce server the auto-text fill should list suitable workspaces
StringsyncID (optional)
StringstreamSpecstreamSpeccharset
The character set used by Jenkins when syncing files from the Perforce server. This should be set to 'none' unless connected to a Unicode enabled Perforce server.
StringpinHost
booleanstreamName
Specify the full Perforce depot path for the given stream. If connected to a Perforce server the auto-text fill should list possible streams.
For example: //stream-depot/main-streamStringformat
Jenklin slave nodes must each use a unique Perforce workspace. The format string configures the workspace name by substituting the specified variables: (at least one variable must be used)
Variables can be taken from the Jenkins Environment or Parameterized builds
StringsyncID (optional)
StringtemplateSpectemplateSpeccharset
The character set used by Jenkins when syncing files from the Perforce server. This should be set to 'none' unless connected to a Unicode enabled Perforce server.
StringpinHost
booleantemplateName
Specify the name of an existing workspace in Perforce used to create or update a Jenkins build workspace. If connected to a Perforce server the auto-text fill should list suitable workspaces
Stringformat
Jenklin slave nodes must each use a unique Perforce workspace. The format string configures the workspace name by substituting the specified variables: (at least one variable must be used)
Variables can be taken from the Jenkins Environment or Parameterized builds
StringsyncID (optional)
Stringfilter
latestlatestlatestChange
booleanpathFilterpathFilterpath
Changes can be filtered to not trigger a build; if all the files within a change match the specified path, the build is filtered.
For example, with a Filter of " //depot/main/tests ":
Case A (change will be filtered):
Files:
//depot/main/tests/index.xml //depot/main/tests/001/test.xml //depot/main/tests/002/test.xml Case B (change will not be filtered, as build.xml is outside of the filter):
Files:
//depot/main/src/build.xml //depot/main/tests/004/test.xml //depot/main/tests/005/test.xml This is not Perforce syntax. Use of ... and * patterns are not supported. Only paths to directories are supported.
StringviewPatternviewPatternpatternText
Changes can be filtered to not trigger a build; if none of the files within a change match a Java pattern (regular expression) listed, the build is filtered.
For example, with the following regular expressions:
//depot/main/tests.*
//depot/main/src/.*\.cpp
//depot/main/build/.*(?:\.rb|\.py|\.bat|Jenkinsfile)
//depot/main/lib/(?!Lib1|Lib2).*
Case A (change will not be filtered, as these files match our first pattern on "tests"):
Files:
//depot/main/tests/CONTRIUBTING.md //depot/main/tests/001/index.xml Case B (Be careful with incomplete file paths! Change will NOT be filtered,
as this file matches a pattern which was likely intended as describing a "tests/" directory.)
Files:
//depot/main/tests.doc Case C (change will NOT be filtered, as all files match our fourth pattern looking for script files in 'build/'):
Files:
//depot/main/build/rbs/deploy_server.rb //depot/main/build/deploy/deploy.bat //depot/main/build/Jenkinsfile Case D (change will be filtered, as no file matches our second pattern for ".cpp" files under "main/src"):
Files:
//depot/main/src/howto.doc //depot/main/src/oldmain.c //depot/main/src/art/splash.bmp //depot/main/src/bt/funnelcake.php Case E (change will be filtered. Lib1 is included in a negative lookahead, and thus is excluded.)
Files:
//depot/main/lib/Lib1/build.xml StringcaseSensitive
booleanincrementalincrementalperChange
When enabled, only the one, oldest changelist returned by polling is built.
If P4_INCREMENTAL environment variable (or build parameter) is set to "false", polling per change is ignored and all changelists are built.
booleanuserFilteruserFilteruser
Changes can be filtered to not trigger a build; if the owner of a change matches the specified name, the build is filtered.
StringviewFilterviewFilterviewMask
Changes can be filtered to not trigger a build; if none of the files within a change are contained in the view mask, the build is filtered.
For example, with a View Mask Filter of:
//depot/main/tests
-//depot/main/tests/001
Case A (change will not be filtered, as index.xml is in the view mask):
Files:
//depot/main/tests/index.xml //depot/main/tests/001/test.xml Case B (change will not be filtered, as index.xml is in the view mask):
Files:
//depot/main/test/index.xml //depot/main/src/build.xml Case C (change will be filtered, as no file is in the view mask):
Files:
//depot/main/src/build.xml Case D (change will be filtered, as no file is in the view mask):
Files:
//depot/main/src/build.xml //depot/main/tests/001/test.xml Stringpopulate
Perforce will populate the workspace with the file revisions needed for the build. The different options effect the way the workspace is cleaned and the file revisions are updated.
There are three options:
autoCleanautoCleanreplace
Perforce will check out and overwrite any depot files which are either missing from workspace, or have been modified locally.
booleandelete
Perforce will delete any local files that are not in the depot.
booleantidy
booleanmodtime
booleanquiet
Enables the -q flag for all applicable Perforce operations. Summary details will still be displayed.
booleanpin
When a build is triggered by Polling, Build Now or an external Action, the workspace will sync only to the specified label. Any other specified change or label will be ignored.
Supports variable expansion e.g. ${VAR}. If 'now' is used, or a variable that expands to 'now', then the latest change is used (within the scope of the workspace view).
Stringparallel
enableenable
booleanpathpath
Stringthreadsthreads
Stringminfilesminfiles
Stringminbytesminbytes
StringpreviewOnlypreviewOnlyquiet
Enables the -q flag for all applicable Perforce operations. Summary details will still be displayed.
booleanpin
StringflushOnlyflushOnlyquiet
booleanpin
When a build is triggered by Polling, Build Now or an external Action, the workspace will flush only to the specified label or changelist number. Any other specified change or label will be ignored.
Supports variable expansion e.g. ${VAR}. If 'now' is used, or a variable that expands to 'now', then the latest change is used (within the scope of the workspace view).
StringforceCleanforceCleanhave
booleanquiet
Enables the -q flag for all applicable Perforce operations. Summary details will still be displayed.
booleanpin
When a build is triggered by Polling, Build Now or an external Action, the workspace will sync only to the specified label. Any other specified change or label will be ignored.
Supports variable expansion e.g. ${VAR}. If 'now' is used, or a variable that expands to 'now', then the latest change is used (within the scope of the workspace view).
Stringparallel
enableenable
booleanpathpath
Stringthreadsthreads
Stringminfilesminfiles
Stringminbytesminbytes
StringgraphCleangraphCleanquiet
Enables the -q flag for all applicable Perforce operations. Summary details will still be displayed.
booleanpin
When a build is triggered by Polling, Build Now or an external Action, the workspace will sync only to the specified label. Any other specified change or label will be ignored.
Supports variable expansion e.g. ${VAR}. If 'now' is used, or a variable that expands to 'now', then the latest change is used (within the scope of the workspace view).
Stringparallel
enableenable
booleanpathpath
Stringthreadsthreads
Stringminfilesminfiles
Stringminbytesminbytes
StringsyncOnlysyncOnlyrevert
booleanhave
booleanforce
booleanmodtime
booleanquiet
Enables the -q flag for all applicable Perforce operations. Summary details will still be displayed.
booleanpin
When a build is triggered by Polling, Build Now or an external Action, the workspace will sync only to the specified label. Any other specified change or label will be ignored.
Supports variable expansion e.g. ${VAR}. If 'now' is used, or a variable that expands to 'now', then the latest change is used (within the scope of the workspace view).
Stringparallel
enableenable
booleanpathpath
Stringthreadsthreads
Stringminfilesminfiles
Stringminbytesminbytes
Stringbrowser
fishEyefishEyeurl
StringrootModule
StringopenGrokopenGrokurl
StringdepotPath
StringprojectName
Stringp4Webp4Weburl
Stringswarmswarmurl
String$class: 'PlasticSCM'$class: 'PlasticSCM'selector
Stringcleanup
MINIMAL, STANDARD, FULL, DELETEuseMultipleWorkspaces
booleanadditionalWorkspaces
selectorselector
Stringcleanupcleanup
MINIMAL, STANDARD, FULL, DELETEdirectorydirectory
Stringdirectory
String$class: 'ProxySCM'$class: 'ProxySCM'projectName
String$class: 'PvcsScm'$class: 'PvcsScm'projectRoot
StringarchiveRoot
StringchangeLogPrefixFudge
StringmoduleDir
StringloginId
StringpvcsWorkspace
StringpromotionGroup
StringversionLabel
StringcleanCopy
boolean$class: 'RTCScm'$class: 'RTCScm'overrideGlobal
The build toolkit location and Jazz Repository connection can be defined globally or overridden. If not defined globally, it must be overridden.
booleanbuildTool
The RTC build toolkit to use when performing builds. The toolkits available are defined in the system configuration (with the other tools like Ant and Java). The build toolkit is also necessary on the Master for polling and validating the job configuration unless the "Avoid using build toolkit on Master" option is enabled.
StringserverURI
The Jazz Repository connection URI for the Rational Team Concert (RTC) server
Stringtimeout
The timeout period in seconds for Jazz repository requests made during the build.
intuserId
The build user id. Either credentials or a user id and password information should be supplied.
Stringpassword
The Jazz Repository password for the build user. The use of a password is not secure, it can be easily discovered by anyone with access to this page. Credentials, a password file or a password should be supplied.
class hudson.util.SecretpasswordFile
The path to the file containing the obfuscated Jazz Repository password for the build user. Credentials, a password file or a password should be supplied.
StringcredentialsId
Credentials to use for the build user. A user name and password credential for the Jazz Repository should be configured.
StringbuildType
valuevalue
StringbuildDefinitionbuildDefinition
StringbuildWorkspacebuildWorkspace
StringbuildSnapshotbuildSnapshot
StringbuildStreambuildStream
StringacceptBeforeLoadacceptBeforeLoad (optional)
booleanaddLinksToWorkItemsaddLinksToWorkItems (optional)
booleanbuildSnapshotContextbuildSnapshotContext (optional)
snapshotOwnerTypesnapshotOwnerType
StringprocessAreaOfOwningStreamprocessAreaOfOwningStream
StringowningStreamowningStream
StringowningWorkspaceowningWorkspace
StringclearLoadDirectoryclearLoadDirectory (optional)
booleancomponentLoadConfigcomponentLoadConfig (optional)
StringcomponentsToExcludecomponentsToExclude (optional)
StringcreateFoldersForComponentscreateFoldersForComponents (optional)
booleancurrentSnapshotOwnerTypecurrentSnapshotOwnerType (optional)
StringcustomizedSnapshotNamecustomizedSnapshotName (optional)
StringgenerateChangelogWithGoodBuildgenerateChangelogWithGoodBuild (optional)
booleanloadDirectoryloadDirectory (optional)
StringloadPolicyloadPolicy (optional)
StringoverrideDefaultSnapshotNameoverrideDefaultSnapshotName (optional)
booleanpathToLoadRuleFilepathToLoadRuleFile (optional)
StringpollingOnlypollingOnly (optional)
booleanpollingOnlyDatapollingOnlyData (optional)
snapshotUUIDsnapshotUUID
StringprocessAreaprocessArea (optional)
StringuseDynamicLoadRulesuseDynamicLoadRules (optional)
booleanavoidUsingToolkit
Where possible avoid using the Build toolkit when performing tasks on the Master. This is still in the experimental stage. You will require an RTC 5.0 server which provides some of the services used.
The Build toolkit will not be used when polling RTC and terminating the RTC Build. The toolkit is still required though. It is used for other configuration tasks on the Master (i.e. validating the connection to RTC, the build definition or workspace). It is also used for checkout tasks typically performed on agent nodes.
boolean$class: 'SCLMSCM'$class: 'SCLMSCM'server
Stringport
intcredentialsId
StringJESINTERFACELEVEL1
booleanFTPActiveMode
booleanproject
Stringalternate
Stringgroup
Stringtypes
StringcustJobStep
booleanJobStep
StringcustJobHeader
booleanJobHeader
String$class: 'ShellScriptSCM'$class: 'ShellScriptSCM'checkoutShell
StringpollingShell
StringuseCheckoutForPolling
boolean$class: 'SimpleClearCaseSCM'$class: 'SimpleClearCaseSCM'loadRules
/vobs/structure/package/product/subproduct
/vobs/structure/package/product/anothersubproduct.
Stringviewname
Stringbranch
Stringfilter
boolean$class: 'StarTeamSCM'$class: 'StarTeamSCM'hostname
Stringport
intprojectname
Stringviewname
Stringfoldername
Stringusername
Stringpassword
Stringlabelname
Stringpromotionstate
boolean$class: 'StoreSCM'$class: 'StoreSCM'scriptName
StringrepositoryName
Stringpundles
pundleTypepundleType
PACKAGE, BUNDLEnamename
StringversionRegex
StringminimumBlessingLevel
StringgenerateParcelBuilderInputFile
booleanparcelBuilderInputFilename
String$class: 'SubversionSCM'$class: 'SubversionSCM'locations
remoteremote
StringcredentialsIdcredentialsId
Stringlocallocal
.) may be used to check out the project directly into the workspace rather than into a subdirectory.
StringdepthOptiondepthOption
StringignoreExternalsOptionignoreExternalsOption
svn:externals to gain read access to the entire Subversion repository. This can happen if you follow the normal practice of giving Jenkins credentials with read access to the entire Subversion repository. You will also need to provide the credentials to use when checking/polling out the svn:externals using the Additional Credentials option.
booleancancelProcessOnExternalsFailcancelProcessOnExternalsFail
booleanworkspaceUpdater
$class: 'CheckoutUpdater'$class: 'CheckoutUpdater'$class: 'NoopUpdater'$class: 'NoopUpdater'$class: 'UpdateUpdater'$class: 'UpdateUpdater'$class: 'UpdateWithCleanUpdater'$class: 'UpdateWithCleanUpdater'$class: 'UpdateWithRevertUpdater'$class: 'UpdateWithRevertUpdater'browser
$class: 'Assembla'$class: 'Assembla'spaceName
String$class: 'BacklogRepositoryBrowser'$class: 'BacklogRepositoryBrowser'url
When no value is set, project of "Backlog URL" set above is used.
String$class: 'Phabricator'$class: 'Phabricator'url
Stringrepo
String$class: 'PolarionRepositoryBrowser'$class: 'PolarionRepositoryBrowser'url
Stringlocation
String$class: 'RedmineRepositoryBrowser'$class: 'RedmineRepositoryBrowser'repositoryId
String$class: 'SVNWeb'$class: 'SVNWeb'url
String$class: 'ScmManagerSvnRepositoryBrowser'$class: 'ScmManagerSvnRepositoryBrowser'repoUrl
String$class: 'TeamForge'$class: 'TeamForge'connectionFactory
urlurl
This should be the URL of your CollabNet TeamForge site. It should be of the form 'https://forge.collab.net'.
Stringusernameusername
The user who will upload the files.
Stringpasswordpassword
The password for the user specified above. If incorrectly given, the login to the CollabNet TeamForge server will fail.
Stringproject
Stringrepo
String$class: 'TracRepositoryBrowser'$class: 'TracRepositoryBrowser'$class: 'ViewVCRepositoryBrowser'$class: 'ViewVCRepositoryBrowser'url
Stringlocation
String$class: 'VisualSVN'$class: 'VisualSVN'url
StringexcludedRegions
/trunk/myapp/src/main/web/.*\.html /trunk/myapp/src/main/web/.*\.jpeg /trunk/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. More information on regular expressions can be found here.
StringexcludedUsers
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.
StringexcludedRevprop
StringexcludedCommitMessages
StringincludedRegions
/trunk/myapp/c/library1/.* /trunk/myapp/c/library2/.*If /trunk/myapp is checked out, the build will only occur when there are changes to either the c/library1 and c/library2 subtrees. If there are also excluded regions specified, then a file is not ignored when it is in the included list and not in the excluded list. More information on regular expressions can be found here.
StringignoreDirPropChanges
booleanfilterChangelog
booleanadditionalCredentials
If there are additional credentials required in order to obtain a complete checkout of the source, they can be provided here.
The realm is how the repository self-identifies to a client. It usually has the following format:
<proto://host:port> Realm Name
proto is the protocol, e.g. http or svn.host is the host how it's accessed by Jenkins, e.g. as IP address 192.168.1.100, host name svnserver, or host name and domain svn.example.org.port is the port, even if not explicitly specified. By default, this is 80 for HTTP, 443 for HTTPS, 3690 for the svn protocol.Realm Name is how the repository self-identifies. Common options include VisualSVN Server, Subversion Authentication or the UUID of the repository.To find out the realm, you could do any of the following:
Realm Name (see above) in the authentication dialog.svn program.
svn info https://svnserver/repo and it will tell you the realm when asking you to enter a password, e.g.: Authentication realm: <svn://svnserver:3690> VisualSVN Server.~/.subversion/auth/svn/simple; it will be two lines below the line svn:realmstring.svn+ssh protocol, the realm has the format username@svn+ssh://host:port – note that the username is before the svn+ssh:// (unlike the URL used for normal SVN operations), and that there are no angle brackets and no realm name. For this protocol the default port is 22.Make sure to enter the realm exactly as shown, starting with a < (except for repositories accessed via svn+ssh – see above).
realmrealm
<scheme://hostname(:port)> name, while for servers accessed via svn+ssh it is of the format (username@)svn+ssh://hostname(:port).
StringcredentialsIdcredentialsId
StringquietOperation
Mimics subversion command line --quiet parameter for check out / update operations to help keep the output shorter. Prints nothing, or only summary information.
boolean$class: 'SurroundSCM'$class: 'SurroundSCM'server
StringserverPort
Stringbranch
Stringrepository
StringcredentialsId
StringrsaKey (optional)
rsaKeyFileIdrsaKeyFileId (optional)
StringrsaKeyFilePathrsaKeyFilePath (optional)
StringrsaKeyTypersaKeyType (optional)
NoKey, Path, IDrsaKeyValuersaKeyValue (optional)
StringrsaKeyFileId (optional)
StringrsaKeyFilePath (optional)
StringrsaKeyPath (optional)
String$class: 'SynergySCM'$class: 'SynergySCM'project
Stringdatabase
Stringrelease
Stringpurpose
Stringusername
Stringpassword
Stringengine
StringoldProject
Stringbaseline
StringoldBaseline
StringccmHome
StringremoteClient
booleandetectConflict
booleanreplaceSubprojects
booleancheckForUpdateWarnings
booleanleaveSessionOpen
booleanmaintainWorkarea
booleancheckTaskModifiedObjects
boolean$class: 'VaultSCM'$class: 'VaultSCM'serverName
Stringpath
StringuserName
Stringpassword
StringrepositoryName
StringvaultName
StringsslEnabled
booleanuseNonWorkingFolder
booleanmerge
StringfileTime
StringmakeWritableEnabled
booleanverboseEnabled
boolean$class: 'hudson.plugins.gradle_repo.RepoScm'$class: 'hudson.plugins.gradle_repo.RepoScm'repositoryUrl
Stringbranch
String$class: 'hudson.plugins.repo.RepoScm'$class: 'hudson.plugins.repo.RepoScm'manifestRepositoryUrl
StringcleanFirst (optional)
booleancurrentBranch (optional)
booleandepth (optional)
intdestinationDir (optional)
StringextraEnvVars (optional)
java.util.Map<java.lang.String, java.lang.String>fetchSubmodules (optional)
booleanforceSync (optional)
booleanignoreProjects (optional)
Stringjobs (optional)
intlocalManifest (optional)
StringmanifestBranch (optional)
StringmanifestFile (optional)
StringmanifestGroup (optional)
StringmanifestPlatform (optional)
StringmanifestSubmodules (optional)
booleanmirrorDir (optional)
StringnoCloneBundle (optional)
booleannoTags (optional)
booleanquiet (optional)
booleanrepoBranch (optional)
StringrepoUrl (optional)
StringresetFirst (optional)
booleanshowAllChanges (optional)
booleantrace (optional)
booleanworktree (optional)
booleannonenone$class: 'OpenShiftImageStreams'$class: 'OpenShiftImageStreams'imageStreamName
Stringtag
StringapiURL
Stringnamespace
StringauthToken
Stringverbose
String$class: 'PdsConfiguration'$class: 'PdsConfiguration'connectionId
StringfilterPattern
StringfileExtension
StringcredentialsId
StringtargetFolder
Stringperforceperforcecredential
Select the appropriate credential for the Perforce connection. Perforce Credentials are defined in the Jenkins Credentials plugin here.
There are two types:
Stringworkspace
Select the appropriate Perforce workspace behaviour from the list. Not all modes will suit all Jenkins Job build types.
There are five types:
manualSpecmanualSpeccharset
The character set used by Jenkins when syncing files from the Perforce server. This should be set to 'none' unless connected to a Unicode enabled Perforce server.
StringpinHost
booleanname
Specify the name of the Perforce workspace to be used as the Jenkins build workspace. If the workspace does not yet exist, the configuration will be saved in Jenkins; the workspace is created only when it is to be used. If the workspace exists and you are connected to a Perforce server the auto-text fill should list suitable workspaces; updates are only applied when the workspace is used.
Stringspec
allwriteallwrite
booleanclobberclobber
booleancompresscompress
booleanlockedlocked
booleanmodtimemodtime
booleanrmdirrmdir
booleanstreamNamestreamName
Stringlineline
Set line-ending character(s) for client text files.
linefeed: UNIX style.
carriage return: Macintosh style. (obsolete)
carriage return-linefeed: Windows style.
hybrid: writes UNIX style but reads UNIX, Mac or Windows style.
Stringviewview
Lines to map depot files into the client workspace.
The variable ${P4_CLIENT} will expand to the client name, for example, a simple mapping:
//depot/... //${P4_CLIENT}/...
Maps files in the depot to files in your client workspace. Defines the files that you want in your client workspace and specifies where you want them to reside. The default view maps all depot files onto the client. See 'p4 help views' for view syntax. A new view takes effect on the next 'p4 sync'.
To support migration from the old Perforce plugin, a View Mapping can be inserted from a file in Perforce. Add the depot path to the "View Mappings" field Prefix "@" (this only applies to the "Manual" Workspace behaviour).
StringchangeViewchangeView
Stringtypetype
Type of client: writeable/readonly/partitioned/graph
By default all clients are 'writeable', certain clients are short lived and perform long sync and build cycles. Over time these build clients can fragment the 'db.have' table which is used to track what files a client has synced. Setting a type of 'readonly' gives the client its own personal 'db.have' database table. A 'readonly' client cannot 'edit' or 'submit' files, however for build automation this is not usually a requirement and the performance tradeoff is worth considering if your build automation is causing issues with the 'db.have' table. This option requires that an administrator has first configured the 'client.readonly.dir' setting. If it is necessary to submit changes as part of your build, you may specify a 'partitioned' client: like a 'reaonly' client, this type also has a separate 'db.have' table under the 'client.readonly.dir' directory, but allows journalled 'edit' and 'submit' of files.
StringserverIDserverID
Stringbackupbackup
Client's participation in backup enable/disable. If not specified backup of a writable client defaults to enabled.
booleancleanup
booleansyncID (optional)
StringspecFileSpecspecFileSpeccharset
The character set used by Jenkins when syncing files from the Perforce server. This should be set to 'none' unless connected to a Unicode enabled Perforce server.
StringpinHost
booleanname
Specify the name of the Perforce workspace to be used as the Jenkins build workspace. If the workspace does not yet exist, the configuration will be saved in Jenkins; the workspace is created only when it is to be used. If the workspace exists and you are connected to a Perforce server the auto-text fill should list suitable workspaces; updates are only applied when the workspace is used.
StringspecPath
StringsyncID (optional)
StringstaticSpecstaticSpeccharset
The character set used by Jenkins when syncing files from the Perforce server. This should be set to 'none' unless connected to a Unicode enabled Perforce server.
StringpinHost
booleanname
Specify the name of an existing workspace in Perforce to be used as the Jenkins build workspace. If connected to a Perforce server the auto-text fill should list suitable workspaces
StringsyncID (optional)
StringstreamSpecstreamSpeccharset
The character set used by Jenkins when syncing files from the Perforce server. This should be set to 'none' unless connected to a Unicode enabled Perforce server.
StringpinHost
booleanstreamName
Specify the full Perforce depot path for the given stream. If connected to a Perforce server the auto-text fill should list possible streams.
For example: //stream-depot/main-streamStringformat
Jenklin slave nodes must each use a unique Perforce workspace. The format string configures the workspace name by substituting the specified variables: (at least one variable must be used)
Variables can be taken from the Jenkins Environment or Parameterized builds
StringsyncID (optional)
StringtemplateSpectemplateSpeccharset
The character set used by Jenkins when syncing files from the Perforce server. This should be set to 'none' unless connected to a Unicode enabled Perforce server.
StringpinHost
booleantemplateName
Specify the name of an existing workspace in Perforce used to create or update a Jenkins build workspace. If connected to a Perforce server the auto-text fill should list suitable workspaces
Stringformat
Jenklin slave nodes must each use a unique Perforce workspace. The format string configures the workspace name by substituting the specified variables: (at least one variable must be used)
Variables can be taken from the Jenkins Environment or Parameterized builds
StringsyncID (optional)
Stringfilter
latestlatestlatestChange
booleanpathFilterpathFilterpath
Changes can be filtered to not trigger a build; if all the files within a change match the specified path, the build is filtered.
For example, with a Filter of " //depot/main/tests ":
Case A (change will be filtered):
Files:
//depot/main/tests/index.xml //depot/main/tests/001/test.xml //depot/main/tests/002/test.xml Case B (change will not be filtered, as build.xml is outside of the filter):
Files:
//depot/main/src/build.xml //depot/main/tests/004/test.xml //depot/main/tests/005/test.xml This is not Perforce syntax. Use of ... and * patterns are not supported. Only paths to directories are supported.
StringviewPatternviewPatternpatternText
Changes can be filtered to not trigger a build; if none of the files within a change match a Java pattern (regular expression) listed, the build is filtered.
For example, with the following regular expressions:
//depot/main/tests.*
//depot/main/src/.*\.cpp
//depot/main/build/.*(?:\.rb|\.py|\.bat|Jenkinsfile)
//depot/main/lib/(?!Lib1|Lib2).*
Case A (change will not be filtered, as these files match our first pattern on "tests"):
Files:
//depot/main/tests/CONTRIUBTING.md //depot/main/tests/001/index.xml Case B (Be careful with incomplete file paths! Change will NOT be filtered,
as this file matches a pattern which was likely intended as describing a "tests/" directory.)
Files:
//depot/main/tests.doc Case C (change will NOT be filtered, as all files match our fourth pattern looking for script files in 'build/'):
Files:
//depot/main/build/rbs/deploy_server.rb //depot/main/build/deploy/deploy.bat //depot/main/build/Jenkinsfile Case D (change will be filtered, as no file matches our second pattern for ".cpp" files under "main/src"):
Files:
//depot/main/src/howto.doc //depot/main/src/oldmain.c //depot/main/src/art/splash.bmp //depot/main/src/bt/funnelcake.php Case E (change will be filtered. Lib1 is included in a negative lookahead, and thus is excluded.)
Files:
//depot/main/lib/Lib1/build.xml StringcaseSensitive
booleanincrementalincrementalperChange
When enabled, only the one, oldest changelist returned by polling is built.
If P4_INCREMENTAL environment variable (or build parameter) is set to "false", polling per change is ignored and all changelists are built.
booleanuserFilteruserFilteruser
Changes can be filtered to not trigger a build; if the owner of a change matches the specified name, the build is filtered.
StringviewFilterviewFilterviewMask
Changes can be filtered to not trigger a build; if none of the files within a change are contained in the view mask, the build is filtered.
For example, with a View Mask Filter of:
//depot/main/tests
-//depot/main/tests/001
Case A (change will not be filtered, as index.xml is in the view mask):
Files:
//depot/main/tests/index.xml //depot/main/tests/001/test.xml Case B (change will not be filtered, as index.xml is in the view mask):
Files:
//depot/main/test/index.xml //depot/main/src/build.xml Case C (change will be filtered, as no file is in the view mask):
Files:
//depot/main/src/build.xml Case D (change will be filtered, as no file is in the view mask):
Files:
//depot/main/src/build.xml //depot/main/tests/001/test.xml Stringpopulate
Perforce will populate the workspace with the file revisions needed for the build. The different options effect the way the workspace is cleaned and the file revisions are updated.
There are three options:
autoCleanautoCleanreplace
Perforce will check out and overwrite any depot files which are either missing from workspace, or have been modified locally.
booleandelete
Perforce will delete any local files that are not in the depot.
booleantidy
booleanmodtime
booleanquiet
Enables the -q flag for all applicable Perforce operations. Summary details will still be displayed.
booleanpin
When a build is triggered by Polling, Build Now or an external Action, the workspace will sync only to the specified label. Any other specified change or label will be ignored.
Supports variable expansion e.g. ${VAR}. If 'now' is used, or a variable that expands to 'now', then the latest change is used (within the scope of the workspace view).
Stringparallel
enableenable
booleanpathpath
Stringthreadsthreads
Stringminfilesminfiles
Stringminbytesminbytes
StringpreviewOnlypreviewOnlyquiet
Enables the -q flag for all applicable Perforce operations. Summary details will still be displayed.
booleanpin
StringflushOnlyflushOnlyquiet
booleanpin
When a build is triggered by Polling, Build Now or an external Action, the workspace will flush only to the specified label or changelist number. Any other specified change or label will be ignored.
Supports variable expansion e.g. ${VAR}. If 'now' is used, or a variable that expands to 'now', then the latest change is used (within the scope of the workspace view).
StringforceCleanforceCleanhave
booleanquiet
Enables the -q flag for all applicable Perforce operations. Summary details will still be displayed.
booleanpin
When a build is triggered by Polling, Build Now or an external Action, the workspace will sync only to the specified label. Any other specified change or label will be ignored.
Supports variable expansion e.g. ${VAR}. If 'now' is used, or a variable that expands to 'now', then the latest change is used (within the scope of the workspace view).
Stringparallel
enableenable
booleanpathpath
Stringthreadsthreads
Stringminfilesminfiles
Stringminbytesminbytes
StringgraphCleangraphCleanquiet
Enables the -q flag for all applicable Perforce operations. Summary details will still be displayed.
booleanpin
When a build is triggered by Polling, Build Now or an external Action, the workspace will sync only to the specified label. Any other specified change or label will be ignored.
Supports variable expansion e.g. ${VAR}. If 'now' is used, or a variable that expands to 'now', then the latest change is used (within the scope of the workspace view).
Stringparallel
enableenable
booleanpathpath
Stringthreadsthreads
Stringminfilesminfiles
Stringminbytesminbytes
StringsyncOnlysyncOnlyrevert
booleanhave
booleanforce
booleanmodtime
booleanquiet
Enables the -q flag for all applicable Perforce operations. Summary details will still be displayed.
booleanpin
When a build is triggered by Polling, Build Now or an external Action, the workspace will sync only to the specified label. Any other specified change or label will be ignored.
Supports variable expansion e.g. ${VAR}. If 'now' is used, or a variable that expands to 'now', then the latest change is used (within the scope of the workspace view).
Stringparallel
enableenable
booleanpathpath
Stringthreadsthreads
Stringminfilesminfiles
Stringminbytesminbytes
Stringbrowser
fishEyefishEyeurl
StringrootModule
StringopenGrokopenGrokurl
StringdepotPath
StringprojectName
Stringp4Webp4Weburl
Stringswarmswarmurl
String$class: 'PlasticSCM'$class: 'PlasticSCM'selector
Stringcleanup
MINIMAL, STANDARD, FULL, DELETEuseMultipleWorkspaces
booleanadditionalWorkspaces
selectorselector
Stringcleanupcleanup
MINIMAL, STANDARD, FULL, DELETEdirectorydirectory
Stringdirectory
String$class: 'ProxySCM'$class: 'ProxySCM'projectName
String$class: 'PvcsScm'$class: 'PvcsScm'projectRoot
StringarchiveRoot
StringchangeLogPrefixFudge
StringmoduleDir
StringloginId
StringpvcsWorkspace
StringpromotionGroup
StringversionLabel
StringcleanCopy
boolean$class: 'RTCScm'$class: 'RTCScm'overrideGlobal
The build toolkit location and Jazz Repository connection can be defined globally or overridden. If not defined globally, it must be overridden.
booleanbuildTool
The RTC build toolkit to use when performing builds. The toolkits available are defined in the system configuration (with the other tools like Ant and Java). The build toolkit is also necessary on the Master for polling and validating the job configuration unless the "Avoid using build toolkit on Master" option is enabled.
StringserverURI
The Jazz Repository connection URI for the Rational Team Concert (RTC) server
Stringtimeout
The timeout period in seconds for Jazz repository requests made during the build.
intuserId
The build user id. Either credentials or a user id and password information should be supplied.
Stringpassword
The Jazz Repository password for the build user. The use of a password is not secure, it can be easily discovered by anyone with access to this page. Credentials, a password file or a password should be supplied.
class hudson.util.SecretpasswordFile
The path to the file containing the obfuscated Jazz Repository password for the build user. Credentials, a password file or a password should be supplied.
StringcredentialsId
Credentials to use for the build user. A user name and password credential for the Jazz Repository should be configured.
StringbuildType
valuevalue
StringbuildDefinitionbuildDefinition
StringbuildWorkspacebuildWorkspace
StringbuildSnapshotbuildSnapshot
StringbuildStreambuildStream
StringacceptBeforeLoadacceptBeforeLoad (optional)
booleanaddLinksToWorkItemsaddLinksToWorkItems (optional)
booleanbuildSnapshotContextbuildSnapshotContext (optional)
snapshotOwnerTypesnapshotOwnerType
StringprocessAreaOfOwningStreamprocessAreaOfOwningStream
StringowningStreamowningStream
StringowningWorkspaceowningWorkspace
StringclearLoadDirectoryclearLoadDirectory (optional)
booleancomponentLoadConfigcomponentLoadConfig (optional)
StringcomponentsToExcludecomponentsToExclude (optional)
StringcreateFoldersForComponentscreateFoldersForComponents (optional)
booleancurrentSnapshotOwnerTypecurrentSnapshotOwnerType (optional)
StringcustomizedSnapshotNamecustomizedSnapshotName (optional)
StringgenerateChangelogWithGoodBuildgenerateChangelogWithGoodBuild (optional)
booleanloadDirectoryloadDirectory (optional)
StringloadPolicyloadPolicy (optional)
StringoverrideDefaultSnapshotNameoverrideDefaultSnapshotName (optional)
booleanpathToLoadRuleFilepathToLoadRuleFile (optional)
StringpollingOnlypollingOnly (optional)
booleanpollingOnlyDatapollingOnlyData (optional)
snapshotUUIDsnapshotUUID
StringprocessAreaprocessArea (optional)
StringuseDynamicLoadRulesuseDynamicLoadRules (optional)
booleanavoidUsingToolkit
Where possible avoid using the Build toolkit when performing tasks on the Master. This is still in the experimental stage. You will require an RTC 5.0 server which provides some of the services used.
The Build toolkit will not be used when polling RTC and terminating the RTC Build. The toolkit is still required though. It is used for other configuration tasks on the Master (i.e. validating the connection to RTC, the build definition or workspace). It is also used for checkout tasks typically performed on agent nodes.
boolean$class: 'SCLMSCM'$class: 'SCLMSCM'server
Stringport
intcredentialsId
StringJESINTERFACELEVEL1
booleanFTPActiveMode
booleanproject
Stringalternate
Stringgroup
Stringtypes
StringcustJobStep
booleanJobStep
StringcustJobHeader
booleanJobHeader
String$class: 'ShellScriptSCM'$class: 'ShellScriptSCM'checkoutShell
StringpollingShell
StringuseCheckoutForPolling
boolean$class: 'SimpleClearCaseSCM'$class: 'SimpleClearCaseSCM'loadRules
/vobs/structure/package/product/subproduct
/vobs/structure/package/product/anothersubproduct.
Stringviewname
Stringbranch
Stringfilter
boolean$class: 'StarTeamSCM'$class: 'StarTeamSCM'hostname
Stringport
intprojectname
Stringviewname
Stringfoldername
Stringusername
Stringpassword
Stringlabelname
Stringpromotionstate
boolean$class: 'StoreSCM'$class: 'StoreSCM'scriptName
StringrepositoryName
Stringpundles
pundleTypepundleType
PACKAGE, BUNDLEnamename
StringversionRegex
StringminimumBlessingLevel
StringgenerateParcelBuilderInputFile
booleanparcelBuilderInputFilename
String$class: 'SubversionSCM'$class: 'SubversionSCM'locations
remoteremote
StringcredentialsIdcredentialsId
Stringlocallocal
.) may be used to check out the project directly into the workspace rather than into a subdirectory.
StringdepthOptiondepthOption
StringignoreExternalsOptionignoreExternalsOption
svn:externals to gain read access to the entire Subversion repository. This can happen if you follow the normal practice of giving Jenkins credentials with read access to the entire Subversion repository. You will also need to provide the credentials to use when checking/polling out the svn:externals using the Additional Credentials option.
booleancancelProcessOnExternalsFailcancelProcessOnExternalsFail
booleanworkspaceUpdater
$class: 'CheckoutUpdater'$class: 'CheckoutUpdater'$class: 'NoopUpdater'$class: 'NoopUpdater'$class: 'UpdateUpdater'$class: 'UpdateUpdater'$class: 'UpdateWithCleanUpdater'$class: 'UpdateWithCleanUpdater'$class: 'UpdateWithRevertUpdater'$class: 'UpdateWithRevertUpdater'browser
$class: 'Assembla'$class: 'Assembla'spaceName
String$class: 'BacklogRepositoryBrowser'$class: 'BacklogRepositoryBrowser'url
When no value is set, project of "Backlog URL" set above is used.
String$class: 'Phabricator'$class: 'Phabricator'url
Stringrepo
String$class: 'PolarionRepositoryBrowser'$class: 'PolarionRepositoryBrowser'url
Stringlocation
String$class: 'RedmineRepositoryBrowser'$class: 'RedmineRepositoryBrowser'repositoryId
String$class: 'SVNWeb'$class: 'SVNWeb'url
String$class: 'ScmManagerSvnRepositoryBrowser'$class: 'ScmManagerSvnRepositoryBrowser'repoUrl
String$class: 'TeamForge'$class: 'TeamForge'connectionFactory
urlurl
This should be the URL of your CollabNet TeamForge site. It should be of the form 'https://forge.collab.net'.
Stringusernameusername
The user who will upload the files.
Stringpasswordpassword
The password for the user specified above. If incorrectly given, the login to the CollabNet TeamForge server will fail.
Stringproject
Stringrepo
String$class: 'TracRepositoryBrowser'$class: 'TracRepositoryBrowser'$class: 'ViewVCRepositoryBrowser'$class: 'ViewVCRepositoryBrowser'url
Stringlocation
String$class: 'VisualSVN'$class: 'VisualSVN'url
StringexcludedRegions
/trunk/myapp/src/main/web/.*\.html /trunk/myapp/src/main/web/.*\.jpeg /trunk/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. More information on regular expressions can be found here.
StringexcludedUsers
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.
StringexcludedRevprop
StringexcludedCommitMessages
StringincludedRegions
/trunk/myapp/c/library1/.* /trunk/myapp/c/library2/.*If /trunk/myapp is checked out, the build will only occur when there are changes to either the c/library1 and c/library2 subtrees. If there are also excluded regions specified, then a file is not ignored when it is in the included list and not in the excluded list. More information on regular expressions can be found here.
StringignoreDirPropChanges
booleanfilterChangelog
booleanadditionalCredentials
If there are additional credentials required in order to obtain a complete checkout of the source, they can be provided here.
The realm is how the repository self-identifies to a client. It usually has the following format:
<proto://host:port> Realm Name
proto is the protocol, e.g. http or svn.host is the host how it's accessed by Jenkins, e.g. as IP address 192.168.1.100, host name svnserver, or host name and domain svn.example.org.port is the port, even if not explicitly specified. By default, this is 80 for HTTP, 443 for HTTPS, 3690 for the svn protocol.Realm Name is how the repository self-identifies. Common options include VisualSVN Server, Subversion Authentication or the UUID of the repository.To find out the realm, you could do any of the following:
Realm Name (see above) in the authentication dialog.svn program.
svn info https://svnserver/repo and it will tell you the realm when asking you to enter a password, e.g.: Authentication realm: <svn://svnserver:3690> VisualSVN Server.~/.subversion/auth/svn/simple; it will be two lines below the line svn:realmstring.svn+ssh protocol, the realm has the format username@svn+ssh://host:port – note that the username is before the svn+ssh:// (unlike the URL used for normal SVN operations), and that there are no angle brackets and no realm name. For this protocol the default port is 22.Make sure to enter the realm exactly as shown, starting with a < (except for repositories accessed via svn+ssh – see above).
realmrealm
<scheme://hostname(:port)> name, while for servers accessed via svn+ssh it is of the format (username@)svn+ssh://hostname(:port).
StringcredentialsIdcredentialsId
StringquietOperation
Mimics subversion command line --quiet parameter for check out / update operations to help keep the output shorter. Prints nothing, or only summary information.
boolean$class: 'SurroundSCM'$class: 'SurroundSCM'server
StringserverPort
Stringbranch
Stringrepository
StringcredentialsId
StringrsaKey (optional)
rsaKeyFileIdrsaKeyFileId (optional)
StringrsaKeyFilePathrsaKeyFilePath (optional)
StringrsaKeyTypersaKeyType (optional)
NoKey, Path, IDrsaKeyValuersaKeyValue (optional)
StringrsaKeyFileId (optional)
StringrsaKeyFilePath (optional)
StringrsaKeyPath (optional)
String$class: 'SynergySCM'$class: 'SynergySCM'project
Stringdatabase
Stringrelease
Stringpurpose
Stringusername
Stringpassword
Stringengine
StringoldProject
Stringbaseline
StringoldBaseline
StringccmHome
StringremoteClient
booleandetectConflict
booleanreplaceSubprojects
booleancheckForUpdateWarnings
booleanleaveSessionOpen
booleanmaintainWorkarea
booleancheckTaskModifiedObjects
boolean$class: 'VaultSCM'$class: 'VaultSCM'serverName
Stringpath
StringuserName
Stringpassword
StringrepositoryName
StringvaultName
StringsslEnabled
booleanuseNonWorkingFolder
booleanmerge
StringfileTime
StringmakeWritableEnabled
booleanverboseEnabled
boolean$class: 'hudson.plugins.gradle_repo.RepoScm'$class: 'hudson.plugins.gradle_repo.RepoScm'repositoryUrl
Stringbranch
String$class: 'hudson.plugins.repo.RepoScm'$class: 'hudson.plugins.repo.RepoScm'manifestRepositoryUrl
StringcleanFirst (optional)
booleancurrentBranch (optional)
booleandepth (optional)
intdestinationDir (optional)
StringextraEnvVars (optional)
java.util.Map<java.lang.String, java.lang.String>fetchSubmodules (optional)
booleanforceSync (optional)
booleanignoreProjects (optional)
Stringjobs (optional)
intlocalManifest (optional)
StringmanifestBranch (optional)
StringmanifestFile (optional)
StringmanifestGroup (optional)
StringmanifestPlatform (optional)
StringmanifestSubmodules (optional)
booleanmirrorDir (optional)
StringnoCloneBundle (optional)
booleannoTags (optional)
booleanquiet (optional)
booleanrepoBranch (optional)
StringrepoUrl (optional)
StringresetFirst (optional)
booleanshowAllChanges (optional)
booleantrace (optional)
booleanworktree (optional)
booleanid (optional)
StringmultiStreamsmultiStreamscredential
Stringincludes (optional)
A List of Perforce depot paths to one or more Streams (separated by new lines). The plugin will recursively search for a Jenkinsfile (or defined item) using the Stream name for the multi-branch name.
... or * can be used as wildcards in Perforce depot paths.
For example:
//streams/bar will include //streams/bar.
//streams/... or //streams/* will include all the streams in //streams.
//streams/bar... or //streams/bar* will include //streams/bar, //streams/bar-01, //streams/bar-02 and so on.
Stringcharset (optional)
Stringformat (optional)
Stringbrowser (optional)
fishEyefishEyeurl
StringrootModule
StringopenGrokopenGrokurl
StringdepotPath
StringprojectName
Stringp4Webp4Weburl
Stringswarmswarmurl
Stringexcludes (optional)
A regular expression to exclude matching Stream names found from 'Include streams'.
Stringfilter (optional)
latestlatestlatestChange
booleanpathFilterpathFilterpath
Changes can be filtered to not trigger a build; if all the files within a change match the specified path, the build is filtered.
For example, with a Filter of " //depot/main/tests ":
Case A (change will be filtered):
Files:
//depot/main/tests/index.xml //depot/main/tests/001/test.xml //depot/main/tests/002/test.xml Case B (change will not be filtered, as build.xml is outside of the filter):
Files:
//depot/main/src/build.xml //depot/main/tests/004/test.xml //depot/main/tests/005/test.xml This is not Perforce syntax. Use of ... and * patterns are not supported. Only paths to directories are supported.
StringviewPatternviewPatternpatternText
Changes can be filtered to not trigger a build; if none of the files within a change match a Java pattern (regular expression) listed, the build is filtered.
For example, with the following regular expressions:
//depot/main/tests.*
//depot/main/src/.*\.cpp
//depot/main/build/.*(?:\.rb|\.py|\.bat|Jenkinsfile)
//depot/main/lib/(?!Lib1|Lib2).*
Case A (change will not be filtered, as these files match our first pattern on "tests"):
Files:
//depot/main/tests/CONTRIUBTING.md //depot/main/tests/001/index.xml Case B (Be careful with incomplete file paths! Change will NOT be filtered,
as this file matches a pattern which was likely intended as describing a "tests/" directory.)
Files:
//depot/main/tests.doc Case C (change will NOT be filtered, as all files match our fourth pattern looking for script files in 'build/'):
Files:
//depot/main/build/rbs/deploy_server.rb //depot/main/build/deploy/deploy.bat //depot/main/build/Jenkinsfile Case D (change will be filtered, as no file matches our second pattern for ".cpp" files under "main/src"):
Files:
//depot/main/src/howto.doc //depot/main/src/oldmain.c //depot/main/src/art/splash.bmp //depot/main/src/bt/funnelcake.php Case E (change will be filtered. Lib1 is included in a negative lookahead, and thus is excluded.)
Files:
//depot/main/lib/Lib1/build.xml StringcaseSensitive
booleanincrementalincrementalperChange
When enabled, only the one, oldest changelist returned by polling is built.
If P4_INCREMENTAL environment variable (or build parameter) is set to "false", polling per change is ignored and all changelists are built.
booleanuserFilteruserFilteruser
Changes can be filtered to not trigger a build; if the owner of a change matches the specified name, the build is filtered.
StringviewFilterviewFilterviewMask
Changes can be filtered to not trigger a build; if none of the files within a change are contained in the view mask, the build is filtered.
For example, with a View Mask Filter of:
//depot/main/tests
-//depot/main/tests/001
Case A (change will not be filtered, as index.xml is in the view mask):
Files:
//depot/main/tests/index.xml //depot/main/tests/001/test.xml Case B (change will not be filtered, as index.xml is in the view mask):
Files:
//depot/main/test/index.xml //depot/main/src/build.xml Case C (change will be filtered, as no file is in the view mask):
Files:
//depot/main/src/build.xml Case D (change will be filtered, as no file is in the view mask):
Files:
//depot/main/src/build.xml //depot/main/tests/001/test.xml Stringid (optional)
Stringpopulate (optional)
autoCleanautoCleanreplace
Perforce will check out and overwrite any depot files which are either missing from workspace, or have been modified locally.
booleandelete
Perforce will delete any local files that are not in the depot.
booleantidy
booleanmodtime
booleanquiet
Enables the -q flag for all applicable Perforce operations. Summary details will still be displayed.
booleanpin
When a build is triggered by Polling, Build Now or an external Action, the workspace will sync only to the specified label. Any other specified change or label will be ignored.
Supports variable expansion e.g. ${VAR}. If 'now' is used, or a variable that expands to 'now', then the latest change is used (within the scope of the workspace view).
Stringparallel
enableenable
booleanpathpath
Stringthreadsthreads
Stringminfilesminfiles
Stringminbytesminbytes
StringpreviewOnlypreviewOnlyquiet
Enables the -q flag for all applicable Perforce operations. Summary details will still be displayed.
booleanpin
StringflushOnlyflushOnlyquiet
booleanpin
When a build is triggered by Polling, Build Now or an external Action, the workspace will flush only to the specified label or changelist number. Any other specified change or label will be ignored.
Supports variable expansion e.g. ${VAR}. If 'now' is used, or a variable that expands to 'now', then the latest change is used (within the scope of the workspace view).
StringforceCleanforceCleanhave
booleanquiet
Enables the -q flag for all applicable Perforce operations. Summary details will still be displayed.
booleanpin
When a build is triggered by Polling, Build Now or an external Action, the workspace will sync only to the specified label. Any other specified change or label will be ignored.
Supports variable expansion e.g. ${VAR}. If 'now' is used, or a variable that expands to 'now', then the latest change is used (within the scope of the workspace view).
Stringparallel
enableenable
booleanpathpath
Stringthreadsthreads
Stringminfilesminfiles
Stringminbytesminbytes
StringgraphCleangraphCleanquiet
Enables the -q flag for all applicable Perforce operations. Summary details will still be displayed.
booleanpin
When a build is triggered by Polling, Build Now or an external Action, the workspace will sync only to the specified label. Any other specified change or label will be ignored.
Supports variable expansion e.g. ${VAR}. If 'now' is used, or a variable that expands to 'now', then the latest change is used (within the scope of the workspace view).
Stringparallel
enableenable
booleanpathpath
Stringthreadsthreads
Stringminfilesminfiles
Stringminbytesminbytes
StringsyncOnlysyncOnlyrevert
booleanhave
booleanforce
booleanmodtime
booleanquiet
Enables the -q flag for all applicable Perforce operations. Summary details will still be displayed.
booleanpin
When a build is triggered by Polling, Build Now or an external Action, the workspace will sync only to the specified label. Any other specified change or label will be ignored.
Supports variable expansion e.g. ${VAR}. If 'now' is used, or a variable that expands to 'now', then the latest change is used (within the scope of the workspace view).
Stringparallel
enableenable
booleanpathpath
Stringthreadsthreads
Stringminfilesminfiles
Stringminbytesminbytes
Stringtraits (optional)
$class: 'ApprovedPullRequestTrait'$class: 'ApprovedPullRequestTrait'strategyId
int$class: 'AuthorInChangelogTrait'$class: 'AuthorInChangelogTrait'$class: 'BitbucketAgedRefsTrait'$class: 'BitbucketAgedRefsTrait'retentionDays
StringbitbucketBranchCommitSkipTraitbitbucketBranchCommitSkipTraitbitbucketBuildStatusNotificationsbitbucketBuildStatusNotificationssendSuccessNotificationForUnstableBuild (optional)
booleanbitbucketCommitSkipTraitbitbucketCommitSkipTrait$class: 'BitbucketJiraValidatorTrait'$class: 'BitbucketJiraValidatorTrait'jiraServerIdx
intbuildStatusNameCustomPartbuildStatusNameCustomPartbuildStatusNameCustomPart (optional)
String$class: 'ChangeDiscoveryTrait'$class: 'ChangeDiscoveryTrait'queryString
Provide an additional query string to search for open changes. The status:open is implicitly added and does not need to be specified. See Gerrit search operators documentation for a detailed list of the supported search operators.
-is:wipdoes not include work-in-progress changes
is:privateincludes private changes
String$class: 'CheckoutOptionTrait'$class: 'CheckoutOptionTrait'extension
timeouttimeout
int$class: 'CleanAfterCheckoutTrait'$class: 'CleanAfterCheckoutTrait'extension
.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.
deleteUntrackedNestedRepositoriesdeleteUntrackedNestedRepositories (optional)
.git directories.
boolean$class: 'CleanBeforeCheckoutTrait'$class: 'CleanBeforeCheckoutTrait'extension
.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.
deleteUntrackedNestedRepositoriesdeleteUntrackedNestedRepositories (optional)
.git directories.
boolean$class: 'CleanMercurialSCMSourceTrait'$class: 'CleanMercurialSCMSourceTrait'$class: 'CloneOptionTrait'$class: 'CloneOptionTrait'extension
shallowshallow
booleannoTagsnoTags
booleanreferencereference
Stringtimeouttimeout
intdepthdepth (optional)
inthonorRefspechonorRefspec (optional)
boolean$class: 'DisableStatusUpdateTrait'$class: 'DisableStatusUpdateTrait'$class: 'DiscoverOtherRefsTrait'$class: 'DiscoverOtherRefsTrait'ref
The pattern under /refs on the remote repository to discover, can contain a wildcard.
Example: test/*/merged
StringnameMapping (optional)
Mapping for how the ref can be named in for example the @Library.
Example: test-@{1}
Where @{1} replaces the first wildcard in the ref when discovered.
By default it will be "namespace_before_wildcard-@{1}". E.g. if ref is "test/*/merged" the default mapping would be "test-@{1}".
String$class: 'FilterChecksTrait'$class: 'FilterChecksTrait'queryOperator
ID, SCHEMEqueryString
StringgitLabForkDiscoverygitLabForkDiscoverystrategyId
inttrust
One of the great powers of merge requests is that anyone with read access to a project can fork it, commit some changes to their fork and then create a merge request against the original project with their changes. There are some files stored in source control that are important. For example, a Jenkinsfile may contain configuration details to sandbox merge requests in order to mitigate against malicious merge requests. In order to protect against a malicious merge request itself modifying the Jenkinsfile to remove the protections, you can define the trust policy for merge requests from forks.
Other plugins can extend the available trust policies. The default policies are:
Jenkinsfile) the contents of that file will be retrieved from the target branch on the origin project and not from the merge request branch on the fork project.
Nobody.
jenkins.scm.api.trait.SCMHeadAuthority<? super io.jenkins.plugins.gitlabbranchsource.GitLabSCMSourceRequest, ? extends jenkins.scm.api.mixin.ChangeRequestSCMHead2, ? extends jenkins.scm.api.SCMRevision>$class: 'GitBrowserSCMSourceTrait'$class: 'GitBrowserSCMSourceTrait'browser
$class: 'AssemblaWeb'$class: 'AssemblaWeb'repoUrl
String$class: 'BacklogGitRepositoryBrowser'$class: 'BacklogGitRepositoryBrowser'repoName
StringrepoUrl
StringbitbucketServerbitbucketServerrepoUrl
String$class: 'BitbucketWeb'$class: 'BitbucketWeb'repoUrl
String$class: 'CGit'$class: 'CGit'repoUrl
String$class: 'FisheyeGitRepositoryBrowser'$class: 'FisheyeGitRepositoryBrowser'repoUrl
String$class: 'GitBlitRepositoryBrowser'$class: 'GitBlitRepositoryBrowser'repoUrl
StringprojectName
String$class: 'GitBucketBrowser'$class: 'GitBucketBrowser'url
String$class: 'GitLab'$class: 'GitLab'repoUrl
Stringversion (optional)
String$class: 'GitLabBrowser'$class: 'GitLabBrowser'https://gitLab.example.com then the URL for bob's skunkworks project might be https://gitLab.example.com/bob/skunkworks.
projectUrl
https://gitLab.example.com then the URL for bob's skunkworks project might be https://gitLab.example.com/bob/skunkworks
String$class: 'GitList'$class: 'GitList'repoUrl
String$class: 'GitWeb'$class: 'GitWeb'repoUrl
String$class: 'GiteaBrowser'$class: 'GiteaBrowser'repoUrl
https://gitea.example.com then the URL for bob's skunkworks project repository might be https://gitea.example.com/bob/skunkworks
String$class: 'GithubWeb'$class: 'GithubWeb'repoUrl
String$class: 'Gitiles'$class: 'Gitiles'repoUrl
String$class: 'GitoriousWeb'$class: 'GitoriousWeb'repoUrl
String$class: 'GogsGit'$class: 'GogsGit'repoUrl
String$class: 'KilnGit'$class: 'KilnGit'repoUrl
String$class: 'Phabricator'$class: 'Phabricator'repoUrl
Stringrepo
String$class: 'RedmineWeb'$class: 'RedmineWeb'repoUrl
String$class: 'RhodeCode'$class: 'RhodeCode'repoUrl
String$class: 'ScmManagerGitRepositoryBrowser'$class: 'ScmManagerGitRepositoryBrowser'repoUrl
String$class: 'Stash'$class: 'Stash'repoUrl
String$class: 'TFS2013GitRepositoryBrowser'$class: 'TFS2013GitRepositoryBrowser'repoUrl
If TFS is also used as the repository server, this can usually be left blank.
String$class: 'TracGitRepositoryBrowser'$class: 'TracGitRepositoryBrowser'$class: 'TuleapBrowser'$class: 'TuleapBrowser'repositoryUrl
String$class: 'ViewGitWeb'$class: 'ViewGitWeb'repoUrl
StringprojectName
String$class: 'GitHubAgedRefsTrait'$class: 'GitHubAgedRefsTrait'retentionDays
StringgitHubBranchCommitSkipTraitgitHubBranchCommitSkipTraitgitHubCommitSkipTraitgitHubCommitSkipTrait$class: 'GitHubJiraValidatorTrait'$class: 'GitHubJiraValidatorTrait'jiraServerIdx
int$class: 'GitHubSCMSourceChecksTrait'$class: 'GitHubSCMSourceChecksTrait'verboseConsoleLog (optional)
boolean$class: 'GitHubSCMSourceStatusChecksTrait'$class: 'GitHubSCMSourceStatusChecksTrait'name (optional)
Stringskip (optional)
booleanskipNotifications (optional)
booleanskipProgressUpdates (optional)
booleansuppressLogs (optional)
booleanunstableBuildNeutral (optional)
boolean$class: 'GitLFSPullTrait'$class: 'GitLFSPullTrait'gitlabAvatargitlabAvatardisableProjectAvatar (optional)
booleangitlabSkipNotificationsgitlabSkipNotifications$class: 'GitToolSCMSourceTrait'$class: 'GitToolSCMSourceTrait'gitTool
String$class: 'HookRegistrationTrait'$class: 'HookRegistrationTrait'webHookMode
StringsystemHookMode
StringgitHubIgnoreDraftPullRequestFiltergitHubIgnoreDraftPullRequestFilter$class: 'IgnoreOnPushNotificationTrait'$class: 'IgnoreOnPushNotificationTrait'jervisFilterjervisFilterThis will look at the root of a GitHub reference for .jervis.yml for the branches and tags filtering. You can customize the name of the YAML file searched for if you like.
For Tags:
For Branches:
branches:
only:
- master
By default Jervis will generate Jenkins jobs for all branches that have a .jervis.yml file. You can control and limit this behavior by specifying the branches or tags key in your .jervis.yml.
You can either whitelist or blacklist branches that you want to be built:
# blacklist
branches:
except:
- legacy
- experimental
# whitelist
branches:
only:
- master
- stable
The same YAML can be applied to tags.
# blacklist
tags:
except:
- .*-rc
- .*-beta
# whitelist
tags:
only:
- v[.0-9]+
If you specify both only and except, then except will be ignored. .jervis.yml needs to be present on all branches you want to be built. .jervis.yml will be interpreted in the context of that branch so if you specify a whitelist in your master branch it will not propagate to other branches.
You can use regular expressions to whitelist or blacklist branches:
branches:
only:
- master
- /^[.0-9]+-hotfix$/
Any name surrounded with / in the list of branches is treated as a regular expression. The expression will use Pattern.compile to compile the regex string into a Groovy regular expression.
yamlFileName
The filename which will be read from GitHub to determine if a Jenkins branch, tag, or pull request should be built. Provide a comma separated list of paths to YAML files in a repository and it will check each path as a fallback.
For example, set the value to: .jervis.yml, .ci/jervis.yml and this plugin will first check for valid YAML in .jervis.yml. If no YAML exists, then it will fall back to checking .ci/jervis.yml.
String$class: 'LocalBranchTrait'$class: 'LocalBranchTrait'logCommentlogCommentlogSuccess (optional)
booleansudoUser (optional)
String$class: 'MercurialBrowserSCMSourceTrait'$class: 'MercurialBrowserSCMSourceTrait'browser
$class: 'FishEye'$class: 'FishEye'url
String$class: 'GoogleCode'$class: 'GoogleCode'url
String$class: 'HgWeb'$class: 'HgWeb'url
String$class: 'Kallithea'$class: 'Kallithea'url
String$class: 'KilnHG'$class: 'KilnHG'url
String$class: 'RhodeCode'$class: 'RhodeCode'url
String$class: 'RhodeCodeLegacy'$class: 'RhodeCodeLegacy'url
String$class: 'ScmManager'$class: 'ScmManager'url
http://YOURSCMMANAGER/scm/repo/NAMESPACE/NAME/).
String$class: 'MercurialInstallationSCMSourceTrait'$class: 'MercurialInstallationSCMSourceTrait'installation
String$class: 'NotificationContextTrait'$class: 'NotificationContextTrait'contextLabel
StringtypeSuffix
Appends the relevant suffix to the context label based on the build type. '/pr-merge', '/pr-head' or '/branch'
booleannotificationsSkipnotificationsSkipgitLabOriginDiscoverygitLabOriginDiscoverystrategyId
int$class: 'PathBasedPullRequestFilterTrait'$class: 'PathBasedPullRequestFilterTrait'inclusionField
StringexclusionField
String$class: 'PreBuildMergeTrait'$class: 'PreBuildMergeTrait'extension
optionsoptions
mergeTargetmergeTarget
master.
StringfastForwardModefastForwardMode (optional)
FF, FF_ONLY, NO_FFmergeRemotemergeRemote (optional)
origin, that contains the branch you specify below. If left blank, it'll default to the name of the first repository configured above.
StringmergeStrategymergeStrategy (optional)
DEFAULT, RESOLVE, RECURSIVE, OCTOPUS, OURS, SUBTREE, RECURSIVE_THEIRS$class: 'PretestedIntegrationSCMTrait'$class: 'PretestedIntegrationSCMTrait'extension
gitIntegrationStrategygitIntegrationStrategy
accumulatedaccumulatedsquashsquashintegrationBranchintegrationBranch
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>
StringrepoNamerepoName
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
String$class: 'PruneStaleBranchTrait'$class: 'PruneStaleBranchTrait'$class: 'PruneStaleTagTrait'$class: 'PruneStaleTagTrait'bitbucketPublicRepoPullRequestFilterbitbucketPublicRepoPullRequestFilter$class: 'PullRequestDiscoveryTrait'$class: 'PullRequestDiscoveryTrait'excludeBranchesWithPRs
boolean$class: 'PullRequestLabelsBlackListFilterTrait'$class: 'PullRequestLabelsBlackListFilterTrait'labels
String$class: 'PullRequestLabelsMatchAllFilterTrait'$class: 'PullRequestLabelsMatchAllFilterTrait'labels
String$class: 'PullRequestLabelsMatchAnyFilterTrait'$class: 'PullRequestLabelsMatchAnyFilterTrait'labels
String$class: 'PullRequestNameFilterTrait'$class: 'PullRequestNameFilterTrait'strategyId
intphrase
StringignoreCase
booleanregex
boolean$class: 'RefSpecsSCMSourceTrait'$class: 'RefSpecsSCMSourceTrait'templates
valuevalue
@{remote} will be replaced by the remote name (which defaults to origin) before use.
StringheadRegexFilterWithPRFromOriginheadRegexFilterWithPRFromOriginregex
StringtagRegex
String$class: 'RemoteNameSCMSourceTrait'$class: 'RemoteNameSCMSourceTrait'remoteName
StringskipNotificationsskipNotifications$class: 'SparseCheckoutPathsTrait'$class: 'SparseCheckoutPathsTrait'extension
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
sparseCheckoutPathssparseCheckoutPaths
pathpath
String$class: 'SubmoduleOptionTrait'$class: 'SubmoduleOptionTrait'extension
disableSubmodulesdisableSubmodules
booleanrecursiveSubmodulesrecursiveSubmodules
booleantrackingSubmodulestrackingSubmodules
booleanreferencereference
git init --bare git remote add SubProject1 https://gitrepo.com/subproject1 git remote add SubProject2 https://gitrepo.com/subproject2 git fetch --all
Stringtimeouttimeout
intparentCredentialsparentCredentials
booleandepthdepth (optional)
intshallowshallow (optional)
booleanthreadsthreads (optional)
intmrTriggerCommentmrTriggerCommentcommentBody
StringonlyTrustedMembersCanTrigger
booleantuleapBranchDiscoverytuleapBranchDiscoverytuleapNotifyPullRequesttuleapNotifyPullRequesttuleapForkPullRequestDiscoverytuleapForkPullRequestDiscoverytuleapPullRequestDiscoverytuleapPullRequestDiscovery$class: 'UserIdentityTrait'$class: 'UserIdentityTrait'extension
namename
If given, "GIT_COMMITTER_NAME=[this]" and "GIT_AUTHOR_NAME=[this]" are set for builds. This overrides whatever is in the global settings.
Stringemailemail
If given, "GIT_COMMITTER_EMAIL=[this]" and "GIT_AUTHOR_EMAIL=[this]" are set for builds. This overrides whatever is in the global settings.
StringbitbucketWebhookConfigurationbitbucketWebhookConfigurationSets the value for committersToIgnore in the Bitbucket Webhook. Value should be a comma separated string.
committerToIgnore is used to prevent triggering Jenkins builds when commits by certain users are made.
committersToIgnore
StringheadWildcardFilterWithPRFromOriginheadWildcardFilterWithPRFromOriginincludes
* as a wildcard; for example: master release*
Stringexcludes
release
StringtagIncludes
* as a wildcard; for example: *-1.* to build only 1.0 tags from the maven release plugin.
StringtagExcludes
*-0.*
String$class: 'WipeWorkspaceTrait'$class: 'WipeWorkspaceTrait'bitbucketBranchDiscoverybitbucketBranchDiscoverystrategyId
intbitbucketForkDiscoverybitbucketForkDiscoverystrategyId
inttrust
One of the great powers of pull requests is that anyone with read access to a repository can fork it, commit some changes to their fork and then create a pull request against the original repository with their changes. There are some files stored in source control that are important. For example, a Jenkinsfile may contain configuration details to sandbox pull requests in order to mitigate against malicious pull requests. In order to protect against a malicious pull request itself modifying the Jenkinsfile to remove the protections, you can define the trust policy for pull requests from forks.
Other plugins can extend the available trust policies. The default policies are:
Jenkinsfile) the contents of that file will be retrieved from the target branch on the origin repository and not from the pull request branch on the fork repository.
jenkins.scm.api.trait.SCMHeadAuthority<? super com.cloudbees.jenkins.plugins.bitbucket.BitbucketSCMSourceRequest, ? extends jenkins.scm.api.mixin.ChangeRequestSCMHead2, ? extends jenkins.scm.api.SCMRevision>bitbucketPullRequestDiscoverybitbucketPullRequestDiscoverystrategyId
intbitbucketSshCheckoutbitbucketSshCheckouthttps:// protocol for the Git repository.
This behaviour allows you to select the SSH private key to be used for checking out sources, which will consequently force the checkout to use the ssh:// protocol.
credentialsId
It must be a SSH key based credential.
StringbitbucketTagDiscoverybitbucketTagDiscoverybitbucketWebhookRegistrationbitbucketWebhookRegistrationOverrides the defaults for webhook management.
Webhooks are used to inform Jenkins about changes to repositories. There are two ways webhooks can be configured:
The Manage Jenkins » Configure Jenkins › Bitbucket Endpoints allows defining the list of servers. Each server can be associated with credentials. If credentials are defined then the default behaviour is to use those credentials to automatically manage the webhooks of all repositories that Jenkins is interested in. If no credentials are defined then the default behaviour is to require the user to manually configure webhooks.
mode
String$class: 'com.cloudogu.scmmanager.scm.BranchDiscoveryTrait'$class: 'com.cloudogu.scmmanager.scm.BranchDiscoveryTrait'$class: 'com.cloudogu.scmmanager.scm.TagDiscoveryTrait'$class: 'com.cloudogu.scmmanager.scm.TagDiscoveryTrait'dagshubBranchDiscoverydagshubBranchDiscovery$class: 'io.jenkins.plugins.dagshubbranchsource.traits.ForkPullRequestDiscoveryTrait'$class: 'io.jenkins.plugins.dagshubbranchsource.traits.ForkPullRequestDiscoveryTrait'buildOnPullHead (optional)
boolean$class: 'io.jenkins.plugins.dagshubbranchsource.traits.OriginPullRequestDiscoveryTrait'$class: 'io.jenkins.plugins.dagshubbranchsource.traits.OriginPullRequestDiscoveryTrait'buildOnPullHead (optional)
booleandagshubTagDiscoverydagshubTagDiscoverygitLabBranchDiscoverygitLabBranchDiscoverystrategyId
int$class: 'io.jenkins.plugins.gitlabbranchsource.SSHCheckoutTrait'$class: 'io.jenkins.plugins.gitlabbranchsource.SSHCheckoutTrait'https:// protocol for the Git repository.
This behaviour allows you to select the SSH private key to be used for checking out sources, which will consequently force the checkout to use the ssh:// protocol.
credentialsId
StringgitLabTagDiscoverygitLabTagDiscoverygitBranchDiscoverygitBranchDiscoverygitTagDiscoverygitTagDiscoveryheadRegexFilterheadRegexFilterregex
StringheadWildcardFilterheadWildcardFilterincludes
* as a wildcard; for example: master release*
Stringexcludes
release alpha-* beta-*
StringheadRegexFilterWithPRheadRegexFilterWithPRregex
StringtagRegex
StringheadWildcardFilterWithPRheadWildcardFilterWithPRincludes
* as a wildcard; for example: master release*
Stringexcludes
release
StringtagIncludes
* as a wildcard; for example: *-1.* to build only 1.0 tags from the maven release plugin.
StringtagExcludes
*-0.*
StringgiteaBranchDiscoverygiteaBranchDiscoverystrategyId
intgiteaForkDiscoverygiteaForkDiscoverystrategyId
inttrust
One of the great powers of pull requests is that anyone with read access to a repository can fork it, commit some changes to their fork and then create a pull request against the original repository with their changes. There are some files stored in source control that are important. For example, a Jenkinsfile may contain configuration details to sandbox pull requests in order to mitigate against malicious pull requests. In order to protect against a malicious pull request itself modifying the Jenkinsfile to remove the protections, you can define the trust policy for pull requests from forks.
Other plugins can extend the available trust policies. The default policies are:
Jenkinsfile) the contents of that file will be retrieved from the target branch on the origin repository and not from the pull request branch on the fork repository.
Nobody.
gitLabTrustMembersgitLabTrustMembersbitbucketTrustTeambitbucketTrustTeambitbucketTrustEveryonebitbucketTrustEveryonebitbucketTrustNobodybitbucketTrustNobodygitLabTrustEveryonegitLabTrustEveryonegitLabTrustNobodygitLabTrustNobodygitLabTrustPermissionsgitLabTrustPermissionsgiteaTrustContributorsgiteaTrustContributorsgiteaTrustEveryonegiteaTrustEveryonegiteaTrustNobodygiteaTrustNobodygitHubTrustContributorsgitHubTrustContributorsgitHubTrustEveryonegitHubTrustEveryonegitHubTrustNobodygitHubTrustNobodygitHubTrustPermissionsgitHubTrustPermissionsgiteaPullRequestDiscoverygiteaPullRequestDiscoverystrategyId
intgiteaSSHCheckoutgiteaSSHCheckouthttps:// protocol for the Git repository.
This behaviour allows you to select the SSH private key to be used for checking out sources, which will consequently force the checkout to use the ssh:// protocol.
credentialsId
StringgiteaTagDiscoverygiteaTagDiscoverygiteaWebhookRegistrationgiteaWebhookRegistrationOverrides the defaults for webhook management.
Webhooks are used to inform Jenkins about changes to repositories. There are two ways webhooks can be configured:
The Manage Jenkins » Configure System › Gitea Server allows defining the list of servers. Each server can be associated with credentials. If credentials are defined then the default behaviour is to use those credentials to automatically manage the webhooks of all repositories that Jenkins is interested in. If no credentials are defined then the default behaviour is to require the user to manually configure webhooks.
mode
StringgitHubBranchDiscoverygitHubBranchDiscoverystrategyId
env.GIT_BRANCH will be set to the branch name rather than PR-#. Also, status notifications for these builds will only be applied to the commit and not to the pull request.
intgitHubForkDiscoverygitHubForkDiscoverystrategyId
inttrust
One of the great powers of pull requests is that anyone with read access to a repository can fork it, commit some changes to their fork and then create a pull request against the original repository with their changes. There are some files stored in source control that are important. For example, a Jenkinsfile may contain configuration details to sandbox pull requests in order to mitigate against malicious pull requests. In order to protect against a malicious pull request itself modifying the Jenkinsfile to remove the protections, you can define the trust policy for pull requests from forks.
Other plugins can extend the available trust policies. The default policies are:
Jenkinsfile) the contents of that file will be retrieved from the target branch on the origin repository and not from the pull request branch on the fork repository.
Nobody. NOTE: all collaborators are trusted, even if they are only members of a team with read permission.
jenkins.scm.api.trait.SCMHeadAuthority<? super org.jenkinsci.plugins.github_branch_source.GitHubSCMSourceRequest, ? extends jenkins.scm.api.mixin.ChangeRequestSCMHead2, ? extends jenkins.scm.api.SCMRevision>gitHubPullRequestDiscoverygitHubPullRequestDiscoverystrategyId
intgitHubSshCheckoutgitHubSshCheckouthttps:// protocol for the Git repository.
This behaviour allows you to select the SSH private key to be used for checking out sources, which will consequently force the checkout to use the ssh:// protocol.
credentialsId
StringgitHubTagDiscoverygitHubTagDiscovery$class: 'SubversionSCMSource'$class: 'SubversionSCMSource'remoteBase
Stringid (optional)
Stringbrowser (optional)
$class: 'Assembla'$class: 'Assembla'spaceName
String$class: 'BacklogRepositoryBrowser'$class: 'BacklogRepositoryBrowser'url
When no value is set, project of "Backlog URL" set above is used.
String$class: 'Phabricator'$class: 'Phabricator'url
Stringrepo
String$class: 'PolarionRepositoryBrowser'$class: 'PolarionRepositoryBrowser'url
Stringlocation
String$class: 'RedmineRepositoryBrowser'$class: 'RedmineRepositoryBrowser'repositoryId
String$class: 'SVNWeb'$class: 'SVNWeb'url
String$class: 'ScmManagerSvnRepositoryBrowser'$class: 'ScmManagerSvnRepositoryBrowser'repoUrl
String$class: 'TeamForge'$class: 'TeamForge'connectionFactory
urlurl
This should be the URL of your CollabNet TeamForge site. It should be of the form 'https://forge.collab.net'.
Stringusernameusername
The user who will upload the files.
Stringpasswordpassword
The password for the user specified above. If incorrectly given, the login to the CollabNet TeamForge server will fail.
Stringproject
Stringrepo
String$class: 'TracRepositoryBrowser'$class: 'TracRepositoryBrowser'$class: 'ViewVCRepositoryBrowser'$class: 'ViewVCRepositoryBrowser'url
Stringlocation
String$class: 'VisualSVN'$class: 'VisualSVN'url
StringcredentialsId (optional)
Stringexcludes (optional)
Stringincludes (optional)
StringworkspaceUpdater (optional)
$class: 'CheckoutUpdater'$class: 'CheckoutUpdater'$class: 'NoopUpdater'$class: 'NoopUpdater'$class: 'UpdateUpdater'$class: 'UpdateUpdater'$class: 'UpdateWithCleanUpdater'$class: 'UpdateWithCleanUpdater'$class: 'UpdateWithRevertUpdater'$class: 'UpdateWithRevertUpdater'multiSwarmmultiSwarmcredential
Stringcharset (optional)
Stringformat (optional)
Stringexcludes (optional)
A regular expression to exclude matching branch names with in the Swarm project
Stringfilter (optional)
latestlatestlatestChange
booleanpathFilterpathFilterpath
Changes can be filtered to not trigger a build; if all the files within a change match the specified path, the build is filtered.
For example, with a Filter of " //depot/main/tests ":
Case A (change will be filtered):
Files:
//depot/main/tests/index.xml //depot/main/tests/001/test.xml //depot/main/tests/002/test.xml Case B (change will not be filtered, as build.xml is outside of the filter):
Files:
//depot/main/src/build.xml //depot/main/tests/004/test.xml //depot/main/tests/005/test.xml This is not Perforce syntax. Use of ... and * patterns are not supported. Only paths to directories are supported.
StringviewPatternviewPatternpatternText
Changes can be filtered to not trigger a build; if none of the files within a change match a Java pattern (regular expression) listed, the build is filtered.
For example, with the following regular expressions:
//depot/main/tests.*
//depot/main/src/.*\.cpp
//depot/main/build/.*(?:\.rb|\.py|\.bat|Jenkinsfile)
//depot/main/lib/(?!Lib1|Lib2).*
Case A (change will not be filtered, as these files match our first pattern on "tests"):
Files:
//depot/main/tests/CONTRIUBTING.md //depot/main/tests/001/index.xml Case B (Be careful with incomplete file paths! Change will NOT be filtered,
as this file matches a pattern which was likely intended as describing a "tests/" directory.)
Files:
//depot/main/tests.doc Case C (change will NOT be filtered, as all files match our fourth pattern looking for script files in 'build/'):
Files:
//depot/main/build/rbs/deploy_server.rb //depot/main/build/deploy/deploy.bat //depot/main/build/Jenkinsfile Case D (change will be filtered, as no file matches our second pattern for ".cpp" files under "main/src"):
Files:
//depot/main/src/howto.doc //depot/main/src/oldmain.c //depot/main/src/art/splash.bmp //depot/main/src/bt/funnelcake.php Case E (change will be filtered. Lib1 is included in a negative lookahead, and thus is excluded.)
Files:
//depot/main/lib/Lib1/build.xml StringcaseSensitive
booleanincrementalincrementalperChange
When enabled, only the one, oldest changelist returned by polling is built.
If P4_INCREMENTAL environment variable (or build parameter) is set to "false", polling per change is ignored and all changelists are built.
booleanuserFilteruserFilteruser
Changes can be filtered to not trigger a build; if the owner of a change matches the specified name, the build is filtered.
StringviewFilterviewFilterviewMask
Changes can be filtered to not trigger a build; if none of the files within a change are contained in the view mask, the build is filtered.
For example, with a View Mask Filter of:
//depot/main/tests
-//depot/main/tests/001
Case A (change will not be filtered, as index.xml is in the view mask):
Files:
//depot/main/tests/index.xml //depot/main/tests/001/test.xml Case B (change will not be filtered, as index.xml is in the view mask):
Files:
//depot/main/test/index.xml //depot/main/src/build.xml Case C (change will be filtered, as no file is in the view mask):
Files:
//depot/main/src/build.xml Case D (change will be filtered, as no file is in the view mask):
Files:
//depot/main/src/build.xml //depot/main/tests/001/test.xml Stringid (optional)
Stringincludes (optional)
Stringpopulate (optional)
autoCleanautoCleanreplace
Perforce will check out and overwrite any depot files which are either missing from workspace, or have been modified locally.
booleandelete
Perforce will delete any local files that are not in the depot.
booleantidy
booleanmodtime
booleanquiet
Enables the -q flag for all applicable Perforce operations. Summary details will still be displayed.
booleanpin
When a build is triggered by Polling, Build Now or an external Action, the workspace will sync only to the specified label. Any other specified change or label will be ignored.
Supports variable expansion e.g. ${VAR}. If 'now' is used, or a variable that expands to 'now', then the latest change is used (within the scope of the workspace view).
Stringparallel
enableenable
booleanpathpath
Stringthreadsthreads
Stringminfilesminfiles
Stringminbytesminbytes
StringpreviewOnlypreviewOnlyquiet
Enables the -q flag for all applicable Perforce operations. Summary details will still be displayed.
booleanpin
StringflushOnlyflushOnlyquiet
booleanpin
When a build is triggered by Polling, Build Now or an external Action, the workspace will flush only to the specified label or changelist number. Any other specified change or label will be ignored.
Supports variable expansion e.g. ${VAR}. If 'now' is used, or a variable that expands to 'now', then the latest change is used (within the scope of the workspace view).
StringforceCleanforceCleanhave
booleanquiet
Enables the -q flag for all applicable Perforce operations. Summary details will still be displayed.
booleanpin
When a build is triggered by Polling, Build Now or an external Action, the workspace will sync only to the specified label. Any other specified change or label will be ignored.
Supports variable expansion e.g. ${VAR}. If 'now' is used, or a variable that expands to 'now', then the latest change is used (within the scope of the workspace view).
Stringparallel
enableenable
booleanpathpath
Stringthreadsthreads
Stringminfilesminfiles
Stringminbytesminbytes
StringgraphCleangraphCleanquiet
Enables the -q flag for all applicable Perforce operations. Summary details will still be displayed.
booleanpin
When a build is triggered by Polling, Build Now or an external Action, the workspace will sync only to the specified label. Any other specified change or label will be ignored.
Supports variable expansion e.g. ${VAR}. If 'now' is used, or a variable that expands to 'now', then the latest change is used (within the scope of the workspace view).
Stringparallel
enableenable
booleanpathpath
Stringthreadsthreads
Stringminfilesminfiles
Stringminbytesminbytes
StringsyncOnlysyncOnlyrevert
booleanhave
booleanforce
booleanmodtime
booleanquiet
Enables the -q flag for all applicable Perforce operations. Summary details will still be displayed.
booleanpin
When a build is triggered by Polling, Build Now or an external Action, the workspace will sync only to the specified label. Any other specified change or label will be ignored.
Supports variable expansion e.g. ${VAR}. If 'now' is used, or a variable that expands to 'now', then the latest change is used (within the scope of the workspace view).
Stringparallel
enableenable
booleanpathpath
Stringthreadsthreads
Stringminfilesminfiles
Stringminbytesminbytes
Stringproject (optional)
Stringtraits (optional)
$class: 'ApprovedPullRequestTrait'$class: 'ApprovedPullRequestTrait'strategyId
int$class: 'AuthorInChangelogTrait'$class: 'AuthorInChangelogTrait'$class: 'BitbucketAgedRefsTrait'$class: 'BitbucketAgedRefsTrait'retentionDays
StringbitbucketBranchCommitSkipTraitbitbucketBranchCommitSkipTraitbitbucketBuildStatusNotificationsbitbucketBuildStatusNotificationssendSuccessNotificationForUnstableBuild (optional)
booleanbitbucketCommitSkipTraitbitbucketCommitSkipTrait$class: 'BitbucketJiraValidatorTrait'$class: 'BitbucketJiraValidatorTrait'jiraServerIdx
intbuildStatusNameCustomPartbuildStatusNameCustomPartbuildStatusNameCustomPart (optional)
String$class: 'ChangeDiscoveryTrait'$class: 'ChangeDiscoveryTrait'queryString
Provide an additional query string to search for open changes. The status:open is implicitly added and does not need to be specified. See Gerrit search operators documentation for a detailed list of the supported search operators.
-is:wipdoes not include work-in-progress changes
is:privateincludes private changes
String$class: 'CheckoutOptionTrait'$class: 'CheckoutOptionTrait'extension
timeouttimeout
int$class: 'CleanAfterCheckoutTrait'$class: 'CleanAfterCheckoutTrait'extension
.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.
deleteUntrackedNestedRepositoriesdeleteUntrackedNestedRepositories (optional)
.git directories.
boolean$class: 'CleanBeforeCheckoutTrait'$class: 'CleanBeforeCheckoutTrait'extension
.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.
deleteUntrackedNestedRepositoriesdeleteUntrackedNestedRepositories (optional)
.git directories.
boolean$class: 'CleanMercurialSCMSourceTrait'$class: 'CleanMercurialSCMSourceTrait'$class: 'CloneOptionTrait'$class: 'CloneOptionTrait'extension
shallowshallow
booleannoTagsnoTags
booleanreferencereference
Stringtimeouttimeout
intdepthdepth (optional)
inthonorRefspechonorRefspec (optional)
boolean$class: 'DisableStatusUpdateTrait'$class: 'DisableStatusUpdateTrait'$class: 'DiscoverOtherRefsTrait'$class: 'DiscoverOtherRefsTrait'ref
The pattern under /refs on the remote repository to discover, can contain a wildcard.
Example: test/*/merged
StringnameMapping (optional)
Mapping for how the ref can be named in for example the @Library.
Example: test-@{1}
Where @{1} replaces the first wildcard in the ref when discovered.
By default it will be "namespace_before_wildcard-@{1}". E.g. if ref is "test/*/merged" the default mapping would be "test-@{1}".
String$class: 'FilterChecksTrait'$class: 'FilterChecksTrait'queryOperator
ID, SCHEMEqueryString
StringgitLabForkDiscoverygitLabForkDiscoverystrategyId
inttrust
One of the great powers of merge requests is that anyone with read access to a project can fork it, commit some changes to their fork and then create a merge request against the original project with their changes. There are some files stored in source control that are important. For example, a Jenkinsfile may contain configuration details to sandbox merge requests in order to mitigate against malicious merge requests. In order to protect against a malicious merge request itself modifying the Jenkinsfile to remove the protections, you can define the trust policy for merge requests from forks.
Other plugins can extend the available trust policies. The default policies are:
Jenkinsfile) the contents of that file will be retrieved from the target branch on the origin project and not from the merge request branch on the fork project.
Nobody.
jenkins.scm.api.trait.SCMHeadAuthority<? super io.jenkins.plugins.gitlabbranchsource.GitLabSCMSourceRequest, ? extends jenkins.scm.api.mixin.ChangeRequestSCMHead2, ? extends jenkins.scm.api.SCMRevision>$class: 'GitBrowserSCMSourceTrait'$class: 'GitBrowserSCMSourceTrait'browser
$class: 'AssemblaWeb'$class: 'AssemblaWeb'repoUrl
String$class: 'BacklogGitRepositoryBrowser'$class: 'BacklogGitRepositoryBrowser'repoName
StringrepoUrl
StringbitbucketServerbitbucketServerrepoUrl
String$class: 'BitbucketWeb'$class: 'BitbucketWeb'repoUrl
String$class: 'CGit'$class: 'CGit'repoUrl
String$class: 'FisheyeGitRepositoryBrowser'$class: 'FisheyeGitRepositoryBrowser'repoUrl
String$class: 'GitBlitRepositoryBrowser'$class: 'GitBlitRepositoryBrowser'repoUrl
StringprojectName
String$class: 'GitBucketBrowser'$class: 'GitBucketBrowser'url
String$class: 'GitLab'$class: 'GitLab'repoUrl
Stringversion (optional)
String$class: 'GitLabBrowser'$class: 'GitLabBrowser'https://gitLab.example.com then the URL for bob's skunkworks project might be https://gitLab.example.com/bob/skunkworks.
projectUrl
https://gitLab.example.com then the URL for bob's skunkworks project might be https://gitLab.example.com/bob/skunkworks
String$class: 'GitList'$class: 'GitList'repoUrl
String$class: 'GitWeb'$class: 'GitWeb'repoUrl
String$class: 'GiteaBrowser'$class: 'GiteaBrowser'repoUrl
https://gitea.example.com then the URL for bob's skunkworks project repository might be https://gitea.example.com/bob/skunkworks
String$class: 'GithubWeb'$class: 'GithubWeb'repoUrl
String$class: 'Gitiles'$class: 'Gitiles'repoUrl
String$class: 'GitoriousWeb'$class: 'GitoriousWeb'repoUrl
String$class: 'GogsGit'$class: 'GogsGit'repoUrl
String$class: 'KilnGit'$class: 'KilnGit'repoUrl
String$class: 'Phabricator'$class: 'Phabricator'repoUrl
Stringrepo
String$class: 'RedmineWeb'$class: 'RedmineWeb'repoUrl
String$class: 'RhodeCode'$class: 'RhodeCode'repoUrl
String$class: 'ScmManagerGitRepositoryBrowser'$class: 'ScmManagerGitRepositoryBrowser'repoUrl
String$class: 'Stash'$class: 'Stash'repoUrl
String$class: 'TFS2013GitRepositoryBrowser'$class: 'TFS2013GitRepositoryBrowser'repoUrl
If TFS is also used as the repository server, this can usually be left blank.
String$class: 'TracGitRepositoryBrowser'$class: 'TracGitRepositoryBrowser'$class: 'TuleapBrowser'$class: 'TuleapBrowser'repositoryUrl
String$class: 'ViewGitWeb'$class: 'ViewGitWeb'repoUrl
StringprojectName
String$class: 'GitHubAgedRefsTrait'$class: 'GitHubAgedRefsTrait'retentionDays
StringgitHubBranchCommitSkipTraitgitHubBranchCommitSkipTraitgitHubCommitSkipTraitgitHubCommitSkipTrait$class: 'GitHubJiraValidatorTrait'$class: 'GitHubJiraValidatorTrait'jiraServerIdx
int$class: 'GitHubSCMSourceChecksTrait'$class: 'GitHubSCMSourceChecksTrait'verboseConsoleLog (optional)
boolean$class: 'GitHubSCMSourceStatusChecksTrait'$class: 'GitHubSCMSourceStatusChecksTrait'name (optional)
Stringskip (optional)
booleanskipNotifications (optional)
booleanskipProgressUpdates (optional)
booleansuppressLogs (optional)
booleanunstableBuildNeutral (optional)
boolean$class: 'GitLFSPullTrait'$class: 'GitLFSPullTrait'gitlabAvatargitlabAvatardisableProjectAvatar (optional)
booleangitlabSkipNotificationsgitlabSkipNotifications$class: 'GitToolSCMSourceTrait'$class: 'GitToolSCMSourceTrait'gitTool
String$class: 'HookRegistrationTrait'$class: 'HookRegistrationTrait'webHookMode
StringsystemHookMode
StringgitHubIgnoreDraftPullRequestFiltergitHubIgnoreDraftPullRequestFilter$class: 'IgnoreOnPushNotificationTrait'$class: 'IgnoreOnPushNotificationTrait'jervisFilterjervisFilterThis will look at the root of a GitHub reference for .jervis.yml for the branches and tags filtering. You can customize the name of the YAML file searched for if you like.
For Tags:
For Branches:
branches:
only:
- master
By default Jervis will generate Jenkins jobs for all branches that have a .jervis.yml file. You can control and limit this behavior by specifying the branches or tags key in your .jervis.yml.
You can either whitelist or blacklist branches that you want to be built:
# blacklist
branches:
except:
- legacy
- experimental
# whitelist
branches:
only:
- master
- stable
The same YAML can be applied to tags.
# blacklist
tags:
except:
- .*-rc
- .*-beta
# whitelist
tags:
only:
- v[.0-9]+
If you specify both only and except, then except will be ignored. .jervis.yml needs to be present on all branches you want to be built. .jervis.yml will be interpreted in the context of that branch so if you specify a whitelist in your master branch it will not propagate to other branches.
You can use regular expressions to whitelist or blacklist branches:
branches:
only:
- master
- /^[.0-9]+-hotfix$/
Any name surrounded with / in the list of branches is treated as a regular expression. The expression will use Pattern.compile to compile the regex string into a Groovy regular expression.
yamlFileName
The filename which will be read from GitHub to determine if a Jenkins branch, tag, or pull request should be built. Provide a comma separated list of paths to YAML files in a repository and it will check each path as a fallback.
For example, set the value to: .jervis.yml, .ci/jervis.yml and this plugin will first check for valid YAML in .jervis.yml. If no YAML exists, then it will fall back to checking .ci/jervis.yml.
String$class: 'LocalBranchTrait'$class: 'LocalBranchTrait'logCommentlogCommentlogSuccess (optional)
booleansudoUser (optional)
String$class: 'MercurialBrowserSCMSourceTrait'$class: 'MercurialBrowserSCMSourceTrait'browser
$class: 'FishEye'$class: 'FishEye'url
String$class: 'GoogleCode'$class: 'GoogleCode'url
String$class: 'HgWeb'$class: 'HgWeb'url
String$class: 'Kallithea'$class: 'Kallithea'url
String$class: 'KilnHG'$class: 'KilnHG'url
String$class: 'RhodeCode'$class: 'RhodeCode'url
String$class: 'RhodeCodeLegacy'$class: 'RhodeCodeLegacy'url
String$class: 'ScmManager'$class: 'ScmManager'url
http://YOURSCMMANAGER/scm/repo/NAMESPACE/NAME/).
String$class: 'MercurialInstallationSCMSourceTrait'$class: 'MercurialInstallationSCMSourceTrait'installation
String$class: 'NotificationContextTrait'$class: 'NotificationContextTrait'contextLabel
StringtypeSuffix
Appends the relevant suffix to the context label based on the build type. '/pr-merge', '/pr-head' or '/branch'
booleannotificationsSkipnotificationsSkipgitLabOriginDiscoverygitLabOriginDiscoverystrategyId
int$class: 'PathBasedPullRequestFilterTrait'$class: 'PathBasedPullRequestFilterTrait'inclusionField
StringexclusionField
String$class: 'PreBuildMergeTrait'$class: 'PreBuildMergeTrait'extension
optionsoptions
mergeTargetmergeTarget
master.
StringfastForwardModefastForwardMode (optional)
FF, FF_ONLY, NO_FFmergeRemotemergeRemote (optional)
origin, that contains the branch you specify below. If left blank, it'll default to the name of the first repository configured above.
StringmergeStrategymergeStrategy (optional)
DEFAULT, RESOLVE, RECURSIVE, OCTOPUS, OURS, SUBTREE, RECURSIVE_THEIRS$class: 'PretestedIntegrationSCMTrait'$class: 'PretestedIntegrationSCMTrait'extension
gitIntegrationStrategygitIntegrationStrategy
accumulatedaccumulatedsquashsquashintegrationBranchintegrationBranch
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>
StringrepoNamerepoName
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
String$class: 'PruneStaleBranchTrait'$class: 'PruneStaleBranchTrait'$class: 'PruneStaleTagTrait'$class: 'PruneStaleTagTrait'bitbucketPublicRepoPullRequestFilterbitbucketPublicRepoPullRequestFilter$class: 'PullRequestDiscoveryTrait'$class: 'PullRequestDiscoveryTrait'excludeBranchesWithPRs
boolean$class: 'PullRequestLabelsBlackListFilterTrait'$class: 'PullRequestLabelsBlackListFilterTrait'labels
String$class: 'PullRequestLabelsMatchAllFilterTrait'$class: 'PullRequestLabelsMatchAllFilterTrait'labels
String$class: 'PullRequestLabelsMatchAnyFilterTrait'$class: 'PullRequestLabelsMatchAnyFilterTrait'labels
String$class: 'PullRequestNameFilterTrait'$class: 'PullRequestNameFilterTrait'strategyId
intphrase
StringignoreCase
booleanregex
boolean$class: 'RefSpecsSCMSourceTrait'$class: 'RefSpecsSCMSourceTrait'templates
valuevalue
@{remote} will be replaced by the remote name (which defaults to origin) before use.
StringheadRegexFilterWithPRFromOriginheadRegexFilterWithPRFromOriginregex
StringtagRegex
String$class: 'RemoteNameSCMSourceTrait'$class: 'RemoteNameSCMSourceTrait'remoteName
StringskipNotificationsskipNotifications$class: 'SparseCheckoutPathsTrait'$class: 'SparseCheckoutPathsTrait'extension
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
sparseCheckoutPathssparseCheckoutPaths
pathpath
String$class: 'SubmoduleOptionTrait'$class: 'SubmoduleOptionTrait'extension
disableSubmodulesdisableSubmodules
booleanrecursiveSubmodulesrecursiveSubmodules
booleantrackingSubmodulestrackingSubmodules
booleanreferencereference
git init --bare git remote add SubProject1 https://gitrepo.com/subproject1 git remote add SubProject2 https://gitrepo.com/subproject2 git fetch --all
Stringtimeouttimeout
intparentCredentialsparentCredentials
booleandepthdepth (optional)
intshallowshallow (optional)
booleanthreadsthreads (optional)
intmrTriggerCommentmrTriggerCommentcommentBody
StringonlyTrustedMembersCanTrigger
booleantuleapBranchDiscoverytuleapBranchDiscoverytuleapNotifyPullRequesttuleapNotifyPullRequesttuleapForkPullRequestDiscoverytuleapForkPullRequestDiscoverytuleapPullRequestDiscoverytuleapPullRequestDiscovery$class: 'UserIdentityTrait'$class: 'UserIdentityTrait'extension
namename
If given, "GIT_COMMITTER_NAME=[this]" and "GIT_AUTHOR_NAME=[this]" are set for builds. This overrides whatever is in the global settings.
Stringemailemail
If given, "GIT_COMMITTER_EMAIL=[this]" and "GIT_AUTHOR_EMAIL=[this]" are set for builds. This overrides whatever is in the global settings.
StringbitbucketWebhookConfigurationbitbucketWebhookConfigurationSets the value for committersToIgnore in the Bitbucket Webhook. Value should be a comma separated string.
committerToIgnore is used to prevent triggering Jenkins builds when commits by certain users are made.
committersToIgnore
StringheadWildcardFilterWithPRFromOriginheadWildcardFilterWithPRFromOriginincludes
* as a wildcard; for example: master release*
Stringexcludes
release
StringtagIncludes
* as a wildcard; for example: *-1.* to build only 1.0 tags from the maven release plugin.
StringtagExcludes
*-0.*
String$class: 'WipeWorkspaceTrait'$class: 'WipeWorkspaceTrait'bitbucketBranchDiscoverybitbucketBranchDiscoverystrategyId
intbitbucketForkDiscoverybitbucketForkDiscoverystrategyId
inttrust
One of the great powers of pull requests is that anyone with read access to a repository can fork it, commit some changes to their fork and then create a pull request against the original repository with their changes. There are some files stored in source control that are important. For example, a Jenkinsfile may contain configuration details to sandbox pull requests in order to mitigate against malicious pull requests. In order to protect against a malicious pull request itself modifying the Jenkinsfile to remove the protections, you can define the trust policy for pull requests from forks.
Other plugins can extend the available trust policies. The default policies are:
Jenkinsfile) the contents of that file will be retrieved from the target branch on the origin repository and not from the pull request branch on the fork repository.
jenkins.scm.api.trait.SCMHeadAuthority<? super com.cloudbees.jenkins.plugins.bitbucket.BitbucketSCMSourceRequest, ? extends jenkins.scm.api.mixin.ChangeRequestSCMHead2, ? extends jenkins.scm.api.SCMRevision>bitbucketPullRequestDiscoverybitbucketPullRequestDiscoverystrategyId
intbitbucketSshCheckoutbitbucketSshCheckouthttps:// protocol for the Git repository.
This behaviour allows you to select the SSH private key to be used for checking out sources, which will consequently force the checkout to use the ssh:// protocol.
credentialsId
It must be a SSH key based credential.
StringbitbucketTagDiscoverybitbucketTagDiscoverybitbucketWebhookRegistrationbitbucketWebhookRegistrationOverrides the defaults for webhook management.
Webhooks are used to inform Jenkins about changes to repositories. There are two ways webhooks can be configured:
The Manage Jenkins » Configure Jenkins › Bitbucket Endpoints allows defining the list of servers. Each server can be associated with credentials. If credentials are defined then the default behaviour is to use those credentials to automatically manage the webhooks of all repositories that Jenkins is interested in. If no credentials are defined then the default behaviour is to require the user to manually configure webhooks.
mode
String$class: 'com.cloudogu.scmmanager.scm.BranchDiscoveryTrait'$class: 'com.cloudogu.scmmanager.scm.BranchDiscoveryTrait'$class: 'com.cloudogu.scmmanager.scm.TagDiscoveryTrait'$class: 'com.cloudogu.scmmanager.scm.TagDiscoveryTrait'dagshubBranchDiscoverydagshubBranchDiscovery$class: 'io.jenkins.plugins.dagshubbranchsource.traits.ForkPullRequestDiscoveryTrait'$class: 'io.jenkins.plugins.dagshubbranchsource.traits.ForkPullRequestDiscoveryTrait'buildOnPullHead (optional)
boolean$class: 'io.jenkins.plugins.dagshubbranchsource.traits.OriginPullRequestDiscoveryTrait'$class: 'io.jenkins.plugins.dagshubbranchsource.traits.OriginPullRequestDiscoveryTrait'buildOnPullHead (optional)
booleandagshubTagDiscoverydagshubTagDiscoverygitLabBranchDiscoverygitLabBranchDiscoverystrategyId
int$class: 'io.jenkins.plugins.gitlabbranchsource.SSHCheckoutTrait'$class: 'io.jenkins.plugins.gitlabbranchsource.SSHCheckoutTrait'https:// protocol for the Git repository.
This behaviour allows you to select the SSH private key to be used for checking out sources, which will consequently force the checkout to use the ssh:// protocol.
credentialsId
StringgitLabTagDiscoverygitLabTagDiscoverygitBranchDiscoverygitBranchDiscoverygitTagDiscoverygitTagDiscoveryheadRegexFilterheadRegexFilterregex
StringheadWildcardFilterheadWildcardFilterincludes
* as a wildcard; for example: master release*
Stringexcludes
release alpha-* beta-*
StringheadRegexFilterWithPRheadRegexFilterWithPRregex
StringtagRegex
StringheadWildcardFilterWithPRheadWildcardFilterWithPRincludes
* as a wildcard; for example: master release*
Stringexcludes
release
StringtagIncludes
* as a wildcard; for example: *-1.* to build only 1.0 tags from the maven release plugin.
StringtagExcludes
*-0.*
StringgiteaBranchDiscoverygiteaBranchDiscoverystrategyId
intgiteaForkDiscoverygiteaForkDiscoverystrategyId
inttrust
One of the great powers of pull requests is that anyone with read access to a repository can fork it, commit some changes to their fork and then create a pull request against the original repository with their changes. There are some files stored in source control that are important. For example, a Jenkinsfile may contain configuration details to sandbox pull requests in order to mitigate against malicious pull requests. In order to protect against a malicious pull request itself modifying the Jenkinsfile to remove the protections, you can define the trust policy for pull requests from forks.
Other plugins can extend the available trust policies. The default policies are:
Jenkinsfile) the contents of that file will be retrieved from the target branch on the origin repository and not from the pull request branch on the fork repository.
Nobody.
gitLabTrustMembersgitLabTrustMembersbitbucketTrustTeambitbucketTrustTeambitbucketTrustEveryonebitbucketTrustEveryonebitbucketTrustNobodybitbucketTrustNobodygitLabTrustEveryonegitLabTrustEveryonegitLabTrustNobodygitLabTrustNobodygitLabTrustPermissionsgitLabTrustPermissionsgiteaTrustContributorsgiteaTrustContributorsgiteaTrustEveryonegiteaTrustEveryonegiteaTrustNobodygiteaTrustNobodygitHubTrustContributorsgitHubTrustContributorsgitHubTrustEveryonegitHubTrustEveryonegitHubTrustNobodygitHubTrustNobodygitHubTrustPermissionsgitHubTrustPermissionsgiteaPullRequestDiscoverygiteaPullRequestDiscoverystrategyId
intgiteaSSHCheckoutgiteaSSHCheckouthttps:// protocol for the Git repository.
This behaviour allows you to select the SSH private key to be used for checking out sources, which will consequently force the checkout to use the ssh:// protocol.
credentialsId
StringgiteaTagDiscoverygiteaTagDiscoverygiteaWebhookRegistrationgiteaWebhookRegistrationOverrides the defaults for webhook management.
Webhooks are used to inform Jenkins about changes to repositories. There are two ways webhooks can be configured:
The Manage Jenkins » Configure System › Gitea Server allows defining the list of servers. Each server can be associated with credentials. If credentials are defined then the default behaviour is to use those credentials to automatically manage the webhooks of all repositories that Jenkins is interested in. If no credentials are defined then the default behaviour is to require the user to manually configure webhooks.
mode
StringgitHubBranchDiscoverygitHubBranchDiscoverystrategyId
env.GIT_BRANCH will be set to the branch name rather than PR-#. Also, status notifications for these builds will only be applied to the commit and not to the pull request.
intgitHubForkDiscoverygitHubForkDiscoverystrategyId
inttrust
One of the great powers of pull requests is that anyone with read access to a repository can fork it, commit some changes to their fork and then create a pull request against the original repository with their changes. There are some files stored in source control that are important. For example, a Jenkinsfile may contain configuration details to sandbox pull requests in order to mitigate against malicious pull requests. In order to protect against a malicious pull request itself modifying the Jenkinsfile to remove the protections, you can define the trust policy for pull requests from forks.
Other plugins can extend the available trust policies. The default policies are:
Jenkinsfile) the contents of that file will be retrieved from the target branch on the origin repository and not from the pull request branch on the fork repository.
Nobody. NOTE: all collaborators are trusted, even if they are only members of a team with read permission.
jenkins.scm.api.trait.SCMHeadAuthority<? super org.jenkinsci.plugins.github_branch_source.GitHubSCMSourceRequest, ? extends jenkins.scm.api.mixin.ChangeRequestSCMHead2, ? extends jenkins.scm.api.SCMRevision>gitHubPullRequestDiscoverygitHubPullRequestDiscoverystrategyId
intgitHubSshCheckoutgitHubSshCheckouthttps:// protocol for the Git repository.
This behaviour allows you to select the SSH private key to be used for checking out sources, which will consequently force the checkout to use the ssh:// protocol.
credentialsId
StringgitHubTagDiscoverygitHubTagDiscoveryTuleapTuleapproject
class io.jenkins.plugins.tuleap_api.deprecated_client.api.TuleapProjectrepository
class io.jenkins.plugins.tuleap_api.deprecated_client.api.TuleapGitRepositorycredentialsId (optional)
Credentials to user to scan the selected project and its git repositories as well as checkout sources.
At the moment Only "username + password" credentials are supported. Other types won't be proposed (esp. API key cannot be used) because Jenkins should be able to do both REST API calls and git http operations and only username/password with Basic Authentication can do that for now.
If the project contains private repositories or if the project itself is private, given credentials should have access to this project.
Stringid (optional)
StringprojectId (optional)
Name of Tuleap project this git repository belongs to.
StringrepositoryPath (optional)
Stringtraits (optional)
$class: 'ApprovedPullRequestTrait'$class: 'ApprovedPullRequestTrait'strategyId
int$class: 'AuthorInChangelogTrait'$class: 'AuthorInChangelogTrait'$class: 'BitbucketAgedRefsTrait'$class: 'BitbucketAgedRefsTrait'retentionDays
StringbitbucketBranchCommitSkipTraitbitbucketBranchCommitSkipTraitbitbucketBuildStatusNotificationsbitbucketBuildStatusNotificationssendSuccessNotificationForUnstableBuild (optional)
booleanbitbucketCommitSkipTraitbitbucketCommitSkipTrait$class: 'BitbucketJiraValidatorTrait'$class: 'BitbucketJiraValidatorTrait'jiraServerIdx
intbuildStatusNameCustomPartbuildStatusNameCustomPartbuildStatusNameCustomPart (optional)
String$class: 'ChangeDiscoveryTrait'$class: 'ChangeDiscoveryTrait'queryString
Provide an additional query string to search for open changes. The status:open is implicitly added and does not need to be specified. See Gerrit search operators documentation for a detailed list of the supported search operators.
-is:wipdoes not include work-in-progress changes
is:privateincludes private changes
String$class: 'CheckoutOptionTrait'$class: 'CheckoutOptionTrait'extension
timeouttimeout
int$class: 'CleanAfterCheckoutTrait'$class: 'CleanAfterCheckoutTrait'extension
.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.
deleteUntrackedNestedRepositoriesdeleteUntrackedNestedRepositories (optional)
.git directories.
boolean$class: 'CleanBeforeCheckoutTrait'$class: 'CleanBeforeCheckoutTrait'extension
.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.
deleteUntrackedNestedRepositoriesdeleteUntrackedNestedRepositories (optional)
.git directories.
boolean$class: 'CleanMercurialSCMSourceTrait'$class: 'CleanMercurialSCMSourceTrait'$class: 'CloneOptionTrait'$class: 'CloneOptionTrait'extension
shallowshallow
booleannoTagsnoTags
booleanreferencereference
Stringtimeouttimeout
intdepthdepth (optional)
inthonorRefspechonorRefspec (optional)
boolean$class: 'DisableStatusUpdateTrait'$class: 'DisableStatusUpdateTrait'$class: 'DiscoverOtherRefsTrait'$class: 'DiscoverOtherRefsTrait'ref
The pattern under /refs on the remote repository to discover, can contain a wildcard.
Example: test/*/merged
StringnameMapping (optional)
Mapping for how the ref can be named in for example the @Library.
Example: test-@{1}
Where @{1} replaces the first wildcard in the ref when discovered.
By default it will be "namespace_before_wildcard-@{1}". E.g. if ref is "test/*/merged" the default mapping would be "test-@{1}".
String$class: 'FilterChecksTrait'$class: 'FilterChecksTrait'queryOperator
ID, SCHEMEqueryString
StringgitLabForkDiscoverygitLabForkDiscoverystrategyId
inttrust
One of the great powers of merge requests is that anyone with read access to a project can fork it, commit some changes to their fork and then create a merge request against the original project with their changes. There are some files stored in source control that are important. For example, a Jenkinsfile may contain configuration details to sandbox merge requests in order to mitigate against malicious merge requests. In order to protect against a malicious merge request itself modifying the Jenkinsfile to remove the protections, you can define the trust policy for merge requests from forks.
Other plugins can extend the available trust policies. The default policies are:
Jenkinsfile) the contents of that file will be retrieved from the target branch on the origin project and not from the merge request branch on the fork project.
Nobody.
jenkins.scm.api.trait.SCMHeadAuthority<? super io.jenkins.plugins.gitlabbranchsource.GitLabSCMSourceRequest, ? extends jenkins.scm.api.mixin.ChangeRequestSCMHead2, ? extends jenkins.scm.api.SCMRevision>$class: 'GitBrowserSCMSourceTrait'$class: 'GitBrowserSCMSourceTrait'browser
$class: 'AssemblaWeb'$class: 'AssemblaWeb'repoUrl
String$class: 'BacklogGitRepositoryBrowser'$class: 'BacklogGitRepositoryBrowser'repoName
StringrepoUrl
StringbitbucketServerbitbucketServerrepoUrl
String$class: 'BitbucketWeb'$class: 'BitbucketWeb'repoUrl
String$class: 'CGit'$class: 'CGit'repoUrl
String$class: 'FisheyeGitRepositoryBrowser'$class: 'FisheyeGitRepositoryBrowser'repoUrl
String$class: 'GitBlitRepositoryBrowser'$class: 'GitBlitRepositoryBrowser'repoUrl
StringprojectName
String$class: 'GitBucketBrowser'$class: 'GitBucketBrowser'url
String$class: 'GitLab'$class: 'GitLab'repoUrl
Stringversion (optional)
String$class: 'GitLabBrowser'$class: 'GitLabBrowser'https://gitLab.example.com then the URL for bob's skunkworks project might be https://gitLab.example.com/bob/skunkworks.
projectUrl
https://gitLab.example.com then the URL for bob's skunkworks project might be https://gitLab.example.com/bob/skunkworks
String$class: 'GitList'$class: 'GitList'repoUrl
String$class: 'GitWeb'$class: 'GitWeb'repoUrl
String$class: 'GiteaBrowser'$class: 'GiteaBrowser'repoUrl
https://gitea.example.com then the URL for bob's skunkworks project repository might be https://gitea.example.com/bob/skunkworks
String$class: 'GithubWeb'$class: 'GithubWeb'repoUrl
String$class: 'Gitiles'$class: 'Gitiles'repoUrl
String$class: 'GitoriousWeb'$class: 'GitoriousWeb'repoUrl
String$class: 'GogsGit'$class: 'GogsGit'repoUrl
String$class: 'KilnGit'$class: 'KilnGit'repoUrl
String$class: 'Phabricator'$class: 'Phabricator'repoUrl
Stringrepo
String$class: 'RedmineWeb'$class: 'RedmineWeb'repoUrl
String$class: 'RhodeCode'$class: 'RhodeCode'repoUrl
String$class: 'ScmManagerGitRepositoryBrowser'$class: 'ScmManagerGitRepositoryBrowser'repoUrl
String$class: 'Stash'$class: 'Stash'repoUrl
String$class: 'TFS2013GitRepositoryBrowser'$class: 'TFS2013GitRepositoryBrowser'repoUrl
If TFS is also used as the repository server, this can usually be left blank.
String$class: 'TracGitRepositoryBrowser'$class: 'TracGitRepositoryBrowser'$class: 'TuleapBrowser'$class: 'TuleapBrowser'repositoryUrl
String$class: 'ViewGitWeb'$class: 'ViewGitWeb'repoUrl
StringprojectName
String$class: 'GitHubAgedRefsTrait'$class: 'GitHubAgedRefsTrait'retentionDays
StringgitHubBranchCommitSkipTraitgitHubBranchCommitSkipTraitgitHubCommitSkipTraitgitHubCommitSkipTrait$class: 'GitHubJiraValidatorTrait'$class: 'GitHubJiraValidatorTrait'jiraServerIdx
int$class: 'GitHubSCMSourceChecksTrait'$class: 'GitHubSCMSourceChecksTrait'verboseConsoleLog (optional)
boolean$class: 'GitHubSCMSourceStatusChecksTrait'$class: 'GitHubSCMSourceStatusChecksTrait'name (optional)
Stringskip (optional)
booleanskipNotifications (optional)
booleanskipProgressUpdates (optional)
booleansuppressLogs (optional)
booleanunstableBuildNeutral (optional)
boolean$class: 'GitLFSPullTrait'$class: 'GitLFSPullTrait'gitlabAvatargitlabAvatardisableProjectAvatar (optional)
booleangitlabSkipNotificationsgitlabSkipNotifications$class: 'GitToolSCMSourceTrait'$class: 'GitToolSCMSourceTrait'gitTool
String$class: 'HookRegistrationTrait'$class: 'HookRegistrationTrait'webHookMode
StringsystemHookMode
StringgitHubIgnoreDraftPullRequestFiltergitHubIgnoreDraftPullRequestFilter$class: 'IgnoreOnPushNotificationTrait'$class: 'IgnoreOnPushNotificationTrait'jervisFilterjervisFilterThis will look at the root of a GitHub reference for .jervis.yml for the branches and tags filtering. You can customize the name of the YAML file searched for if you like.
For Tags:
For Branches:
branches:
only:
- master
By default Jervis will generate Jenkins jobs for all branches that have a .jervis.yml file. You can control and limit this behavior by specifying the branches or tags key in your .jervis.yml.
You can either whitelist or blacklist branches that you want to be built:
# blacklist
branches:
except:
- legacy
- experimental
# whitelist
branches:
only:
- master
- stable
The same YAML can be applied to tags.
# blacklist
tags:
except:
- .*-rc
- .*-beta
# whitelist
tags:
only:
- v[.0-9]+
If you specify both only and except, then except will be ignored. .jervis.yml needs to be present on all branches you want to be built. .jervis.yml will be interpreted in the context of that branch so if you specify a whitelist in your master branch it will not propagate to other branches.
You can use regular expressions to whitelist or blacklist branches:
branches:
only:
- master
- /^[.0-9]+-hotfix$/
Any name surrounded with / in the list of branches is treated as a regular expression. The expression will use Pattern.compile to compile the regex string into a Groovy regular expression.
yamlFileName
The filename which will be read from GitHub to determine if a Jenkins branch, tag, or pull request should be built. Provide a comma separated list of paths to YAML files in a repository and it will check each path as a fallback.
For example, set the value to: .jervis.yml, .ci/jervis.yml and this plugin will first check for valid YAML in .jervis.yml. If no YAML exists, then it will fall back to checking .ci/jervis.yml.
String$class: 'LocalBranchTrait'$class: 'LocalBranchTrait'logCommentlogCommentlogSuccess (optional)
booleansudoUser (optional)
String$class: 'MercurialBrowserSCMSourceTrait'$class: 'MercurialBrowserSCMSourceTrait'browser
$class: 'FishEye'$class: 'FishEye'url
String$class: 'GoogleCode'$class: 'GoogleCode'url
String$class: 'HgWeb'$class: 'HgWeb'url
String$class: 'Kallithea'$class: 'Kallithea'url
String$class: 'KilnHG'$class: 'KilnHG'url
String$class: 'RhodeCode'$class: 'RhodeCode'url
String$class: 'RhodeCodeLegacy'$class: 'RhodeCodeLegacy'url
String$class: 'ScmManager'$class: 'ScmManager'url
http://YOURSCMMANAGER/scm/repo/NAMESPACE/NAME/).
String$class: 'MercurialInstallationSCMSourceTrait'$class: 'MercurialInstallationSCMSourceTrait'installation
String$class: 'NotificationContextTrait'$class: 'NotificationContextTrait'contextLabel
StringtypeSuffix
Appends the relevant suffix to the context label based on the build type. '/pr-merge', '/pr-head' or '/branch'
booleannotificationsSkipnotificationsSkipgitLabOriginDiscoverygitLabOriginDiscoverystrategyId
int$class: 'PathBasedPullRequestFilterTrait'$class: 'PathBasedPullRequestFilterTrait'inclusionField
StringexclusionField
String$class: 'PreBuildMergeTrait'$class: 'PreBuildMergeTrait'extension
optionsoptions
mergeTargetmergeTarget
master.
StringfastForwardModefastForwardMode (optional)
FF, FF_ONLY, NO_FFmergeRemotemergeRemote (optional)
origin, that contains the branch you specify below. If left blank, it'll default to the name of the first repository configured above.
StringmergeStrategymergeStrategy (optional)
DEFAULT, RESOLVE, RECURSIVE, OCTOPUS, OURS, SUBTREE, RECURSIVE_THEIRS$class: 'PretestedIntegrationSCMTrait'$class: 'PretestedIntegrationSCMTrait'extension
gitIntegrationStrategygitIntegrationStrategy
accumulatedaccumulatedsquashsquashintegrationBranchintegrationBranch
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>
StringrepoNamerepoName
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
String$class: 'PruneStaleBranchTrait'$class: 'PruneStaleBranchTrait'$class: 'PruneStaleTagTrait'$class: 'PruneStaleTagTrait'bitbucketPublicRepoPullRequestFilterbitbucketPublicRepoPullRequestFilter$class: 'PullRequestDiscoveryTrait'$class: 'PullRequestDiscoveryTrait'excludeBranchesWithPRs
boolean$class: 'PullRequestLabelsBlackListFilterTrait'$class: 'PullRequestLabelsBlackListFilterTrait'labels
String$class: 'PullRequestLabelsMatchAllFilterTrait'$class: 'PullRequestLabelsMatchAllFilterTrait'labels
String$class: 'PullRequestLabelsMatchAnyFilterTrait'$class: 'PullRequestLabelsMatchAnyFilterTrait'labels
String$class: 'PullRequestNameFilterTrait'$class: 'PullRequestNameFilterTrait'strategyId
intphrase
StringignoreCase
booleanregex
boolean$class: 'RefSpecsSCMSourceTrait'$class: 'RefSpecsSCMSourceTrait'templates
valuevalue
@{remote} will be replaced by the remote name (which defaults to origin) before use.
StringheadRegexFilterWithPRFromOriginheadRegexFilterWithPRFromOriginregex
StringtagRegex
String$class: 'RemoteNameSCMSourceTrait'$class: 'RemoteNameSCMSourceTrait'remoteName
StringskipNotificationsskipNotifications$class: 'SparseCheckoutPathsTrait'$class: 'SparseCheckoutPathsTrait'extension
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
sparseCheckoutPathssparseCheckoutPaths
pathpath
String$class: 'SubmoduleOptionTrait'$class: 'SubmoduleOptionTrait'extension
disableSubmodulesdisableSubmodules
booleanrecursiveSubmodulesrecursiveSubmodules
booleantrackingSubmodulestrackingSubmodules
booleanreferencereference
git init --bare git remote add SubProject1 https://gitrepo.com/subproject1 git remote add SubProject2 https://gitrepo.com/subproject2 git fetch --all
Stringtimeouttimeout
intparentCredentialsparentCredentials
booleandepthdepth (optional)
intshallowshallow (optional)
booleanthreadsthreads (optional)
intmrTriggerCommentmrTriggerCommentcommentBody
StringonlyTrustedMembersCanTrigger
booleantuleapBranchDiscoverytuleapBranchDiscoverytuleapNotifyPullRequesttuleapNotifyPullRequesttuleapForkPullRequestDiscoverytuleapForkPullRequestDiscoverytuleapPullRequestDiscoverytuleapPullRequestDiscovery$class: 'UserIdentityTrait'$class: 'UserIdentityTrait'extension
namename
If given, "GIT_COMMITTER_NAME=[this]" and "GIT_AUTHOR_NAME=[this]" are set for builds. This overrides whatever is in the global settings.
Stringemailemail
If given, "GIT_COMMITTER_EMAIL=[this]" and "GIT_AUTHOR_EMAIL=[this]" are set for builds. This overrides whatever is in the global settings.
StringbitbucketWebhookConfigurationbitbucketWebhookConfigurationSets the value for committersToIgnore in the Bitbucket Webhook. Value should be a comma separated string.
committerToIgnore is used to prevent triggering Jenkins builds when commits by certain users are made.
committersToIgnore
StringheadWildcardFilterWithPRFromOriginheadWildcardFilterWithPRFromOriginincludes
* as a wildcard; for example: master release*
Stringexcludes
release
StringtagIncludes
* as a wildcard; for example: *-1.* to build only 1.0 tags from the maven release plugin.
StringtagExcludes
*-0.*
String$class: 'WipeWorkspaceTrait'$class: 'WipeWorkspaceTrait'bitbucketBranchDiscoverybitbucketBranchDiscoverystrategyId
intbitbucketForkDiscoverybitbucketForkDiscoverystrategyId
inttrust
One of the great powers of pull requests is that anyone with read access to a repository can fork it, commit some changes to their fork and then create a pull request against the original repository with their changes. There are some files stored in source control that are important. For example, a Jenkinsfile may contain configuration details to sandbox pull requests in order to mitigate against malicious pull requests. In order to protect against a malicious pull request itself modifying the Jenkinsfile to remove the protections, you can define the trust policy for pull requests from forks.
Other plugins can extend the available trust policies. The default policies are:
Jenkinsfile) the contents of that file will be retrieved from the target branch on the origin repository and not from the pull request branch on the fork repository.
jenkins.scm.api.trait.SCMHeadAuthority<? super com.cloudbees.jenkins.plugins.bitbucket.BitbucketSCMSourceRequest, ? extends jenkins.scm.api.mixin.ChangeRequestSCMHead2, ? extends jenkins.scm.api.SCMRevision>bitbucketPullRequestDiscoverybitbucketPullRequestDiscoverystrategyId
intbitbucketSshCheckoutbitbucketSshCheckouthttps:// protocol for the Git repository.
This behaviour allows you to select the SSH private key to be used for checking out sources, which will consequently force the checkout to use the ssh:// protocol.
credentialsId
It must be a SSH key based credential.
StringbitbucketTagDiscoverybitbucketTagDiscoverybitbucketWebhookRegistrationbitbucketWebhookRegistrationOverrides the defaults for webhook management.
Webhooks are used to inform Jenkins about changes to repositories. There are two ways webhooks can be configured:
The Manage Jenkins » Configure Jenkins › Bitbucket Endpoints allows defining the list of servers. Each server can be associated with credentials. If credentials are defined then the default behaviour is to use those credentials to automatically manage the webhooks of all repositories that Jenkins is interested in. If no credentials are defined then the default behaviour is to require the user to manually configure webhooks.
mode
String$class: 'com.cloudogu.scmmanager.scm.BranchDiscoveryTrait'$class: 'com.cloudogu.scmmanager.scm.BranchDiscoveryTrait'$class: 'com.cloudogu.scmmanager.scm.TagDiscoveryTrait'$class: 'com.cloudogu.scmmanager.scm.TagDiscoveryTrait'dagshubBranchDiscoverydagshubBranchDiscovery$class: 'io.jenkins.plugins.dagshubbranchsource.traits.ForkPullRequestDiscoveryTrait'$class: 'io.jenkins.plugins.dagshubbranchsource.traits.ForkPullRequestDiscoveryTrait'buildOnPullHead (optional)
boolean$class: 'io.jenkins.plugins.dagshubbranchsource.traits.OriginPullRequestDiscoveryTrait'$class: 'io.jenkins.plugins.dagshubbranchsource.traits.OriginPullRequestDiscoveryTrait'buildOnPullHead (optional)
booleandagshubTagDiscoverydagshubTagDiscoverygitLabBranchDiscoverygitLabBranchDiscoverystrategyId
int$class: 'io.jenkins.plugins.gitlabbranchsource.SSHCheckoutTrait'$class: 'io.jenkins.plugins.gitlabbranchsource.SSHCheckoutTrait'https:// protocol for the Git repository.
This behaviour allows you to select the SSH private key to be used for checking out sources, which will consequently force the checkout to use the ssh:// protocol.
credentialsId
StringgitLabTagDiscoverygitLabTagDiscoverygitBranchDiscoverygitBranchDiscoverygitTagDiscoverygitTagDiscoveryheadRegexFilterheadRegexFilterregex
StringheadWildcardFilterheadWildcardFilterincludes
* as a wildcard; for example: master release*
Stringexcludes
release alpha-* beta-*
StringheadRegexFilterWithPRheadRegexFilterWithPRregex
StringtagRegex
StringheadWildcardFilterWithPRheadWildcardFilterWithPRincludes
* as a wildcard; for example: master release*
Stringexcludes
release
StringtagIncludes
* as a wildcard; for example: *-1.* to build only 1.0 tags from the maven release plugin.
StringtagExcludes
*-0.*
StringgiteaBranchDiscoverygiteaBranchDiscoverystrategyId
intgiteaForkDiscoverygiteaForkDiscoverystrategyId
inttrust
One of the great powers of pull requests is that anyone with read access to a repository can fork it, commit some changes to their fork and then create a pull request against the original repository with their changes. There are some files stored in source control that are important. For example, a Jenkinsfile may contain configuration details to sandbox pull requests in order to mitigate against malicious pull requests. In order to protect against a malicious pull request itself modifying the Jenkinsfile to remove the protections, you can define the trust policy for pull requests from forks.
Other plugins can extend the available trust policies. The default policies are:
Jenkinsfile) the contents of that file will be retrieved from the target branch on the origin repository and not from the pull request branch on the fork repository.
Nobody.
gitLabTrustMembersgitLabTrustMembersbitbucketTrustTeambitbucketTrustTeambitbucketTrustEveryonebitbucketTrustEveryonebitbucketTrustNobodybitbucketTrustNobodygitLabTrustEveryonegitLabTrustEveryonegitLabTrustNobodygitLabTrustNobodygitLabTrustPermissionsgitLabTrustPermissionsgiteaTrustContributorsgiteaTrustContributorsgiteaTrustEveryonegiteaTrustEveryonegiteaTrustNobodygiteaTrustNobodygitHubTrustContributorsgitHubTrustContributorsgitHubTrustEveryonegitHubTrustEveryonegitHubTrustNobodygitHubTrustNobodygitHubTrustPermissionsgitHubTrustPermissionsgiteaPullRequestDiscoverygiteaPullRequestDiscoverystrategyId
intgiteaSSHCheckoutgiteaSSHCheckouthttps:// protocol for the Git repository.
This behaviour allows you to select the SSH private key to be used for checking out sources, which will consequently force the checkout to use the ssh:// protocol.
credentialsId
StringgiteaTagDiscoverygiteaTagDiscoverygiteaWebhookRegistrationgiteaWebhookRegistrationOverrides the defaults for webhook management.
Webhooks are used to inform Jenkins about changes to repositories. There are two ways webhooks can be configured:
The Manage Jenkins » Configure System › Gitea Server allows defining the list of servers. Each server can be associated with credentials. If credentials are defined then the default behaviour is to use those credentials to automatically manage the webhooks of all repositories that Jenkins is interested in. If no credentials are defined then the default behaviour is to require the user to manually configure webhooks.
mode
StringgitHubBranchDiscoverygitHubBranchDiscoverystrategyId
env.GIT_BRANCH will be set to the branch name rather than PR-#. Also, status notifications for these builds will only be applied to the commit and not to the pull request.
intgitHubForkDiscoverygitHubForkDiscoverystrategyId
inttrust
One of the great powers of pull requests is that anyone with read access to a repository can fork it, commit some changes to their fork and then create a pull request against the original repository with their changes. There are some files stored in source control that are important. For example, a Jenkinsfile may contain configuration details to sandbox pull requests in order to mitigate against malicious pull requests. In order to protect against a malicious pull request itself modifying the Jenkinsfile to remove the protections, you can define the trust policy for pull requests from forks.
Other plugins can extend the available trust policies. The default policies are:
Jenkinsfile) the contents of that file will be retrieved from the target branch on the origin repository and not from the pull request branch on the fork repository.
Nobody. NOTE: all collaborators are trusted, even if they are only members of a team with read permission.
jenkins.scm.api.trait.SCMHeadAuthority<? super org.jenkinsci.plugins.github_branch_source.GitHubSCMSourceRequest, ? extends jenkins.scm.api.mixin.ChangeRequestSCMHead2, ? extends jenkins.scm.api.SCMRevision>gitHubPullRequestDiscoverygitHubPullRequestDiscoverystrategyId
intgitHubSshCheckoutgitHubSshCheckouthttps:// protocol for the Git repository.
This behaviour allows you to select the SSH private key to be used for checking out sources, which will consequently force the checkout to use the ssh:// protocol.
credentialsId
StringgitHubTagDiscoverygitHubTagDiscoveryBbSBbScredentialsId
When running a job, Jenkins requires credentials to authenticate with Bitbucket Server. For example, to checkout the source code for builds. To do this, it needs credentials with access to the projects and repositories you want it to build from.
You can provide Jenkins with credentials here by:
In addition, you can provide Jenkins with SSH credentials below. If you do, Jenkins will use them for clone operations instead of the credentials you select here.
StringsshCredentialsId
If specified, Jenkins will use these credentials to check out the source code for builds. If no SSH credentials are specified, Jenkins will use the basic credentials instead.
To provide Jenkins with SSH credentials, you can:
Stringtraits
$class: 'ApprovedPullRequestTrait'$class: 'ApprovedPullRequestTrait'strategyId
int$class: 'AuthorInChangelogTrait'$class: 'AuthorInChangelogTrait'$class: 'BitbucketAgedRefsTrait'$class: 'BitbucketAgedRefsTrait'retentionDays
StringbitbucketBranchCommitSkipTraitbitbucketBranchCommitSkipTraitbitbucketBuildStatusNotificationsbitbucketBuildStatusNotificationssendSuccessNotificationForUnstableBuild (optional)
booleanbitbucketCommitSkipTraitbitbucketCommitSkipTrait$class: 'BitbucketJiraValidatorTrait'$class: 'BitbucketJiraValidatorTrait'jiraServerIdx
intbuildStatusNameCustomPartbuildStatusNameCustomPartbuildStatusNameCustomPart (optional)
String$class: 'ChangeDiscoveryTrait'$class: 'ChangeDiscoveryTrait'queryString
Provide an additional query string to search for open changes. The status:open is implicitly added and does not need to be specified. See Gerrit search operators documentation for a detailed list of the supported search operators.
-is:wipdoes not include work-in-progress changes
is:privateincludes private changes
String$class: 'CheckoutOptionTrait'$class: 'CheckoutOptionTrait'extension
timeouttimeout
int$class: 'CleanAfterCheckoutTrait'$class: 'CleanAfterCheckoutTrait'extension
.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.
deleteUntrackedNestedRepositoriesdeleteUntrackedNestedRepositories (optional)
.git directories.
boolean$class: 'CleanBeforeCheckoutTrait'$class: 'CleanBeforeCheckoutTrait'extension
.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.
deleteUntrackedNestedRepositoriesdeleteUntrackedNestedRepositories (optional)
.git directories.
boolean$class: 'CleanMercurialSCMSourceTrait'$class: 'CleanMercurialSCMSourceTrait'$class: 'CloneOptionTrait'$class: 'CloneOptionTrait'extension
shallowshallow
booleannoTagsnoTags
booleanreferencereference
Stringtimeouttimeout
intdepthdepth (optional)
inthonorRefspechonorRefspec (optional)
boolean$class: 'DisableStatusUpdateTrait'$class: 'DisableStatusUpdateTrait'$class: 'DiscoverOtherRefsTrait'$class: 'DiscoverOtherRefsTrait'ref
The pattern under /refs on the remote repository to discover, can contain a wildcard.
Example: test/*/merged
StringnameMapping (optional)
Mapping for how the ref can be named in for example the @Library.
Example: test-@{1}
Where @{1} replaces the first wildcard in the ref when discovered.
By default it will be "namespace_before_wildcard-@{1}". E.g. if ref is "test/*/merged" the default mapping would be "test-@{1}".
String$class: 'FilterChecksTrait'$class: 'FilterChecksTrait'queryOperator
ID, SCHEMEqueryString
StringgitLabForkDiscoverygitLabForkDiscoverystrategyId
inttrust
One of the great powers of merge requests is that anyone with read access to a project can fork it, commit some changes to their fork and then create a merge request against the original project with their changes. There are some files stored in source control that are important. For example, a Jenkinsfile may contain configuration details to sandbox merge requests in order to mitigate against malicious merge requests. In order to protect against a malicious merge request itself modifying the Jenkinsfile to remove the protections, you can define the trust policy for merge requests from forks.
Other plugins can extend the available trust policies. The default policies are:
Jenkinsfile) the contents of that file will be retrieved from the target branch on the origin project and not from the merge request branch on the fork project.
Nobody.
jenkins.scm.api.trait.SCMHeadAuthority<? super io.jenkins.plugins.gitlabbranchsource.GitLabSCMSourceRequest, ? extends jenkins.scm.api.mixin.ChangeRequestSCMHead2, ? extends jenkins.scm.api.SCMRevision>$class: 'GitBrowserSCMSourceTrait'$class: 'GitBrowserSCMSourceTrait'browser
$class: 'AssemblaWeb'$class: 'AssemblaWeb'repoUrl
String$class: 'BacklogGitRepositoryBrowser'$class: 'BacklogGitRepositoryBrowser'repoName
StringrepoUrl
StringbitbucketServerbitbucketServerrepoUrl
String$class: 'BitbucketWeb'$class: 'BitbucketWeb'repoUrl
String$class: 'CGit'$class: 'CGit'repoUrl
String$class: 'FisheyeGitRepositoryBrowser'$class: 'FisheyeGitRepositoryBrowser'repoUrl
String$class: 'GitBlitRepositoryBrowser'$class: 'GitBlitRepositoryBrowser'repoUrl
StringprojectName
String$class: 'GitBucketBrowser'$class: 'GitBucketBrowser'url
String$class: 'GitLab'$class: 'GitLab'repoUrl
Stringversion (optional)
String$class: 'GitLabBrowser'$class: 'GitLabBrowser'https://gitLab.example.com then the URL for bob's skunkworks project might be https://gitLab.example.com/bob/skunkworks.
projectUrl
https://gitLab.example.com then the URL for bob's skunkworks project might be https://gitLab.example.com/bob/skunkworks
String$class: 'GitList'$class: 'GitList'repoUrl
String$class: 'GitWeb'$class: 'GitWeb'repoUrl
String$class: 'GiteaBrowser'$class: 'GiteaBrowser'repoUrl
https://gitea.example.com then the URL for bob's skunkworks project repository might be https://gitea.example.com/bob/skunkworks
String$class: 'GithubWeb'$class: 'GithubWeb'repoUrl
String$class: 'Gitiles'$class: 'Gitiles'repoUrl
String$class: 'GitoriousWeb'$class: 'GitoriousWeb'repoUrl
String$class: 'GogsGit'$class: 'GogsGit'repoUrl
String$class: 'KilnGit'$class: 'KilnGit'repoUrl
String$class: 'Phabricator'$class: 'Phabricator'repoUrl
Stringrepo
String$class: 'RedmineWeb'$class: 'RedmineWeb'repoUrl
String$class: 'RhodeCode'$class: 'RhodeCode'repoUrl
String$class: 'ScmManagerGitRepositoryBrowser'$class: 'ScmManagerGitRepositoryBrowser'repoUrl
String$class: 'Stash'$class: 'Stash'repoUrl
String$class: 'TFS2013GitRepositoryBrowser'$class: 'TFS2013GitRepositoryBrowser'repoUrl
If TFS is also used as the repository server, this can usually be left blank.
String$class: 'TracGitRepositoryBrowser'$class: 'TracGitRepositoryBrowser'$class: 'TuleapBrowser'$class: 'TuleapBrowser'repositoryUrl
String$class: 'ViewGitWeb'$class: 'ViewGitWeb'repoUrl
StringprojectName
String$class: 'GitHubAgedRefsTrait'$class: 'GitHubAgedRefsTrait'retentionDays
StringgitHubBranchCommitSkipTraitgitHubBranchCommitSkipTraitgitHubCommitSkipTraitgitHubCommitSkipTrait$class: 'GitHubJiraValidatorTrait'$class: 'GitHubJiraValidatorTrait'jiraServerIdx
int$class: 'GitHubSCMSourceChecksTrait'$class: 'GitHubSCMSourceChecksTrait'verboseConsoleLog (optional)
boolean$class: 'GitHubSCMSourceStatusChecksTrait'$class: 'GitHubSCMSourceStatusChecksTrait'name (optional)
Stringskip (optional)
booleanskipNotifications (optional)
booleanskipProgressUpdates (optional)
booleansuppressLogs (optional)
booleanunstableBuildNeutral (optional)
boolean$class: 'GitLFSPullTrait'$class: 'GitLFSPullTrait'gitlabAvatargitlabAvatardisableProjectAvatar (optional)
booleangitlabSkipNotificationsgitlabSkipNotifications$class: 'GitToolSCMSourceTrait'$class: 'GitToolSCMSourceTrait'gitTool
String$class: 'HookRegistrationTrait'$class: 'HookRegistrationTrait'webHookMode
StringsystemHookMode
StringgitHubIgnoreDraftPullRequestFiltergitHubIgnoreDraftPullRequestFilter$class: 'IgnoreOnPushNotificationTrait'$class: 'IgnoreOnPushNotificationTrait'jervisFilterjervisFilterThis will look at the root of a GitHub reference for .jervis.yml for the branches and tags filtering. You can customize the name of the YAML file searched for if you like.
For Tags:
For Branches:
branches:
only:
- master
By default Jervis will generate Jenkins jobs for all branches that have a .jervis.yml file. You can control and limit this behavior by specifying the branches or tags key in your .jervis.yml.
You can either whitelist or blacklist branches that you want to be built:
# blacklist
branches:
except:
- legacy
- experimental
# whitelist
branches:
only:
- master
- stable
The same YAML can be applied to tags.
# blacklist
tags:
except:
- .*-rc
- .*-beta
# whitelist
tags:
only:
- v[.0-9]+
If you specify both only and except, then except will be ignored. .jervis.yml needs to be present on all branches you want to be built. .jervis.yml will be interpreted in the context of that branch so if you specify a whitelist in your master branch it will not propagate to other branches.
You can use regular expressions to whitelist or blacklist branches:
branches:
only:
- master
- /^[.0-9]+-hotfix$/
Any name surrounded with / in the list of branches is treated as a regular expression. The expression will use Pattern.compile to compile the regex string into a Groovy regular expression.
yamlFileName
The filename which will be read from GitHub to determine if a Jenkins branch, tag, or pull request should be built. Provide a comma separated list of paths to YAML files in a repository and it will check each path as a fallback.
For example, set the value to: .jervis.yml, .ci/jervis.yml and this plugin will first check for valid YAML in .jervis.yml. If no YAML exists, then it will fall back to checking .ci/jervis.yml.
String$class: 'LocalBranchTrait'$class: 'LocalBranchTrait'logCommentlogCommentlogSuccess (optional)
booleansudoUser (optional)
String$class: 'MercurialBrowserSCMSourceTrait'$class: 'MercurialBrowserSCMSourceTrait'browser
$class: 'FishEye'$class: 'FishEye'url
String$class: 'GoogleCode'$class: 'GoogleCode'url
String$class: 'HgWeb'$class: 'HgWeb'url
String$class: 'Kallithea'$class: 'Kallithea'url
String$class: 'KilnHG'$class: 'KilnHG'url
String$class: 'RhodeCode'$class: 'RhodeCode'url
String$class: 'RhodeCodeLegacy'$class: 'RhodeCodeLegacy'url
String$class: 'ScmManager'$class: 'ScmManager'url
http://YOURSCMMANAGER/scm/repo/NAMESPACE/NAME/).
String$class: 'MercurialInstallationSCMSourceTrait'$class: 'MercurialInstallationSCMSourceTrait'installation
String$class: 'NotificationContextTrait'$class: 'NotificationContextTrait'contextLabel
StringtypeSuffix
Appends the relevant suffix to the context label based on the build type. '/pr-merge', '/pr-head' or '/branch'
booleannotificationsSkipnotificationsSkipgitLabOriginDiscoverygitLabOriginDiscoverystrategyId
int$class: 'PathBasedPullRequestFilterTrait'$class: 'PathBasedPullRequestFilterTrait'inclusionField
StringexclusionField
String$class: 'PreBuildMergeTrait'$class: 'PreBuildMergeTrait'extension
optionsoptions
mergeTargetmergeTarget
master.
StringfastForwardModefastForwardMode (optional)
FF, FF_ONLY, NO_FFmergeRemotemergeRemote (optional)
origin, that contains the branch you specify below. If left blank, it'll default to the name of the first repository configured above.
StringmergeStrategymergeStrategy (optional)
DEFAULT, RESOLVE, RECURSIVE, OCTOPUS, OURS, SUBTREE, RECURSIVE_THEIRS$class: 'PretestedIntegrationSCMTrait'$class: 'PretestedIntegrationSCMTrait'extension
gitIntegrationStrategygitIntegrationStrategy
accumulatedaccumulatedsquashsquashintegrationBranchintegrationBranch
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>
StringrepoNamerepoName
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
String$class: 'PruneStaleBranchTrait'$class: 'PruneStaleBranchTrait'$class: 'PruneStaleTagTrait'$class: 'PruneStaleTagTrait'bitbucketPublicRepoPullRequestFilterbitbucketPublicRepoPullRequestFilter$class: 'PullRequestDiscoveryTrait'$class: 'PullRequestDiscoveryTrait'excludeBranchesWithPRs
boolean$class: 'PullRequestLabelsBlackListFilterTrait'$class: 'PullRequestLabelsBlackListFilterTrait'labels
String$class: 'PullRequestLabelsMatchAllFilterTrait'$class: 'PullRequestLabelsMatchAllFilterTrait'labels
String$class: 'PullRequestLabelsMatchAnyFilterTrait'$class: 'PullRequestLabelsMatchAnyFilterTrait'labels
String$class: 'PullRequestNameFilterTrait'$class: 'PullRequestNameFilterTrait'strategyId
intphrase
StringignoreCase
booleanregex
boolean$class: 'RefSpecsSCMSourceTrait'$class: 'RefSpecsSCMSourceTrait'templates
valuevalue
@{remote} will be replaced by the remote name (which defaults to origin) before use.
StringheadRegexFilterWithPRFromOriginheadRegexFilterWithPRFromOriginregex
StringtagRegex
String$class: 'RemoteNameSCMSourceTrait'$class: 'RemoteNameSCMSourceTrait'remoteName
StringskipNotificationsskipNotifications$class: 'SparseCheckoutPathsTrait'$class: 'SparseCheckoutPathsTrait'extension
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
sparseCheckoutPathssparseCheckoutPaths
pathpath
String$class: 'SubmoduleOptionTrait'$class: 'SubmoduleOptionTrait'extension
disableSubmodulesdisableSubmodules
booleanrecursiveSubmodulesrecursiveSubmodules
booleantrackingSubmodulestrackingSubmodules
booleanreferencereference
git init --bare git remote add SubProject1 https://gitrepo.com/subproject1 git remote add SubProject2 https://gitrepo.com/subproject2 git fetch --all
Stringtimeouttimeout
intparentCredentialsparentCredentials
booleandepthdepth (optional)
intshallowshallow (optional)
booleanthreadsthreads (optional)
intmrTriggerCommentmrTriggerCommentcommentBody
StringonlyTrustedMembersCanTrigger
booleantuleapBranchDiscoverytuleapBranchDiscoverytuleapNotifyPullRequesttuleapNotifyPullRequesttuleapForkPullRequestDiscoverytuleapForkPullRequestDiscoverytuleapPullRequestDiscoverytuleapPullRequestDiscovery$class: 'UserIdentityTrait'$class: 'UserIdentityTrait'extension
namename
If given, "GIT_COMMITTER_NAME=[this]" and "GIT_AUTHOR_NAME=[this]" are set for builds. This overrides whatever is in the global settings.
Stringemailemail
If given, "GIT_COMMITTER_EMAIL=[this]" and "GIT_AUTHOR_EMAIL=[this]" are set for builds. This overrides whatever is in the global settings.
StringbitbucketWebhookConfigurationbitbucketWebhookConfigurationSets the value for committersToIgnore in the Bitbucket Webhook. Value should be a comma separated string.
committerToIgnore is used to prevent triggering Jenkins builds when commits by certain users are made.
committersToIgnore
StringheadWildcardFilterWithPRFromOriginheadWildcardFilterWithPRFromOriginincludes
* as a wildcard; for example: master release*
Stringexcludes
release
StringtagIncludes
* as a wildcard; for example: *-1.* to build only 1.0 tags from the maven release plugin.
StringtagExcludes
*-0.*
String$class: 'WipeWorkspaceTrait'$class: 'WipeWorkspaceTrait'bitbucketBranchDiscoverybitbucketBranchDiscoverystrategyId
intbitbucketForkDiscoverybitbucketForkDiscoverystrategyId
inttrust
One of the great powers of pull requests is that anyone with read access to a repository can fork it, commit some changes to their fork and then create a pull request against the original repository with their changes. There are some files stored in source control that are important. For example, a Jenkinsfile may contain configuration details to sandbox pull requests in order to mitigate against malicious pull requests. In order to protect against a malicious pull request itself modifying the Jenkinsfile to remove the protections, you can define the trust policy for pull requests from forks.
Other plugins can extend the available trust policies. The default policies are:
Jenkinsfile) the contents of that file will be retrieved from the target branch on the origin repository and not from the pull request branch on the fork repository.
jenkins.scm.api.trait.SCMHeadAuthority<? super com.cloudbees.jenkins.plugins.bitbucket.BitbucketSCMSourceRequest, ? extends jenkins.scm.api.mixin.ChangeRequestSCMHead2, ? extends jenkins.scm.api.SCMRevision>bitbucketPullRequestDiscoverybitbucketPullRequestDiscoverystrategyId
intbitbucketSshCheckoutbitbucketSshCheckouthttps:// protocol for the Git repository.
This behaviour allows you to select the SSH private key to be used for checking out sources, which will consequently force the checkout to use the ssh:// protocol.
credentialsId
It must be a SSH key based credential.
StringbitbucketTagDiscoverybitbucketTagDiscoverybitbucketWebhookRegistrationbitbucketWebhookRegistrationOverrides the defaults for webhook management.
Webhooks are used to inform Jenkins about changes to repositories. There are two ways webhooks can be configured:
The Manage Jenkins » Configure Jenkins › Bitbucket Endpoints allows defining the list of servers. Each server can be associated with credentials. If credentials are defined then the default behaviour is to use those credentials to automatically manage the webhooks of all repositories that Jenkins is interested in. If no credentials are defined then the default behaviour is to require the user to manually configure webhooks.
mode
String$class: 'com.cloudogu.scmmanager.scm.BranchDiscoveryTrait'$class: 'com.cloudogu.scmmanager.scm.BranchDiscoveryTrait'$class: 'com.cloudogu.scmmanager.scm.TagDiscoveryTrait'$class: 'com.cloudogu.scmmanager.scm.TagDiscoveryTrait'dagshubBranchDiscoverydagshubBranchDiscovery$class: 'io.jenkins.plugins.dagshubbranchsource.traits.ForkPullRequestDiscoveryTrait'$class: 'io.jenkins.plugins.dagshubbranchsource.traits.ForkPullRequestDiscoveryTrait'buildOnPullHead (optional)
boolean$class: 'io.jenkins.plugins.dagshubbranchsource.traits.OriginPullRequestDiscoveryTrait'$class: 'io.jenkins.plugins.dagshubbranchsource.traits.OriginPullRequestDiscoveryTrait'buildOnPullHead (optional)
booleandagshubTagDiscoverydagshubTagDiscoverygitLabBranchDiscoverygitLabBranchDiscoverystrategyId
int$class: 'io.jenkins.plugins.gitlabbranchsource.SSHCheckoutTrait'$class: 'io.jenkins.plugins.gitlabbranchsource.SSHCheckoutTrait'https:// protocol for the Git repository.
This behaviour allows you to select the SSH private key to be used for checking out sources, which will consequently force the checkout to use the ssh:// protocol.
credentialsId
StringgitLabTagDiscoverygitLabTagDiscoverygitBranchDiscoverygitBranchDiscoverygitTagDiscoverygitTagDiscoveryheadRegexFilterheadRegexFilterregex
StringheadWildcardFilterheadWildcardFilterincludes
* as a wildcard; for example: master release*
Stringexcludes
release alpha-* beta-*
StringheadRegexFilterWithPRheadRegexFilterWithPRregex
StringtagRegex
StringheadWildcardFilterWithPRheadWildcardFilterWithPRincludes
* as a wildcard; for example: master release*
Stringexcludes
release
StringtagIncludes
* as a wildcard; for example: *-1.* to build only 1.0 tags from the maven release plugin.
StringtagExcludes
*-0.*
StringgiteaBranchDiscoverygiteaBranchDiscoverystrategyId
intgiteaForkDiscoverygiteaForkDiscoverystrategyId
inttrust
One of the great powers of pull requests is that anyone with read access to a repository can fork it, commit some changes to their fork and then create a pull request against the original repository with their changes. There are some files stored in source control that are important. For example, a Jenkinsfile may contain configuration details to sandbox pull requests in order to mitigate against malicious pull requests. In order to protect against a malicious pull request itself modifying the Jenkinsfile to remove the protections, you can define the trust policy for pull requests from forks.
Other plugins can extend the available trust policies. The default policies are:
Jenkinsfile) the contents of that file will be retrieved from the target branch on the origin repository and not from the pull request branch on the fork repository.
Nobody.
gitLabTrustMembersgitLabTrustMembersbitbucketTrustTeambitbucketTrustTeambitbucketTrustEveryonebitbucketTrustEveryonebitbucketTrustNobodybitbucketTrustNobodygitLabTrustEveryonegitLabTrustEveryonegitLabTrustNobodygitLabTrustNobodygitLabTrustPermissionsgitLabTrustPermissionsgiteaTrustContributorsgiteaTrustContributorsgiteaTrustEveryonegiteaTrustEveryonegiteaTrustNobodygiteaTrustNobodygitHubTrustContributorsgitHubTrustContributorsgitHubTrustEveryonegitHubTrustEveryonegitHubTrustNobodygitHubTrustNobodygitHubTrustPermissionsgitHubTrustPermissionsgiteaPullRequestDiscoverygiteaPullRequestDiscoverystrategyId
intgiteaSSHCheckoutgiteaSSHCheckouthttps:// protocol for the Git repository.
This behaviour allows you to select the SSH private key to be used for checking out sources, which will consequently force the checkout to use the ssh:// protocol.
credentialsId
StringgiteaTagDiscoverygiteaTagDiscoverygiteaWebhookRegistrationgiteaWebhookRegistrationOverrides the defaults for webhook management.
Webhooks are used to inform Jenkins about changes to repositories. There are two ways webhooks can be configured:
The Manage Jenkins » Configure System › Gitea Server allows defining the list of servers. Each server can be associated with credentials. If credentials are defined then the default behaviour is to use those credentials to automatically manage the webhooks of all repositories that Jenkins is interested in. If no credentials are defined then the default behaviour is to require the user to manually configure webhooks.
mode
StringgitHubBranchDiscoverygitHubBranchDiscoverystrategyId
env.GIT_BRANCH will be set to the branch name rather than PR-#. Also, status notifications for these builds will only be applied to the commit and not to the pull request.
intgitHubForkDiscoverygitHubForkDiscoverystrategyId
inttrust
One of the great powers of pull requests is that anyone with read access to a repository can fork it, commit some changes to their fork and then create a pull request against the original repository with their changes. There are some files stored in source control that are important. For example, a Jenkinsfile may contain configuration details to sandbox pull requests in order to mitigate against malicious pull requests. In order to protect against a malicious pull request itself modifying the Jenkinsfile to remove the protections, you can define the trust policy for pull requests from forks.
Other plugins can extend the available trust policies. The default policies are:
Jenkinsfile) the contents of that file will be retrieved from the target branch on the origin repository and not from the pull request branch on the fork repository.
Nobody. NOTE: all collaborators are trusted, even if they are only members of a team with read permission.
jenkins.scm.api.trait.SCMHeadAuthority<? super org.jenkinsci.plugins.github_branch_source.GitHubSCMSourceRequest, ? extends jenkins.scm.api.mixin.ChangeRequestSCMHead2, ? extends jenkins.scm.api.SCMRevision>gitHubPullRequestDiscoverygitHubPullRequestDiscoverystrategyId
intgitHubSshCheckoutgitHubSshCheckouthttps:// protocol for the Git repository.
This behaviour allows you to select the SSH private key to be used for checking out sources, which will consequently force the checkout to use the ssh:// protocol.
credentialsId
StringgitHubTagDiscoverygitHubTagDiscoveryprojectName
Enter the name of the Bitbucket Server project containing the repository you want Jenkins to build from. To find a project, start typing. If it doesn't appear in the search results, the credentials that you've chosen may not have read access to it and you'll need to provide different credentials.
To get Jenkins to build from a personal repository, enter a tilde (~) followed by repository owner's username. For example, ~jsmith.
StringrepositoryName
Enter the Bitbucket Server repository you want Jenkins to build from. To find a repository, start typing. If it doesn't appear in the search results, the credentials that you've chosen may not have read access to it and you'll need to provide different credentials.
To get Jenkins to build from a personal repository, enter its slug. This is the URL-friendly version of the repository name. For example, a repository called my example repo will have the slug my-example-repo, and you can see this in its URL, https://bitbucketserver.mycompany.com/myproject/my-example-repo.
StringserverId
Choose the Bitbucket Server instance containing the repository you want Jenkins to build from. If you can't find your instance, check this plugin's configuration and try again.
StringmirrorName
Choose the location that Jenkins should clone from when running this build. This can be the primary server or a mirror if one is available. To see available mirrors, first choose a Bitbucket Server project and repository.
Stringid (optional)
StringbitbucketbitbucketrepoOwner
It could be a Bitbucket Project also, if using Bitbucket Server. In this case (Bitbucket Server):
Stringrepository
StringautoRegisterHook (optional)
booleanbitbucketServerUrl (optional)
StringcheckoutCredentialsId (optional)
StringcredentialsId (optional)
For security reasons most credentials are only available when HTTPS is used.
Stringexcludes (optional)
Stringid (optional)
Stringincludes (optional)
StringserverUrl (optional)
The list of servers is configured in the Manage Jenkins » Configure Jenkins › Bitbucket Endpoints screen. The list of servers can include both Bitbucket Cloud and Bitbucket Server instances.
Stringtraits (optional)
$class: 'ApprovedPullRequestTrait'$class: 'ApprovedPullRequestTrait'strategyId
int$class: 'AuthorInChangelogTrait'$class: 'AuthorInChangelogTrait'$class: 'BitbucketAgedRefsTrait'$class: 'BitbucketAgedRefsTrait'retentionDays
StringbitbucketBranchCommitSkipTraitbitbucketBranchCommitSkipTraitbitbucketBuildStatusNotificationsbitbucketBuildStatusNotificationssendSuccessNotificationForUnstableBuild (optional)
booleanbitbucketCommitSkipTraitbitbucketCommitSkipTrait$class: 'BitbucketJiraValidatorTrait'$class: 'BitbucketJiraValidatorTrait'jiraServerIdx
intbuildStatusNameCustomPartbuildStatusNameCustomPartbuildStatusNameCustomPart (optional)
String$class: 'ChangeDiscoveryTrait'$class: 'ChangeDiscoveryTrait'queryString
Provide an additional query string to search for open changes. The status:open is implicitly added and does not need to be specified. See Gerrit search operators documentation for a detailed list of the supported search operators.
-is:wipdoes not include work-in-progress changes
is:privateincludes private changes
String$class: 'CheckoutOptionTrait'$class: 'CheckoutOptionTrait'extension
timeouttimeout
int$class: 'CleanAfterCheckoutTrait'$class: 'CleanAfterCheckoutTrait'extension
.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.
deleteUntrackedNestedRepositoriesdeleteUntrackedNestedRepositories (optional)
.git directories.
boolean$class: 'CleanBeforeCheckoutTrait'$class: 'CleanBeforeCheckoutTrait'extension
.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.
deleteUntrackedNestedRepositoriesdeleteUntrackedNestedRepositories (optional)
.git directories.
boolean$class: 'CleanMercurialSCMSourceTrait'$class: 'CleanMercurialSCMSourceTrait'$class: 'CloneOptionTrait'$class: 'CloneOptionTrait'extension
shallowshallow
booleannoTagsnoTags
booleanreferencereference
Stringtimeouttimeout
intdepthdepth (optional)
inthonorRefspechonorRefspec (optional)
boolean$class: 'DisableStatusUpdateTrait'$class: 'DisableStatusUpdateTrait'$class: 'DiscoverOtherRefsTrait'$class: 'DiscoverOtherRefsTrait'ref
The pattern under /refs on the remote repository to discover, can contain a wildcard.
Example: test/*/merged
StringnameMapping (optional)
Mapping for how the ref can be named in for example the @Library.
Example: test-@{1}
Where @{1} replaces the first wildcard in the ref when discovered.
By default it will be "namespace_before_wildcard-@{1}". E.g. if ref is "test/*/merged" the default mapping would be "test-@{1}".
String$class: 'FilterChecksTrait'$class: 'FilterChecksTrait'queryOperator
ID, SCHEMEqueryString
StringgitLabForkDiscoverygitLabForkDiscoverystrategyId
inttrust
One of the great powers of merge requests is that anyone with read access to a project can fork it, commit some changes to their fork and then create a merge request against the original project with their changes. There are some files stored in source control that are important. For example, a Jenkinsfile may contain configuration details to sandbox merge requests in order to mitigate against malicious merge requests. In order to protect against a malicious merge request itself modifying the Jenkinsfile to remove the protections, you can define the trust policy for merge requests from forks.
Other plugins can extend the available trust policies. The default policies are:
Jenkinsfile) the contents of that file will be retrieved from the target branch on the origin project and not from the merge request branch on the fork project.
Nobody.
jenkins.scm.api.trait.SCMHeadAuthority<? super io.jenkins.plugins.gitlabbranchsource.GitLabSCMSourceRequest, ? extends jenkins.scm.api.mixin.ChangeRequestSCMHead2, ? extends jenkins.scm.api.SCMRevision>$class: 'GitBrowserSCMSourceTrait'$class: 'GitBrowserSCMSourceTrait'browser
$class: 'AssemblaWeb'$class: 'AssemblaWeb'repoUrl
String$class: 'BacklogGitRepositoryBrowser'$class: 'BacklogGitRepositoryBrowser'repoName
StringrepoUrl
StringbitbucketServerbitbucketServerrepoUrl
String$class: 'BitbucketWeb'$class: 'BitbucketWeb'repoUrl
String$class: 'CGit'$class: 'CGit'repoUrl
String$class: 'FisheyeGitRepositoryBrowser'$class: 'FisheyeGitRepositoryBrowser'repoUrl
String$class: 'GitBlitRepositoryBrowser'$class: 'GitBlitRepositoryBrowser'repoUrl
StringprojectName
String$class: 'GitBucketBrowser'$class: 'GitBucketBrowser'url
String$class: 'GitLab'$class: 'GitLab'repoUrl
Stringversion (optional)
String$class: 'GitLabBrowser'$class: 'GitLabBrowser'https://gitLab.example.com then the URL for bob's skunkworks project might be https://gitLab.example.com/bob/skunkworks.
projectUrl
https://gitLab.example.com then the URL for bob's skunkworks project might be https://gitLab.example.com/bob/skunkworks
String$class: 'GitList'$class: 'GitList'repoUrl
String$class: 'GitWeb'$class: 'GitWeb'repoUrl
String$class: 'GiteaBrowser'$class: 'GiteaBrowser'repoUrl
https://gitea.example.com then the URL for bob's skunkworks project repository might be https://gitea.example.com/bob/skunkworks
String$class: 'GithubWeb'$class: 'GithubWeb'repoUrl
String$class: 'Gitiles'$class: 'Gitiles'repoUrl
String$class: 'GitoriousWeb'$class: 'GitoriousWeb'repoUrl
String$class: 'GogsGit'$class: 'GogsGit'repoUrl
String$class: 'KilnGit'$class: 'KilnGit'repoUrl
String$class: 'Phabricator'$class: 'Phabricator'repoUrl
Stringrepo
String$class: 'RedmineWeb'$class: 'RedmineWeb'repoUrl
String$class: 'RhodeCode'$class: 'RhodeCode'repoUrl
String$class: 'ScmManagerGitRepositoryBrowser'$class: 'ScmManagerGitRepositoryBrowser'repoUrl
String$class: 'Stash'$class: 'Stash'repoUrl
String$class: 'TFS2013GitRepositoryBrowser'$class: 'TFS2013GitRepositoryBrowser'repoUrl
If TFS is also used as the repository server, this can usually be left blank.
String$class: 'TracGitRepositoryBrowser'$class: 'TracGitRepositoryBrowser'$class: 'TuleapBrowser'$class: 'TuleapBrowser'repositoryUrl
String$class: 'ViewGitWeb'$class: 'ViewGitWeb'repoUrl
StringprojectName
String$class: 'GitHubAgedRefsTrait'$class: 'GitHubAgedRefsTrait'retentionDays
StringgitHubBranchCommitSkipTraitgitHubBranchCommitSkipTraitgitHubCommitSkipTraitgitHubCommitSkipTrait$class: 'GitHubJiraValidatorTrait'$class: 'GitHubJiraValidatorTrait'jiraServerIdx
int$class: 'GitHubSCMSourceChecksTrait'$class: 'GitHubSCMSourceChecksTrait'verboseConsoleLog (optional)
boolean$class: 'GitHubSCMSourceStatusChecksTrait'$class: 'GitHubSCMSourceStatusChecksTrait'name (optional)
Stringskip (optional)
booleanskipNotifications (optional)
booleanskipProgressUpdates (optional)
booleansuppressLogs (optional)
booleanunstableBuildNeutral (optional)
boolean$class: 'GitLFSPullTrait'$class: 'GitLFSPullTrait'gitlabAvatargitlabAvatardisableProjectAvatar (optional)
booleangitlabSkipNotificationsgitlabSkipNotifications$class: 'GitToolSCMSourceTrait'$class: 'GitToolSCMSourceTrait'gitTool
String$class: 'HookRegistrationTrait'$class: 'HookRegistrationTrait'webHookMode
StringsystemHookMode
StringgitHubIgnoreDraftPullRequestFiltergitHubIgnoreDraftPullRequestFilter$class: 'IgnoreOnPushNotificationTrait'$class: 'IgnoreOnPushNotificationTrait'jervisFilterjervisFilterThis will look at the root of a GitHub reference for .jervis.yml for the branches and tags filtering. You can customize the name of the YAML file searched for if you like.
For Tags:
For Branches:
branches:
only:
- master
By default Jervis will generate Jenkins jobs for all branches that have a .jervis.yml file. You can control and limit this behavior by specifying the branches or tags key in your .jervis.yml.
You can either whitelist or blacklist branches that you want to be built:
# blacklist
branches:
except:
- legacy
- experimental
# whitelist
branches:
only:
- master
- stable
The same YAML can be applied to tags.
# blacklist
tags:
except:
- .*-rc
- .*-beta
# whitelist
tags:
only:
- v[.0-9]+
If you specify both only and except, then except will be ignored. .jervis.yml needs to be present on all branches you want to be built. .jervis.yml will be interpreted in the context of that branch so if you specify a whitelist in your master branch it will not propagate to other branches.
You can use regular expressions to whitelist or blacklist branches:
branches:
only:
- master
- /^[.0-9]+-hotfix$/
Any name surrounded with / in the list of branches is treated as a regular expression. The expression will use Pattern.compile to compile the regex string into a Groovy regular expression.
yamlFileName
The filename which will be read from GitHub to determine if a Jenkins branch, tag, or pull request should be built. Provide a comma separated list of paths to YAML files in a repository and it will check each path as a fallback.
For example, set the value to: .jervis.yml, .ci/jervis.yml and this plugin will first check for valid YAML in .jervis.yml. If no YAML exists, then it will fall back to checking .ci/jervis.yml.
String$class: 'LocalBranchTrait'$class: 'LocalBranchTrait'logCommentlogCommentlogSuccess (optional)
booleansudoUser (optional)
String$class: 'MercurialBrowserSCMSourceTrait'$class: 'MercurialBrowserSCMSourceTrait'browser
$class: 'FishEye'$class: 'FishEye'url
String$class: 'GoogleCode'$class: 'GoogleCode'url
String$class: 'HgWeb'$class: 'HgWeb'url
String$class: 'Kallithea'$class: 'Kallithea'url
String$class: 'KilnHG'$class: 'KilnHG'url
String$class: 'RhodeCode'$class: 'RhodeCode'url
String$class: 'RhodeCodeLegacy'$class: 'RhodeCodeLegacy'url
String$class: 'ScmManager'$class: 'ScmManager'url
http://YOURSCMMANAGER/scm/repo/NAMESPACE/NAME/).
String$class: 'MercurialInstallationSCMSourceTrait'$class: 'MercurialInstallationSCMSourceTrait'installation
String$class: 'NotificationContextTrait'$class: 'NotificationContextTrait'contextLabel
StringtypeSuffix
Appends the relevant suffix to the context label based on the build type. '/pr-merge', '/pr-head' or '/branch'
booleannotificationsSkipnotificationsSkipgitLabOriginDiscoverygitLabOriginDiscoverystrategyId
int$class: 'PathBasedPullRequestFilterTrait'$class: 'PathBasedPullRequestFilterTrait'inclusionField
StringexclusionField
String$class: 'PreBuildMergeTrait'$class: 'PreBuildMergeTrait'extension
optionsoptions
mergeTargetmergeTarget
master.
StringfastForwardModefastForwardMode (optional)
FF, FF_ONLY, NO_FFmergeRemotemergeRemote (optional)
origin, that contains the branch you specify below. If left blank, it'll default to the name of the first repository configured above.
StringmergeStrategymergeStrategy (optional)
DEFAULT, RESOLVE, RECURSIVE, OCTOPUS, OURS, SUBTREE, RECURSIVE_THEIRS$class: 'PretestedIntegrationSCMTrait'$class: 'PretestedIntegrationSCMTrait'extension
gitIntegrationStrategygitIntegrationStrategy
accumulatedaccumulatedsquashsquashintegrationBranchintegrationBranch
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>
StringrepoNamerepoName
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
String$class: 'PruneStaleBranchTrait'$class: 'PruneStaleBranchTrait'$class: 'PruneStaleTagTrait'$class: 'PruneStaleTagTrait'bitbucketPublicRepoPullRequestFilterbitbucketPublicRepoPullRequestFilter$class: 'PullRequestDiscoveryTrait'$class: 'PullRequestDiscoveryTrait'excludeBranchesWithPRs
boolean$class: 'PullRequestLabelsBlackListFilterTrait'$class: 'PullRequestLabelsBlackListFilterTrait'labels
String$class: 'PullRequestLabelsMatchAllFilterTrait'$class: 'PullRequestLabelsMatchAllFilterTrait'labels
String$class: 'PullRequestLabelsMatchAnyFilterTrait'$class: 'PullRequestLabelsMatchAnyFilterTrait'labels
String$class: 'PullRequestNameFilterTrait'$class: 'PullRequestNameFilterTrait'strategyId
intphrase
StringignoreCase
booleanregex
boolean$class: 'RefSpecsSCMSourceTrait'$class: 'RefSpecsSCMSourceTrait'templates
valuevalue
@{remote} will be replaced by the remote name (which defaults to origin) before use.
StringheadRegexFilterWithPRFromOriginheadRegexFilterWithPRFromOriginregex
StringtagRegex
String$class: 'RemoteNameSCMSourceTrait'$class: 'RemoteNameSCMSourceTrait'remoteName
StringskipNotificationsskipNotifications$class: 'SparseCheckoutPathsTrait'$class: 'SparseCheckoutPathsTrait'extension
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
sparseCheckoutPathssparseCheckoutPaths
pathpath
String$class: 'SubmoduleOptionTrait'$class: 'SubmoduleOptionTrait'extension
disableSubmodulesdisableSubmodules
booleanrecursiveSubmodulesrecursiveSubmodules
booleantrackingSubmodulestrackingSubmodules
booleanreferencereference
git init --bare git remote add SubProject1 https://gitrepo.com/subproject1 git remote add SubProject2 https://gitrepo.com/subproject2 git fetch --all
Stringtimeouttimeout
intparentCredentialsparentCredentials
booleandepthdepth (optional)
intshallowshallow (optional)
booleanthreadsthreads (optional)
intmrTriggerCommentmrTriggerCommentcommentBody
StringonlyTrustedMembersCanTrigger
booleantuleapBranchDiscoverytuleapBranchDiscoverytuleapNotifyPullRequesttuleapNotifyPullRequesttuleapForkPullRequestDiscoverytuleapForkPullRequestDiscoverytuleapPullRequestDiscoverytuleapPullRequestDiscovery$class: 'UserIdentityTrait'$class: 'UserIdentityTrait'extension
namename
If given, "GIT_COMMITTER_NAME=[this]" and "GIT_AUTHOR_NAME=[this]" are set for builds. This overrides whatever is in the global settings.
Stringemailemail
If given, "GIT_COMMITTER_EMAIL=[this]" and "GIT_AUTHOR_EMAIL=[this]" are set for builds. This overrides whatever is in the global settings.
StringbitbucketWebhookConfigurationbitbucketWebhookConfigurationSets the value for committersToIgnore in the Bitbucket Webhook. Value should be a comma separated string.
committerToIgnore is used to prevent triggering Jenkins builds when commits by certain users are made.
committersToIgnore
StringheadWildcardFilterWithPRFromOriginheadWildcardFilterWithPRFromOriginincludes
* as a wildcard; for example: master release*
Stringexcludes
release
StringtagIncludes
* as a wildcard; for example: *-1.* to build only 1.0 tags from the maven release plugin.
StringtagExcludes
*-0.*
String$class: 'WipeWorkspaceTrait'$class: 'WipeWorkspaceTrait'bitbucketBranchDiscoverybitbucketBranchDiscoverystrategyId
intbitbucketForkDiscoverybitbucketForkDiscoverystrategyId
inttrust
One of the great powers of pull requests is that anyone with read access to a repository can fork it, commit some changes to their fork and then create a pull request against the original repository with their changes. There are some files stored in source control that are important. For example, a Jenkinsfile may contain configuration details to sandbox pull requests in order to mitigate against malicious pull requests. In order to protect against a malicious pull request itself modifying the Jenkinsfile to remove the protections, you can define the trust policy for pull requests from forks.
Other plugins can extend the available trust policies. The default policies are:
Jenkinsfile) the contents of that file will be retrieved from the target branch on the origin repository and not from the pull request branch on the fork repository.
jenkins.scm.api.trait.SCMHeadAuthority<? super com.cloudbees.jenkins.plugins.bitbucket.BitbucketSCMSourceRequest, ? extends jenkins.scm.api.mixin.ChangeRequestSCMHead2, ? extends jenkins.scm.api.SCMRevision>bitbucketPullRequestDiscoverybitbucketPullRequestDiscoverystrategyId
intbitbucketSshCheckoutbitbucketSshCheckouthttps:// protocol for the Git repository.
This behaviour allows you to select the SSH private key to be used for checking out sources, which will consequently force the checkout to use the ssh:// protocol.
credentialsId
It must be a SSH key based credential.
StringbitbucketTagDiscoverybitbucketTagDiscoverybitbucketWebhookRegistrationbitbucketWebhookRegistrationOverrides the defaults for webhook management.
Webhooks are used to inform Jenkins about changes to repositories. There are two ways webhooks can be configured:
The Manage Jenkins » Configure Jenkins › Bitbucket Endpoints allows defining the list of servers. Each server can be associated with credentials. If credentials are defined then the default behaviour is to use those credentials to automatically manage the webhooks of all repositories that Jenkins is interested in. If no credentials are defined then the default behaviour is to require the user to manually configure webhooks.
mode
String$class: 'com.cloudogu.scmmanager.scm.BranchDiscoveryTrait'$class: 'com.cloudogu.scmmanager.scm.BranchDiscoveryTrait'$class: 'com.cloudogu.scmmanager.scm.TagDiscoveryTrait'$class: 'com.cloudogu.scmmanager.scm.TagDiscoveryTrait'dagshubBranchDiscoverydagshubBranchDiscovery$class: 'io.jenkins.plugins.dagshubbranchsource.traits.ForkPullRequestDiscoveryTrait'$class: 'io.jenkins.plugins.dagshubbranchsource.traits.ForkPullRequestDiscoveryTrait'buildOnPullHead (optional)
boolean$class: 'io.jenkins.plugins.dagshubbranchsource.traits.OriginPullRequestDiscoveryTrait'$class: 'io.jenkins.plugins.dagshubbranchsource.traits.OriginPullRequestDiscoveryTrait'buildOnPullHead (optional)
booleandagshubTagDiscoverydagshubTagDiscoverygitLabBranchDiscoverygitLabBranchDiscoverystrategyId
int$class: 'io.jenkins.plugins.gitlabbranchsource.SSHCheckoutTrait'$class: 'io.jenkins.plugins.gitlabbranchsource.SSHCheckoutTrait'https:// protocol for the Git repository.
This behaviour allows you to select the SSH private key to be used for checking out sources, which will consequently force the checkout to use the ssh:// protocol.
credentialsId
StringgitLabTagDiscoverygitLabTagDiscoverygitBranchDiscoverygitBranchDiscoverygitTagDiscoverygitTagDiscoveryheadRegexFilterheadRegexFilterregex
StringheadWildcardFilterheadWildcardFilterincludes
* as a wildcard; for example: master release*
Stringexcludes
release alpha-* beta-*
StringheadRegexFilterWithPRheadRegexFilterWithPRregex
StringtagRegex
StringheadWildcardFilterWithPRheadWildcardFilterWithPRincludes
* as a wildcard; for example: master release*
Stringexcludes
release
StringtagIncludes
* as a wildcard; for example: *-1.* to build only 1.0 tags from the maven release plugin.
StringtagExcludes
*-0.*
StringgiteaBranchDiscoverygiteaBranchDiscoverystrategyId
intgiteaForkDiscoverygiteaForkDiscoverystrategyId
inttrust
One of the great powers of pull requests is that anyone with read access to a repository can fork it, commit some changes to their fork and then create a pull request against the original repository with their changes. There are some files stored in source control that are important. For example, a Jenkinsfile may contain configuration details to sandbox pull requests in order to mitigate against malicious pull requests. In order to protect against a malicious pull request itself modifying the Jenkinsfile to remove the protections, you can define the trust policy for pull requests from forks.
Other plugins can extend the available trust policies. The default policies are:
Jenkinsfile) the contents of that file will be retrieved from the target branch on the origin repository and not from the pull request branch on the fork repository.
Nobody.
gitLabTrustMembersgitLabTrustMembersbitbucketTrustTeambitbucketTrustTeambitbucketTrustEveryonebitbucketTrustEveryonebitbucketTrustNobodybitbucketTrustNobodygitLabTrustEveryonegitLabTrustEveryonegitLabTrustNobodygitLabTrustNobodygitLabTrustPermissionsgitLabTrustPermissionsgiteaTrustContributorsgiteaTrustContributorsgiteaTrustEveryonegiteaTrustEveryonegiteaTrustNobodygiteaTrustNobodygitHubTrustContributorsgitHubTrustContributorsgitHubTrustEveryonegitHubTrustEveryonegitHubTrustNobodygitHubTrustNobodygitHubTrustPermissionsgitHubTrustPermissionsgiteaPullRequestDiscoverygiteaPullRequestDiscoverystrategyId
intgiteaSSHCheckoutgiteaSSHCheckouthttps:// protocol for the Git repository.
This behaviour allows you to select the SSH private key to be used for checking out sources, which will consequently force the checkout to use the ssh:// protocol.
credentialsId
StringgiteaTagDiscoverygiteaTagDiscoverygiteaWebhookRegistrationgiteaWebhookRegistrationOverrides the defaults for webhook management.
Webhooks are used to inform Jenkins about changes to repositories. There are two ways webhooks can be configured:
The Manage Jenkins » Configure System › Gitea Server allows defining the list of servers. Each server can be associated with credentials. If credentials are defined then the default behaviour is to use those credentials to automatically manage the webhooks of all repositories that Jenkins is interested in. If no credentials are defined then the default behaviour is to require the user to manually configure webhooks.
mode
StringgitHubBranchDiscoverygitHubBranchDiscoverystrategyId
env.GIT_BRANCH will be set to the branch name rather than PR-#. Also, status notifications for these builds will only be applied to the commit and not to the pull request.
intgitHubForkDiscoverygitHubForkDiscoverystrategyId
inttrust
One of the great powers of pull requests is that anyone with read access to a repository can fork it, commit some changes to their fork and then create a pull request against the original repository with their changes. There are some files stored in source control that are important. For example, a Jenkinsfile may contain configuration details to sandbox pull requests in order to mitigate against malicious pull requests. In order to protect against a malicious pull request itself modifying the Jenkinsfile to remove the protections, you can define the trust policy for pull requests from forks.
Other plugins can extend the available trust policies. The default policies are:
Jenkinsfile) the contents of that file will be retrieved from the target branch on the origin repository and not from the pull request branch on the fork repository.
Nobody. NOTE: all collaborators are trusted, even if they are only members of a team with read permission.
jenkins.scm.api.trait.SCMHeadAuthority<? super org.jenkinsci.plugins.github_branch_source.GitHubSCMSourceRequest, ? extends jenkins.scm.api.mixin.ChangeRequestSCMHead2, ? extends jenkins.scm.api.SCMRevision>gitHubPullRequestDiscoverygitHubPullRequestDiscoverystrategyId
intgitHubSshCheckoutgitHubSshCheckouthttps:// protocol for the Git repository.
This behaviour allows you to select the SSH private key to be used for checking out sources, which will consequently force the checkout to use the ssh:// protocol.
credentialsId
StringgitHubTagDiscoverygitHubTagDiscoverygitHubgitHubhandlers (optional)
branchesbranchesevents (optional)
commitcommitchecks
commitMessagePatterncommitMessagePatternexclude (optional)
booleanmatchCriteria (optional)
StringbranchCreatedbranchCreateddeleteddeletedhashChangedhashChangedrestrictionrestrictionexclude (optional)
booleanmatchAsPattern (optional)
booleanmatchCriteriaStr (optional)
StringpullRequestspullRequestsevents (optional)
closeclosecommentPatterncommentPatterncomment
StringcommitChangedcommitChangeddescriptiondescriptionskipMsg
StringlabelsAddedlabelsAddedlabel
labelslabels
Every new label on new line
StringlabelsExistlabelsExistlabel
labelslabels
Every new label on new line
Stringskip
booleanlabelsNotExistlabelsNotExistlabel
labelslabels
Every new label on new line
Stringskip
booleanlabelsPatternExistslabelsPatternExistslabel
labelslabels
Every new label on new line
Stringskip
booleanlabelsRemovedlabelsRemovedlabel
labelslabels
Every new label on new line
StringnonMergeablenonMergeableskip
booleanNumberNumbernumber
intmatch
booleanskip
booleanOpenOpentagstagsevents (optional)
createdcreatedrestrictionsrestrictionsexclude (optional)
booleanmatchAsPattern (optional)
booleanmatchCriteriaStr (optional)
Stringid (optional)
StringprojectUrlStr (optional)
StringrepoProvider (optional)
gitHubPlugingitHubPlugincacheConnection (optional)
booleanmanageHooks (optional)
booleanrepoPermission (optional)
ADMIN, PUSH, PULLscmFactory (optional)
asIsGITScmasIsGITScmgitSCM
The git plugin provides fundamental git operations for Jenkins projects. It can poll, fetch, checkout, and merge contents of git repositories.
The git plugin provides an SCM implementation to be used with the Pipeline SCM checkout step. The Pipeline Syntax Snippet Generator guides the user to select git plugin checkout options and provides online help for each of the options.
userRemoteConfigsuserRemoteConfigs
${SUPER_PROJECT_URL}/${SUBMODULE}, rather than relying on information from .gitmodules.urlurl
git clone command.
Stringnamename
origin, to uniquely identify this repository among other remote repositories. This is the same "name" that you use in your git remote command. If left empty, Jenkins will generate unique names for you.
You normally want to specify this when you have multiple remote repositories.
Stringrefspecrefspec
git fetch, which retrieves all the branch heads as remotes/REPOSITORYNAME/BRANCHNAME. This default behaviour is OK for most cases.
In other words, the default refspec is "+refs/heads/*:refs/remotes/REPOSITORYNAME/*" where REPOSITORYNAME is the value you specify in the above "name of repository" textbox.
When do you want to modify this value? A good example is when you want to just retrieve one branch. For example, +refs/heads/master:refs/remotes/origin/master would only retrieve the master branch and nothing else.
The plugin uses a default refspec for its initial fetch, unless the "Advanced Clone Option" is set to honor refspec. This keeps compatibility with previous behavior, and allows the job definition to decide if the refspec should be honored on initial clone.
Multiple refspecs can be entered by separating them with a space character. +refs/heads/master:refs/remotes/origin/master +refs/heads/develop:refs/remotes/origin/develop retrieves the master branch and the develop branch and nothing else.
See the refspec definition in Git user manual for more details.
StringcredentialsIdcredentialsId
Stringbranchesbranches
namename
Specify the branches if you'd like to track a specific branch in a repository. If left blank, all branches will be examined for changes and built.
The safest way is to use the refs/heads/<branchName> syntax. This way the expected branch is unambiguous.
If your branch name has a / in it make sure to use the full reference above. When not presented with a full path the plugin will only use the part of the string right of the last slash. Meaning foo/bar will actually match bar.
If you use a wildcard branch specifier, with a slash (e.g. release/), you'll need to specify the origin repository in the branch names to make sure changes are picked up. So e.g. origin/release/
Possible options:
<branchName>refs/heads/<branchName>.master, feature1, ... refs/heads/<branchName>refs/heads/master, refs/heads/feature1/master, ... <remoteRepoName>/<branchName>refs/heads/<branchName>.origin/master remotes/<remoteRepoName>/<branchName>remotes/origin/master refs/remotes/<remoteRepoName>/<branchName>refs/remotes/origin/master <tagName>refs/tags/<tagName> instead.git-2.3.0 refs/tags/<tagName>refs/tags/git-2.3.0 <commitId>5062ac843f2b947733e6a3b105977056821bd352, 5062ac84, ... ${ENV_VARIABLE}${TREEISH}, refs/tags/${TAGNAME}, ... <Wildcards>REPOSITORYNAME/BRANCH. In addition, BRANCH is recognized as a shorthand of */BRANCH, '*' is recognized as a wildcard, and '**' is recognized as wildcard that includes the separator '/'. Therefore, origin/branches* would match origin/branches-foo but not origin/branches/foo, while origin/branches** would match both origin/branches-foo and origin/branches/foo. :<regular expression>:regexp. Regular expression syntax in branches to build will only build those branches whose names match the regular expression.:^(?!(origin/prefix)).*
origin or origin/master or origin/featureorigin/prefix or origin/prefix_123 or origin/prefix-abc:origin/release-\d{8}
origin/release-20150101origin/release-2015010 or origin/release-201501011 or origin/release-20150101-something:^(?!origin/master$|origin/develop$).*
origin/branch1 or origin/branch-2 or origin/master123 or origin/develop-123origin/master or origin/developStringbrowserbrowser
$class: 'AssemblaWeb'$class: 'AssemblaWeb'repoUrl
String$class: 'BacklogGitRepositoryBrowser'$class: 'BacklogGitRepositoryBrowser'repoName
StringrepoUrl
StringbitbucketServerbitbucketServerrepoUrl
String$class: 'BitbucketWeb'$class: 'BitbucketWeb'repoUrl
String$class: 'CGit'$class: 'CGit'repoUrl
String$class: 'FisheyeGitRepositoryBrowser'$class: 'FisheyeGitRepositoryBrowser'repoUrl
String$class: 'GitBlitRepositoryBrowser'$class: 'GitBlitRepositoryBrowser'repoUrl
StringprojectName
String$class: 'GitBucketBrowser'$class: 'GitBucketBrowser'url
String$class: 'GitLab'$class: 'GitLab'repoUrl
Stringversion (optional)
String$class: 'GitLabBrowser'$class: 'GitLabBrowser'https://gitLab.example.com then the URL for bob's skunkworks project might be https://gitLab.example.com/bob/skunkworks.
projectUrl
https://gitLab.example.com then the URL for bob's skunkworks project might be https://gitLab.example.com/bob/skunkworks
String$class: 'GitList'$class: 'GitList'repoUrl
String$class: 'GitWeb'$class: 'GitWeb'repoUrl
String$class: 'GiteaBrowser'$class: 'GiteaBrowser'repoUrl
https://gitea.example.com then the URL for bob's skunkworks project repository might be https://gitea.example.com/bob/skunkworks
String$class: 'GithubWeb'$class: 'GithubWeb'repoUrl
String$class: 'Gitiles'$class: 'Gitiles'repoUrl
String$class: 'GitoriousWeb'$class: 'GitoriousWeb'repoUrl
String$class: 'GogsGit'$class: 'GogsGit'repoUrl
String$class: 'KilnGit'$class: 'KilnGit'repoUrl
String$class: 'Phabricator'$class: 'Phabricator'repoUrl
Stringrepo
String$class: 'RedmineWeb'$class: 'RedmineWeb'repoUrl
String$class: 'RhodeCode'$class: 'RhodeCode'repoUrl
String$class: 'ScmManagerGitRepositoryBrowser'$class: 'ScmManagerGitRepositoryBrowser'repoUrl
String$class: 'Stash'$class: 'Stash'repoUrl
String$class: 'TFS2013GitRepositoryBrowser'$class: 'TFS2013GitRepositoryBrowser'repoUrl
If TFS is also used as the repository server, this can usually be left blank.
String$class: 'TracGitRepositoryBrowser'$class: 'TracGitRepositoryBrowser'$class: 'TuleapBrowser'$class: 'TuleapBrowser'repositoryUrl
String$class: 'ViewGitWeb'$class: 'ViewGitWeb'repoUrl
StringprojectName
StringgitToolgitTool
Absolute path to the git executable.
This is different from other Jenkins tool definitions. Rather than providing the directory that contains the executable, you must provide the complete path to the executable. Setting '/usr/bin/git' would be correct, while setting '/usr/bin/' is not correct.
Stringextensionsextensions
Extensions add new behavior or modify existing plugin behavior for different uses. Extensions help users more precisely tune plugin behavior to meet their needs.
Extensions include:
$class: 'AuthorInChangelog'$class: 'AuthorInChangelog'$class: 'BuildChooserSetting'$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: 'AlternativeBuildChooser'$class: 'AncestryBuildChooser'$class: 'AncestryBuildChooser'maximumAgeInDays
intancestorCommitSha1
String$class: 'DefaultBuildChooser'$class: 'DefaultBuildChooser'$class: 'DeflakeGitBuildChooser'$class: 'DeflakeGitBuildChooser'$class: 'GerritTriggerBuildChooser'$class: 'GerritTriggerBuildChooser'$class: 'InverseBuildChooser'$class: 'InverseBuildChooser'$class: 'BuildSingleRevisionOnly'$class: 'BuildSingleRevisionOnly'$class: 'ChangelogToBranch'$class: 'ChangelogToBranch'options
compareRemotecompareRemote
origin, that contains the branch you specify below.
StringcompareTargetcompareTarget
String$class: 'CheckoutOption'$class: 'CheckoutOption'timeout
int$class: 'CleanBeforeCheckout'$class: '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 (optional)
.git directories.
boolean$class: 'CleanCheckout'$class: 'CleanCheckout'.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 (optional)
.git directories.
boolean$class: 'CloneOption'$class: 'CloneOption'shallow
booleannoTags
booleanreference
Stringtimeout
intdepth (optional)
inthonorRefspec (optional)
boolean$class: 'CodeCommitURLHelper'$class: 'CodeCommitURLHelper'credentialId
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.
StringrepositoryName
String$class: 'DisableRemotePoll'$class: 'DisableRemotePoll'$class: 'ExcludeFromChangeSet'$class: 'ExcludeFromChangeSet'$class: 'ExcludeFromPoll'$class: 'ExcludeFromPoll'$class: 'GitLFSPull'$class: 'GitLFSPull'$class: 'GitSCMChecksExtension'$class: 'GitSCMChecksExtension'verboseConsoleLog (optional)
boolean$class: 'GitSCMStatusChecksExtension'$class: 'GitSCMStatusChecksExtension'name (optional)
Stringskip (optional)
booleanskipProgressUpdates (optional)
booleansuppressLogs (optional)
booleanunstableBuildNeutral (optional)
boolean$class: 'GitTagMessageExtension'$class: 'GitTagMessageExtension'useMostRecentTag (optional)
boolean$class: 'IgnoreNotifyCommit'$class: 'IgnoreNotifyCommit'$class: 'LocalBranch'$class: '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'$class: 'MessageExclusion'excludedMessage
.*\[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.
String$class: 'PathRestriction'$class: 'PathRestriction'includedRegions
myapp/src/main/web/.*\.html
myapp/src/main/web/.*\.jpeg
myapp/src/main/web/.*\.gif
The 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.
StringexcludedRegions
myapp/src/main/web/.*\.html
myapp/src/main/web/.*\.jpeg
myapp/src/main/web/.*\.gif
The example above illustrates that if only html/jpeg/gif files have been committed to the SCM a build will not occur.
String$class: 'PerBuildTag'$class: 'PerBuildTag'$class: 'PreBuildMerge'$class: 'PreBuildMerge'options
mergeTargetmergeTarget
master.
StringfastForwardModefastForwardMode (optional)
FF, FF_ONLY, NO_FFmergeRemotemergeRemote (optional)
origin, that contains the branch you specify below. If left blank, it'll default to the name of the first repository configured above.
StringmergeStrategymergeStrategy (optional)
DEFAULT, RESOLVE, RECURSIVE, OCTOPUS, OURS, SUBTREE, RECURSIVE_THEIRSpretestedIntegrationpretestedIntegrationgitIntegrationStrategy
accumulatedaccumulatedsquashsquashintegrationBranch
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>
StringrepoName
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
String$class: 'PruneStaleBranch'$class: 'PruneStaleBranch'pruneTagspruneTagspruneTags
boolean$class: 'RelativeTargetDirectory'$class: 'RelativeTargetDirectory'relativeTargetDir
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.
String$class: 'ScmName'$class: 'ScmName'Unique name for this SCM. Needed when using Git within the Multi SCM plugin.
name
String$class: 'SparseCheckoutPaths'$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
pathpath
String$class: 'SubmoduleOption'$class: 'SubmoduleOption'disableSubmodules
booleanrecursiveSubmodules
booleantrackingSubmodules
booleanreference
git init --bare git remote add SubProject1 https://gitrepo.com/subproject1 git remote add SubProject2 https://gitrepo.com/subproject2 git fetch --all
Stringtimeout
intparentCredentials
booleandepth (optional)
intshallow (optional)
booleanthreads (optional)
int$class: 'UserExclusion'$class: 'UserExclusion'excludedUsers
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.
String$class: 'UserIdentity'$class: 'UserIdentity'name
If given, "GIT_COMMITTER_NAME=[this]" and "GIT_AUTHOR_NAME=[this]" are set for builds. This overrides whatever is in the global settings.
Stringemail
If given, "GIT_COMMITTER_EMAIL=[this]" and "GIT_AUTHOR_EMAIL=[this]" are set for builds. This overrides whatever is in the global settings.
String$class: 'WipeWorkspace'$class: 'WipeWorkspace'doGenerateSubmoduleConfigurationsdoGenerateSubmoduleConfigurations (optional)
Removed facility that was intended to test combinations of git submodule versions. Removed in git plugin 4.6.0. Ignores the user provided value and always uses false as its value.
booleansubmoduleCfgsubmoduleCfg (optional)
Removed facility that was intended to test combinations of git submodule versions. Removed in git plugin 4.6.0. Ignores the user provided value(s) and always uses empty values.
submoduleNamesubmoduleName
Removed in git plugin 4.6.0.
Stringbranchesbranches
Removed in git plugin 4.6.0.
StringnoGITScmnoGITScmgithubgithubrepoOwner
Specify the name of the GitHub Organization or GitHub User Account.
Stringrepository
StringrepositoryUrl
Specify the HTTPS URL of the GitHub Organization / User Account and repository.
GitHub examples:
GitHub Enterprise examples:
StringconfiguredByUrl
booleanapiUri (optional)
StringbuildForkPRHead (optional)
booleanbuildForkPRMerge (optional)
booleanbuildOriginBranch (optional)
booleanbuildOriginBranchWithPR (optional)
booleanbuildOriginPRHead (optional)
booleanbuildOriginPRMerge (optional)
booleancredentialsId (optional)
Credentials used to scan branches and pull requests, check out sources and mark commit statuses.
Note that only "username with password" credentials are supported. Existing credentials of other kinds will be filtered out. This is because Jenkins uses the GitHub API, which does not support other ways of authentication.
If none is given, only the public repositories will be scanned, and commit status will not be set on GitHub.
If your organization contains private repositories, then you need to specify a credential from a user who has access to those repositories. This is done by creating a "username with password" credential where the password is GitHub personal access tokens. The necessary scope is "repo".
Stringexcludes (optional)
Stringid (optional)
Stringincludes (optional)
Stringtraits (optional)
$class: 'ApprovedPullRequestTrait'$class: 'ApprovedPullRequestTrait'strategyId
int$class: 'AuthorInChangelogTrait'$class: 'AuthorInChangelogTrait'$class: 'BitbucketAgedRefsTrait'$class: 'BitbucketAgedRefsTrait'retentionDays
StringbitbucketBranchCommitSkipTraitbitbucketBranchCommitSkipTraitbitbucketBuildStatusNotificationsbitbucketBuildStatusNotificationssendSuccessNotificationForUnstableBuild (optional)
booleanbitbucketCommitSkipTraitbitbucketCommitSkipTrait$class: 'BitbucketJiraValidatorTrait'$class: 'BitbucketJiraValidatorTrait'jiraServerIdx
intbuildStatusNameCustomPartbuildStatusNameCustomPartbuildStatusNameCustomPart (optional)
String$class: 'ChangeDiscoveryTrait'$class: 'ChangeDiscoveryTrait'queryString
Provide an additional query string to search for open changes. The status:open is implicitly added and does not need to be specified. See Gerrit search operators documentation for a detailed list of the supported search operators.
-is:wipdoes not include work-in-progress changes
is:privateincludes private changes
String$class: 'CheckoutOptionTrait'$class: 'CheckoutOptionTrait'extension
timeouttimeout
int$class: 'CleanAfterCheckoutTrait'$class: 'CleanAfterCheckoutTrait'extension
.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.
deleteUntrackedNestedRepositoriesdeleteUntrackedNestedRepositories (optional)
.git directories.
boolean$class: 'CleanBeforeCheckoutTrait'$class: 'CleanBeforeCheckoutTrait'extension
.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.
deleteUntrackedNestedRepositoriesdeleteUntrackedNestedRepositories (optional)
.git directories.
boolean$class: 'CleanMercurialSCMSourceTrait'$class: 'CleanMercurialSCMSourceTrait'$class: 'CloneOptionTrait'$class: 'CloneOptionTrait'extension
shallowshallow
booleannoTagsnoTags
booleanreferencereference
Stringtimeouttimeout
intdepthdepth (optional)
inthonorRefspechonorRefspec (optional)
boolean$class: 'DisableStatusUpdateTrait'$class: 'DisableStatusUpdateTrait'$class: 'DiscoverOtherRefsTrait'$class: 'DiscoverOtherRefsTrait'ref
The pattern under /refs on the remote repository to discover, can contain a wildcard.
Example: test/*/merged
StringnameMapping (optional)
Mapping for how the ref can be named in for example the @Library.
Example: test-@{1}
Where @{1} replaces the first wildcard in the ref when discovered.
By default it will be "namespace_before_wildcard-@{1}". E.g. if ref is "test/*/merged" the default mapping would be "test-@{1}".
String$class: 'FilterChecksTrait'$class: 'FilterChecksTrait'queryOperator
ID, SCHEMEqueryString
StringgitLabForkDiscoverygitLabForkDiscoverystrategyId
inttrust
One of the great powers of merge requests is that anyone with read access to a project can fork it, commit some changes to their fork and then create a merge request against the original project with their changes. There are some files stored in source control that are important. For example, a Jenkinsfile may contain configuration details to sandbox merge requests in order to mitigate against malicious merge requests. In order to protect against a malicious merge request itself modifying the Jenkinsfile to remove the protections, you can define the trust policy for merge requests from forks.
Other plugins can extend the available trust policies. The default policies are:
Jenkinsfile) the contents of that file will be retrieved from the target branch on the origin project and not from the merge request branch on the fork project.
Nobody.
jenkins.scm.api.trait.SCMHeadAuthority<? super io.jenkins.plugins.gitlabbranchsource.GitLabSCMSourceRequest, ? extends jenkins.scm.api.mixin.ChangeRequestSCMHead2, ? extends jenkins.scm.api.SCMRevision>$class: 'GitBrowserSCMSourceTrait'$class: 'GitBrowserSCMSourceTrait'browser
$class: 'AssemblaWeb'$class: 'AssemblaWeb'repoUrl
String$class: 'BacklogGitRepositoryBrowser'$class: 'BacklogGitRepositoryBrowser'repoName
StringrepoUrl
StringbitbucketServerbitbucketServerrepoUrl
String$class: 'BitbucketWeb'$class: 'BitbucketWeb'repoUrl
String$class: 'CGit'$class: 'CGit'repoUrl
String$class: 'FisheyeGitRepositoryBrowser'$class: 'FisheyeGitRepositoryBrowser'repoUrl
String$class: 'GitBlitRepositoryBrowser'$class: 'GitBlitRepositoryBrowser'repoUrl
StringprojectName
String$class: 'GitBucketBrowser'$class: 'GitBucketBrowser'url
String$class: 'GitLab'$class: 'GitLab'repoUrl
Stringversion (optional)
String$class: 'GitLabBrowser'$class: 'GitLabBrowser'https://gitLab.example.com then the URL for bob's skunkworks project might be https://gitLab.example.com/bob/skunkworks.
projectUrl
https://gitLab.example.com then the URL for bob's skunkworks project might be https://gitLab.example.com/bob/skunkworks
String$class: 'GitList'$class: 'GitList'repoUrl
String$class: 'GitWeb'$class: 'GitWeb'repoUrl
String$class: 'GiteaBrowser'$class: 'GiteaBrowser'repoUrl
https://gitea.example.com then the URL for bob's skunkworks project repository might be https://gitea.example.com/bob/skunkworks
String$class: 'GithubWeb'$class: 'GithubWeb'repoUrl
String$class: 'Gitiles'$class: 'Gitiles'repoUrl
String$class: 'GitoriousWeb'$class: 'GitoriousWeb'repoUrl
String$class: 'GogsGit'$class: 'GogsGit'repoUrl
String$class: 'KilnGit'$class: 'KilnGit'repoUrl
String$class: 'Phabricator'$class: 'Phabricator'repoUrl
Stringrepo
String$class: 'RedmineWeb'$class: 'RedmineWeb'repoUrl
String$class: 'RhodeCode'$class: 'RhodeCode'repoUrl
String$class: 'ScmManagerGitRepositoryBrowser'$class: 'ScmManagerGitRepositoryBrowser'repoUrl
String$class: 'Stash'$class: 'Stash'repoUrl
String$class: 'TFS2013GitRepositoryBrowser'$class: 'TFS2013GitRepositoryBrowser'repoUrl
If TFS is also used as the repository server, this can usually be left blank.
String$class: 'TracGitRepositoryBrowser'$class: 'TracGitRepositoryBrowser'$class: 'TuleapBrowser'$class: 'TuleapBrowser'repositoryUrl
String$class: 'ViewGitWeb'$class: 'ViewGitWeb'repoUrl
StringprojectName
String$class: 'GitHubAgedRefsTrait'$class: 'GitHubAgedRefsTrait'retentionDays
StringgitHubBranchCommitSkipTraitgitHubBranchCommitSkipTraitgitHubCommitSkipTraitgitHubCommitSkipTrait$class: 'GitHubJiraValidatorTrait'$class: 'GitHubJiraValidatorTrait'jiraServerIdx
int$class: 'GitHubSCMSourceChecksTrait'$class: 'GitHubSCMSourceChecksTrait'verboseConsoleLog (optional)
boolean$class: 'GitHubSCMSourceStatusChecksTrait'$class: 'GitHubSCMSourceStatusChecksTrait'name (optional)
Stringskip (optional)
booleanskipNotifications (optional)
booleanskipProgressUpdates (optional)
booleansuppressLogs (optional)
booleanunstableBuildNeutral (optional)
boolean$class: 'GitLFSPullTrait'$class: 'GitLFSPullTrait'gitlabAvatargitlabAvatardisableProjectAvatar (optional)
booleangitlabSkipNotificationsgitlabSkipNotifications$class: 'GitToolSCMSourceTrait'$class: 'GitToolSCMSourceTrait'gitTool
String$class: 'HookRegistrationTrait'$class: 'HookRegistrationTrait'webHookMode
StringsystemHookMode
StringgitHubIgnoreDraftPullRequestFiltergitHubIgnoreDraftPullRequestFilter$class: 'IgnoreOnPushNotificationTrait'$class: 'IgnoreOnPushNotificationTrait'jervisFilterjervisFilterThis will look at the root of a GitHub reference for .jervis.yml for the branches and tags filtering. You can customize the name of the YAML file searched for if you like.
For Tags:
For Branches:
branches:
only:
- master
By default Jervis will generate Jenkins jobs for all branches that have a .jervis.yml file. You can control and limit this behavior by specifying the branches or tags key in your .jervis.yml.
You can either whitelist or blacklist branches that you want to be built:
# blacklist
branches:
except:
- legacy
- experimental
# whitelist
branches:
only:
- master
- stable
The same YAML can be applied to tags.
# blacklist
tags:
except:
- .*-rc
- .*-beta
# whitelist
tags:
only:
- v[.0-9]+
If you specify both only and except, then except will be ignored. .jervis.yml needs to be present on all branches you want to be built. .jervis.yml will be interpreted in the context of that branch so if you specify a whitelist in your master branch it will not propagate to other branches.
You can use regular expressions to whitelist or blacklist branches:
branches:
only:
- master
- /^[.0-9]+-hotfix$/
Any name surrounded with / in the list of branches is treated as a regular expression. The expression will use Pattern.compile to compile the regex string into a Groovy regular expression.
yamlFileName
The filename which will be read from GitHub to determine if a Jenkins branch, tag, or pull request should be built. Provide a comma separated list of paths to YAML files in a repository and it will check each path as a fallback.
For example, set the value to: .jervis.yml, .ci/jervis.yml and this plugin will first check for valid YAML in .jervis.yml. If no YAML exists, then it will fall back to checking .ci/jervis.yml.
String$class: 'LocalBranchTrait'$class: 'LocalBranchTrait'logCommentlogCommentlogSuccess (optional)
booleansudoUser (optional)
String$class: 'MercurialBrowserSCMSourceTrait'$class: 'MercurialBrowserSCMSourceTrait'browser
$class: 'FishEye'$class: 'FishEye'url
String$class: 'GoogleCode'$class: 'GoogleCode'url
String$class: 'HgWeb'$class: 'HgWeb'url
String$class: 'Kallithea'$class: 'Kallithea'url
String$class: 'KilnHG'$class: 'KilnHG'url
String$class: 'RhodeCode'$class: 'RhodeCode'url
String$class: 'RhodeCodeLegacy'$class: 'RhodeCodeLegacy'url
String$class: 'ScmManager'$class: 'ScmManager'url
http://YOURSCMMANAGER/scm/repo/NAMESPACE/NAME/).
String$class: 'MercurialInstallationSCMSourceTrait'$class: 'MercurialInstallationSCMSourceTrait'installation
String$class: 'NotificationContextTrait'$class: 'NotificationContextTrait'contextLabel
StringtypeSuffix
Appends the relevant suffix to the context label based on the build type. '/pr-merge', '/pr-head' or '/branch'
booleannotificationsSkipnotificationsSkipgitLabOriginDiscoverygitLabOriginDiscoverystrategyId
int$class: 'PathBasedPullRequestFilterTrait'$class: 'PathBasedPullRequestFilterTrait'inclusionField
StringexclusionField
String$class: 'PreBuildMergeTrait'$class: 'PreBuildMergeTrait'extension
optionsoptions
mergeTargetmergeTarget
master.
StringfastForwardModefastForwardMode (optional)
FF, FF_ONLY, NO_FFmergeRemotemergeRemote (optional)
origin, that contains the branch you specify below. If left blank, it'll default to the name of the first repository configured above.
StringmergeStrategymergeStrategy (optional)
DEFAULT, RESOLVE, RECURSIVE, OCTOPUS, OURS, SUBTREE, RECURSIVE_THEIRS$class: 'PretestedIntegrationSCMTrait'$class: 'PretestedIntegrationSCMTrait'extension
gitIntegrationStrategygitIntegrationStrategy
accumulatedaccumulatedsquashsquashintegrationBranchintegrationBranch
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>
StringrepoNamerepoName
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
String$class: 'PruneStaleBranchTrait'$class: 'PruneStaleBranchTrait'$class: 'PruneStaleTagTrait'$class: 'PruneStaleTagTrait'bitbucketPublicRepoPullRequestFilterbitbucketPublicRepoPullRequestFilter$class: 'PullRequestDiscoveryTrait'$class: 'PullRequestDiscoveryTrait'excludeBranchesWithPRs
boolean$class: 'PullRequestLabelsBlackListFilterTrait'$class: 'PullRequestLabelsBlackListFilterTrait'labels
String$class: 'PullRequestLabelsMatchAllFilterTrait'$class: 'PullRequestLabelsMatchAllFilterTrait'labels
String$class: 'PullRequestLabelsMatchAnyFilterTrait'$class: 'PullRequestLabelsMatchAnyFilterTrait'labels
String$class: 'PullRequestNameFilterTrait'$class: 'PullRequestNameFilterTrait'strategyId
intphrase
StringignoreCase
booleanregex
boolean$class: 'RefSpecsSCMSourceTrait'$class: 'RefSpecsSCMSourceTrait'templates
valuevalue
@{remote} will be replaced by the remote name (which defaults to origin) before use.
StringheadRegexFilterWithPRFromOriginheadRegexFilterWithPRFromOriginregex
StringtagRegex
String$class: 'RemoteNameSCMSourceTrait'$class: 'RemoteNameSCMSourceTrait'remoteName
StringskipNotificationsskipNotifications$class: 'SparseCheckoutPathsTrait'$class: 'SparseCheckoutPathsTrait'extension
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
sparseCheckoutPathssparseCheckoutPaths
pathpath
String$class: 'SubmoduleOptionTrait'$class: 'SubmoduleOptionTrait'extension
disableSubmodulesdisableSubmodules
booleanrecursiveSubmodulesrecursiveSubmodules
booleantrackingSubmodulestrackingSubmodules
booleanreferencereference
git init --bare git remote add SubProject1 https://gitrepo.com/subproject1 git remote add SubProject2 https://gitrepo.com/subproject2 git fetch --all
Stringtimeouttimeout
intparentCredentialsparentCredentials
booleandepthdepth (optional)
intshallowshallow (optional)
booleanthreadsthreads (optional)
intmrTriggerCommentmrTriggerCommentcommentBody
StringonlyTrustedMembersCanTrigger
booleantuleapBranchDiscoverytuleapBranchDiscoverytuleapNotifyPullRequesttuleapNotifyPullRequesttuleapForkPullRequestDiscoverytuleapForkPullRequestDiscoverytuleapPullRequestDiscoverytuleapPullRequestDiscovery$class: 'UserIdentityTrait'$class: 'UserIdentityTrait'extension
namename
If given, "GIT_COMMITTER_NAME=[this]" and "GIT_AUTHOR_NAME=[this]" are set for builds. This overrides whatever is in the global settings.
Stringemailemail
If given, "GIT_COMMITTER_EMAIL=[this]" and "GIT_AUTHOR_EMAIL=[this]" are set for builds. This overrides whatever is in the global settings.
StringbitbucketWebhookConfigurationbitbucketWebhookConfigurationSets the value for committersToIgnore in the Bitbucket Webhook. Value should be a comma separated string.
committerToIgnore is used to prevent triggering Jenkins builds when commits by certain users are made.
committersToIgnore
StringheadWildcardFilterWithPRFromOriginheadWildcardFilterWithPRFromOriginincludes
* as a wildcard; for example: master release*
Stringexcludes
release
StringtagIncludes
* as a wildcard; for example: *-1.* to build only 1.0 tags from the maven release plugin.
StringtagExcludes
*-0.*
String$class: 'WipeWorkspaceTrait'$class: 'WipeWorkspaceTrait'bitbucketBranchDiscoverybitbucketBranchDiscoverystrategyId
intbitbucketForkDiscoverybitbucketForkDiscoverystrategyId
inttrust
One of the great powers of pull requests is that anyone with read access to a repository can fork it, commit some changes to their fork and then create a pull request against the original repository with their changes. There are some files stored in source control that are important. For example, a Jenkinsfile may contain configuration details to sandbox pull requests in order to mitigate against malicious pull requests. In order to protect against a malicious pull request itself modifying the Jenkinsfile to remove the protections, you can define the trust policy for pull requests from forks.
Other plugins can extend the available trust policies. The default policies are:
Jenkinsfile) the contents of that file will be retrieved from the target branch on the origin repository and not from the pull request branch on the fork repository.
jenkins.scm.api.trait.SCMHeadAuthority<? super com.cloudbees.jenkins.plugins.bitbucket.BitbucketSCMSourceRequest, ? extends jenkins.scm.api.mixin.ChangeRequestSCMHead2, ? extends jenkins.scm.api.SCMRevision>bitbucketPullRequestDiscoverybitbucketPullRequestDiscoverystrategyId
intbitbucketSshCheckoutbitbucketSshCheckouthttps:// protocol for the Git repository.
This behaviour allows you to select the SSH private key to be used for checking out sources, which will consequently force the checkout to use the ssh:// protocol.
credentialsId
It must be a SSH key based credential.
StringbitbucketTagDiscoverybitbucketTagDiscoverybitbucketWebhookRegistrationbitbucketWebhookRegistrationOverrides the defaults for webhook management.
Webhooks are used to inform Jenkins about changes to repositories. There are two ways webhooks can be configured:
The Manage Jenkins » Configure Jenkins › Bitbucket Endpoints allows defining the list of servers. Each server can be associated with credentials. If credentials are defined then the default behaviour is to use those credentials to automatically manage the webhooks of all repositories that Jenkins is interested in. If no credentials are defined then the default behaviour is to require the user to manually configure webhooks.
mode
String$class: 'com.cloudogu.scmmanager.scm.BranchDiscoveryTrait'$class: 'com.cloudogu.scmmanager.scm.BranchDiscoveryTrait'$class: 'com.cloudogu.scmmanager.scm.TagDiscoveryTrait'$class: 'com.cloudogu.scmmanager.scm.TagDiscoveryTrait'dagshubBranchDiscoverydagshubBranchDiscovery$class: 'io.jenkins.plugins.dagshubbranchsource.traits.ForkPullRequestDiscoveryTrait'$class: 'io.jenkins.plugins.dagshubbranchsource.traits.ForkPullRequestDiscoveryTrait'buildOnPullHead (optional)
boolean$class: 'io.jenkins.plugins.dagshubbranchsource.traits.OriginPullRequestDiscoveryTrait'$class: 'io.jenkins.plugins.dagshubbranchsource.traits.OriginPullRequestDiscoveryTrait'buildOnPullHead (optional)
booleandagshubTagDiscoverydagshubTagDiscoverygitLabBranchDiscoverygitLabBranchDiscoverystrategyId
int$class: 'io.jenkins.plugins.gitlabbranchsource.SSHCheckoutTrait'$class: 'io.jenkins.plugins.gitlabbranchsource.SSHCheckoutTrait'https:// protocol for the Git repository.
This behaviour allows you to select the SSH private key to be used for checking out sources, which will consequently force the checkout to use the ssh:// protocol.
credentialsId
StringgitLabTagDiscoverygitLabTagDiscoverygitBranchDiscoverygitBranchDiscoverygitTagDiscoverygitTagDiscoveryheadRegexFilterheadRegexFilterregex
StringheadWildcardFilterheadWildcardFilterincludes
* as a wildcard; for example: master release*
Stringexcludes
release alpha-* beta-*
StringheadRegexFilterWithPRheadRegexFilterWithPRregex
StringtagRegex
StringheadWildcardFilterWithPRheadWildcardFilterWithPRincludes
* as a wildcard; for example: master release*
Stringexcludes
release
StringtagIncludes
* as a wildcard; for example: *-1.* to build only 1.0 tags from the maven release plugin.
StringtagExcludes
*-0.*
StringgiteaBranchDiscoverygiteaBranchDiscoverystrategyId
intgiteaForkDiscoverygiteaForkDiscoverystrategyId
inttrust
One of the great powers of pull requests is that anyone with read access to a repository can fork it, commit some changes to their fork and then create a pull request against the original repository with their changes. There are some files stored in source control that are important. For example, a Jenkinsfile may contain configuration details to sandbox pull requests in order to mitigate against malicious pull requests. In order to protect against a malicious pull request itself modifying the Jenkinsfile to remove the protections, you can define the trust policy for pull requests from forks.
Other plugins can extend the available trust policies. The default policies are:
Jenkinsfile) the contents of that file will be retrieved from the target branch on the origin repository and not from the pull request branch on the fork repository.
Nobody.
gitLabTrustMembersgitLabTrustMembersbitbucketTrustTeambitbucketTrustTeambitbucketTrustEveryonebitbucketTrustEveryonebitbucketTrustNobodybitbucketTrustNobodygitLabTrustEveryonegitLabTrustEveryonegitLabTrustNobodygitLabTrustNobodygitLabTrustPermissionsgitLabTrustPermissionsgiteaTrustContributorsgiteaTrustContributorsgiteaTrustEveryonegiteaTrustEveryonegiteaTrustNobodygiteaTrustNobodygitHubTrustContributorsgitHubTrustContributorsgitHubTrustEveryonegitHubTrustEveryonegitHubTrustNobodygitHubTrustNobodygitHubTrustPermissionsgitHubTrustPermissionsgiteaPullRequestDiscoverygiteaPullRequestDiscoverystrategyId
intgiteaSSHCheckoutgiteaSSHCheckouthttps:// protocol for the Git repository.
This behaviour allows you to select the SSH private key to be used for checking out sources, which will consequently force the checkout to use the ssh:// protocol.
credentialsId
StringgiteaTagDiscoverygiteaTagDiscoverygiteaWebhookRegistrationgiteaWebhookRegistrationOverrides the defaults for webhook management.
Webhooks are used to inform Jenkins about changes to repositories. There are two ways webhooks can be configured:
The Manage Jenkins » Configure System › Gitea Server allows defining the list of servers. Each server can be associated with credentials. If credentials are defined then the default behaviour is to use those credentials to automatically manage the webhooks of all repositories that Jenkins is interested in. If no credentials are defined then the default behaviour is to require the user to manually configure webhooks.
mode
StringgitHubBranchDiscoverygitHubBranchDiscoverystrategyId
env.GIT_BRANCH will be set to the branch name rather than PR-#. Also, status notifications for these builds will only be applied to the commit and not to the pull request.
intgitHubForkDiscoverygitHubForkDiscoverystrategyId
inttrust
One of the great powers of pull requests is that anyone with read access to a repository can fork it, commit some changes to their fork and then create a pull request against the original repository with their changes. There are some files stored in source control that are important. For example, a Jenkinsfile may contain configuration details to sandbox pull requests in order to mitigate against malicious pull requests. In order to protect against a malicious pull request itself modifying the Jenkinsfile to remove the protections, you can define the trust policy for pull requests from forks.
Other plugins can extend the available trust policies. The default policies are:
Jenkinsfile) the contents of that file will be retrieved from the target branch on the origin repository and not from the pull request branch on the fork repository.
Nobody. NOTE: all collaborators are trusted, even if they are only members of a team with read permission.
jenkins.scm.api.trait.SCMHeadAuthority<? super org.jenkinsci.plugins.github_branch_source.GitHubSCMSourceRequest, ? extends jenkins.scm.api.mixin.ChangeRequestSCMHead2, ? extends jenkins.scm.api.SCMRevision>gitHubPullRequestDiscoverygitHubPullRequestDiscoverystrategyId
intgitHubSshCheckoutgitHubSshCheckouthttps:// protocol for the Git repository.
This behaviour allows you to select the SSH private key to be used for checking out sources, which will consequently force the checkout to use the ssh:// protocol.
credentialsId
StringgitHubTagDiscoverygitHubTagDiscoverylibraryPath (optional)
StringlibraryResource: Load a resource file from a shared libraryresource
/-separated) path to a resource in a shared library's /resources folder.
Stringencoding (optional)
StringPlease 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.