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 library on the flyLoad 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 : String
@
. You may instead define a library inline here.
changelog : boolean
(optional)
retriever
(optional)
http
httpURL : String
credentialsId : String
preemptiveAuth : boolean
nexus
artifactDetails : String
mavenHome : String
legacySCM
scm
$class: 'AWSCodePipelineSCM'
name : String
clearWorkspace : boolean
region : String
The AWS region must be the same to the region where your action runs in CodePipeline. Examples: "us-east-1", "cn-north-1", "us-gov-west-1". To list all supported regions, see AWS CodePipeline endpoints and quotas.
awsAccessKey : String
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.
awsSecretKey : String
>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.
proxyHost : String
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.
proxyPort : String
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.
category : String
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.
provider : String
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.
version : String
Leave the default as 1.
accurev
depot : String
stream : String
serverName : String
(optional)
serverUUID : String
(optional)
wspaceORreftree : String
(optional)
accurevTool : String
(optional)
cleanreftree : boolean
(optional)
directoryOffset : String
(optional)
dontPopContent : boolean
(optional)
filterForPollSCM : String
(optional)
ignoreStreamParent : boolean
(optional)
reftree : String
(optional)
snapshotNameFormat : String
(optional)
subPath : String
(optional)
subPathOnly : boolean
(optional)
synctime : boolean
(optional)
useSnapshot : boolean
(optional)
workspace : String
(optional)
$class: 'BazaarSCM'
source : String
cleantree : boolean
browser
$class: 'Loggerhead'
url : String
$class: 'OpenGrok'
url : String
rootModule : String
checkout : boolean
$class: 'BitKeeperSCM'
parent : String
localRepository : String
usePull : boolean
quiet : boolean
BbS
id : String
branches
name : String
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/feature
origin/prefix
or origin/prefix_123
or origin/prefix-abc
:origin/release-\d{8}
origin/release-20150101
origin/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-123
origin/master
or origin/develop
credentialsId : String
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.
sshCredentialsId : String
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:
extensions
authorInChangelog
$class: 'BuildChooserSetting'
This extension point in Jenkins is used by many other plugins to control the job to build specific commits. When you activate those plugins, you may see them installing a custom strategy here.
buildChooser
$class: 'AlternativeBuildChooser'
$class: 'AncestryBuildChooser'
maximumAgeInDays : int
ancestorCommitSha1 : String
$class: 'DefaultBuildChooser'
$class: 'DeflakeGitBuildChooser'
$class: 'GerritTriggerBuildChooser'
$class: 'InverseBuildChooser'
buildSingleRevisionOnly
changelogToBranch
options
compareRemote : String
origin
, that contains the branch you specify below.
compareTarget : String
checkoutOption
timeout : int
cleanBeforeCheckout
.gitignore
. It also resets all tracked files to their versioned state. This ensures that the workspace is in the same state as if you cloned and checked out in a brand-new empty directory, and ensures that your build is not affected by the files generated by the previous build.
deleteUntrackedNestedRepositories : boolean
(optional)
.git
directories.
cleanAfterCheckout
.gitignore
. It also resets all tracked files to their versioned state. This ensures that the workspace is in the same state as if you cloned and checked out in a brand-new empty directory, and ensures that your build is not affected by the files generated by the previous build.
deleteUntrackedNestedRepositories : boolean
(optional)
.git
directories.
cloneOption
shallow : boolean
noTags : boolean
reference : String
timeout : int
depth : int
(optional)
honorRefspec : boolean
(optional)
$class: 'CodeCommitURLHelper'
credentialId : String
OPTIONAL: Select the credentials to use.
If not specified, defaults to the DefaultAWSCredentialsProviderChain behaviour - *FROM THE JENKINS INSTANCE*
In the latter case, usage of IAM Role Profiles seems not to work, thus relying on environment variables / system properties or the ~/.aws/credentials file, thus not recommended.
repositoryName : String
$class: 'DisableRemotePoll'
$class: 'ExcludeFromChangeSet'
$class: 'ExcludeFromPoll'
firstBuildChangelog
makeChangelog : boolean
(optional)
lfs
$class: 'GitSCMChecksExtension'
verboseConsoleLog : boolean
(optional)
$class: 'GitSCMStatusChecksExtension'
name : String
(optional)
skip : boolean
(optional)
skipProgressUpdates : boolean
(optional)
suppressLogs : boolean
(optional)
unstableBuildNeutral : boolean
(optional)
$class: 'GitTagMessageExtension'
useMostRecentTag : boolean
(optional)
$class: 'IgnoreNotifyCommit'
localBranch
If selected, and its value is an empty string or "**", then the branch name is computed from the remote branch without the origin. In that case, a remote branch origin/master will be checked out to a local branch named master, and a remote branch origin/develop/new-feature will be checked out to a local branch named develop/newfeature.
Please note that this has not been tested with submodules.
localBranch : String
$class: 'MessageExclusion'
excludedMessage : String
.*\[maven-release-plugin\].*The example above illustrates that if only revisions with "[maven-release-plugin]" message in first comment line have been committed to the SCM a build will not occur. You can create more complex patterns using embedded flag expressions.
(?s).*FOO.*This example will search FOO message in all comment lines.
$class: 'PathRestriction'
includedRegions : String
myapp/src/main/web/.*\.html myapp/src/main/web/.*\.jpeg myapp/src/main/web/.*\.gifThe example above illustrates that a build will only occur, if html/jpeg/gif files have been committed to the SCM. Exclusions take precedence over inclusions, if there is an overlap between included and excluded regions.
excludedRegions : String
myapp/src/main/web/.*\.html myapp/src/main/web/.*\.jpeg myapp/src/main/web/.*\.gifThe example above illustrates that if only html/jpeg/gif files have been committed to the SCM a build will not occur.
perBuildTag
$class: 'PreBuildMerge'
options
mergeTarget : String
master
.
fastForwardMode
(optional)
FF
, FF_ONLY
, NO_FF
mergeRemote : String
(optional)
origin
, that contains the branch you specify below. If left blank, it'll default to the name of the first repository configured above.
mergeStrategy
(optional)
DEFAULT
, RESOLVE
, RECURSIVE
, OCTOPUS
, OURS
, SUBTREE
, RECURSIVE_THEIRS
pretestedIntegration
gitIntegrationStrategy
accumulated
shortCommitMessage : boolean
(optional)
ffonly
shortCommitMessage : boolean
(optional)
squash
integrationBranch : String
The branch name must match your integration branch name. No trailing slash.
git checkout -B <Branch name> <Repository name>/<Branch name> git merge --squash <Branch matched by git> git commit -C <Branch matched by git>
git checkout -B <Branch name> <Repository name>/<Branch name> git merge -m <commitMsg> <Branch matched by git> --no-ff
Changes are only ever pushed when the build results is SUCCESS
git push <Repository name> <Branch name>
repoName : String
The repository name. In git the repository is always the name of the remote. So if you have specified a repository name in your Git configuration. You need to specify the exact same name here, otherwise no integration will be performed. We do the merge based on this.
No trailing slash on repository name.
Remember to specify this when working with NAMED repositories in Git
pruneStaleBranch
pruneTags
pruneTags : boolean
$class: 'RelativeTargetDirectory'
relativeTargetDir : String
This extension should not be used in Jenkins Pipeline (either declarative or scripted). Jenkins Pipeline already provides standard techniques for checkout to a subdirectory. Use ws and dir in Jenkins Pipeline rather than this extension.
$class: 'ScmName'
Unique name for this SCM. Needed when using Git within the Multi SCM plugin.
name : String
sparseCheckout
Specify the paths that you'd like to sparse checkout. This may be used for saving space (Think about a reference repository). Be sure to use a recent version of Git, at least above 1.7.10
sparseCheckoutPaths
path : String
submodule
depth : int
(optional)
disableSubmodules : boolean
(optional)
parentCredentials : boolean
(optional)
recursiveSubmodules : boolean
(optional)
reference : String
(optional)
git init --bare git remote add SubProject1 https://gitrepo.com/subproject1 git remote add SubProject2 https://gitrepo.com/subproject2 git fetch --all
shallow : boolean
(optional)
threads : int
(optional)
timeout : int
(optional)
trackingSubmodules : boolean
(optional)
$class: 'UserExclusion'
excludedUsers : String
auto_build_userThe example above illustrates that if only revisions by "auto_build_user" have been committed to the SCM a build will not occur.
$class: 'UserIdentity'
name : String
If given, "GIT_COMMITTER_NAME=[this]" and "GIT_AUTHOR_NAME=[this]" are set for builds. This overrides whatever is in the global settings.
email : String
If given, "GIT_COMMITTER_EMAIL=[this]" and "GIT_AUTHOR_EMAIL=[this]" are set for builds. This overrides whatever is in the global settings.
$class: 'WipeWorkspace'
gitTool : String
projectName : String
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.
repositoryName : String
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.
serverId : String
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.
mirrorName : String
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.
$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: 'CVSSCM'
$class: 'ClearCaseSCM'
branch : String
label : String
extractConfigSpec : boolean
configSpecFileName : String
refreshConfigSpec : boolean
refreshConfigSpecCommand : String
configSpec : String
viewTag : String
useupdate : boolean
extractLoadRules : boolean
loadRules : String
useOtherLoadRulesForPolling : boolean
loadRulesForPolling : String
usedynamicview : boolean
viewdrive : String
mkviewoptionalparam : String
filterOutDestroySubBranchEvent : boolean
doNotUpdateConfigSpec : boolean
rmviewonrename : boolean
excludedRegions : String
multiSitePollBuffer : String
useTimeRule : boolean
createDynView : boolean
viewPath : String
changeset
ALL
, BRANCH
, NONE
, UPDT
viewStorage
Three strategies are currently available to manage view storage location.
$class: 'DefaultViewStorage'
$class: 'ServerViewStorage'
assignedLabelString : String
Label expression used to populate view storage location dropdown.
server : String
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.
$class: 'SpecificViewStorage'
winStorageDir : String
unixStorageDir : String
$class: 'ClearCaseUcmBaselineSCM'
$class: 'ClearCaseUcmSCM'
stream : String
loadrules : String
viewTag : String
usedynamicview : boolean
viewdrive : String
mkviewoptionalparam : String
filterOutDestroySubBranchEvent : boolean
useUpdate : boolean
rmviewonrename : boolean
excludedRegions : String
multiSitePollBuffer : String
overrideBranchName : String
createDynView : boolean
freezeCode : boolean
recreateView : boolean
allocateViewName : boolean
viewPath : String
useManualLoadRules : boolean
changeset
ALL
, BRANCH
, NONE
, UPDT
viewStorage
Three strategies are currently available to manage view storage location.
$class: 'DefaultViewStorage'
$class: 'ServerViewStorage'
assignedLabelString : String
Label expression used to populate view storage location dropdown.
server : String
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.
$class: 'SpecificViewStorage'
winStorageDir : String
unixStorageDir : String
buildFoundationBaseline : boolean
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.
$class: 'CloneWorkspaceSCM'
parentJobName : String
criteria : String
$class: 'CmvcSCM'
family : String
become : String
releases : String
checkoutScript : String
trackViewReportWhereClause : String
$class: 'CvsProjectset'
$class: 'DarcsScm'
source : String
localDir : String
clean : boolean
browser
$class: 'DarcsWeb'
url : String
repo : String
$class: 'Darcsden'
url : String
$class: 'DimensionsSCM'
project : String
credentialsType : String
userName : String
password : String
pluginServer : String
userServer : String
keystoreServer : String
pluginDatabase : String
userDatabase : String
keystoreDatabase : String
keystorePath : String
certificateAlias : String
credentialsId : String
certificatePassword : String
keystorePassword : String
certificatePath : String
remoteCertificatePassword : String
secureAgentAuth : boolean
canJobDelete : boolean
(optional)
canJobExpand : boolean
(optional)
canJobForce : boolean
(optional)
canJobNoMetadata : boolean
(optional)
canJobNoTouch : boolean
(optional)
canJobRevert : boolean
(optional)
canJobUpdate : boolean
(optional)
eol : String
(optional)
folders
(optional)
value : String
pathsToExclude
(optional)
value : String
permissions : String
(optional)
timeZone : String
(optional)
webUrl : String
(optional)
$class: 'DrushMakefileSCM'
makefile : String
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
root : String
$class: 'EndevorConfiguration'
connectionId : String
filterPattern : String
fileExtension : String
credentialsId : String
targetFolder : String
filesystem
path : String
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)
clearWorkspace : boolean
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.
copyHidden : boolean
If true, the system will copy hidden files and folders as well. Default is false.
filterSettings
includeFilter : boolean
selectors
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.
wildcard : String
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 (/)
$class: 'FeatureBranchAwareMercurialSCM'
installation : String
source : String
branch : String
modules : String
subdir : String
my/sources
(use forward slashes). If changing this entry, you probably want to clean the workspace first.
browser
$class: 'FishEye'
url : String
$class: 'GoogleCode'
url : String
$class: 'HgWeb'
url : String
$class: 'Kallithea'
url : String
$class: 'KilnHG'
url : String
$class: 'RhodeCode'
url : String
$class: 'RhodeCodeLegacy'
url : String
$class: 'ScmManager'
url : String
http://YOURSCMMANAGER/scm/repo/NAMESPACE/NAME/
).
clean : boolean
branchPattern : String
$class: 'GeneXusServerSCM'
gxInstallationId : String
GeneXus installation to use when creating (or updating) a local copy of a Knowledge Base from a GeneXus Server.
Select "(Custom)" if you want to specify a custom GeneXus path for this project (see Advanced Options).
The options that appear here are those you may configure in Jenkins "Global Tool Configuration" for GeneXus.
gxCustomPath : String
Custom path to a GeneXus installation to use when creating (or updating) a local copy of Knowledge Base from a GeneXus Server. This custom path is used when the "Custom" option is selected for the GeneXus Installation
msbuildCustomPath : String
Custom path to the MSBuild installation to use when creating (or updating) a local copy of Knowledge Base from a GeneXus Server.
serverURL : String
credentialsId : String
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.
kbName : String
kbVersion : String
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.
localKbPath : String
Path to the local Knowledge Base to use as working copy.
If you leave it blank the default ${WORKSPACE}\KBname
will apply.
localKbVersion : String
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.
kbDbServerInstance : String
kbDbCredentialsId : String
Credentials to use when to connecting to SQL Server.
Select "none" for Windows Authentication.
kbDbName : String
Name of the SQL Server database used for the local Knowledge Base.
Leave it blank to use the default database name.
kbDbInSameFolder : boolean
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)
.
scmGit
$class: 'HarvestSCM'
broker : String
passwordFile : String
userId : String
password : String
projectName : String
state : String
viewPath : String
clientPath : String
processName : String
recursiveSearch : String
useSynchronize : boolean
extraOptions : String
$class: 'IntegritySCM'
serverConfig : String
configPath : String
configurationName : String
CPBasedMode : boolean
(optional)
alternateWorkspace : String
(optional)
browser
(optional)
$class: 'IntegrityWebUI'
url : String
checkoutThreadPoolSize : int
(optional)
checkoutThreadTimeout : int
(optional)
checkpointBeforeBuild : boolean
(optional)
checkpointLabel : String
(optional)
cleanCopy : boolean
(optional)
deleteNonMembers : boolean
(optional)
excludeList : String
(optional)
fetchChangedWorkspaceFiles : boolean
(optional)
includeList : String
(optional)
lineTerminator : String
(optional)
localClient : boolean
(optional)
password : String
(optional)
restoreTimestamp : boolean
(optional)
sandboxScope : String
(optional)
skipAuthorInfo : boolean
(optional)
userName : String
(optional)
$class: 'IspwConfiguration'
connectionId : String
credentialsId : String
serverConfig : String
serverStream : String
serverApplication : String
serverSubAppl : String
serverLevel : String
levelOption : String
componentType : String
folderName : String
ispwDownloadAll : boolean
targetFolder : String
ispwDownloadIncl : boolean
ispwDownloadWithCompileOnly : boolean
$class: 'IspwContainerConfiguration'
connectionId : String
credentialsId : String
serverConfig : String
containerName : String
containerType : String
serverLevel : String
componentType : String
ispwDownloadAll : boolean
targetFolder : String
ispwDownloadIncl : boolean
$class: 'MercurialSCM'
$class: 'MergebotScm'
cleanup
MINIMAL
, STANDARD
, FULL
, DELETE
workingMode
NONE
, UP
, LDAP
credentialsId : String
specAttributeName : String
$class: 'MultiSCM'
none
$class: 'OpenShiftImageStreams'
imageStreamName : String
tag : String
apiURL : String
namespace : String
authToken : String
verbose : String
$class: 'PdsConfiguration'
connectionId : String
filterPattern : String
fileExtension : String
credentialsId : String
targetFolder : String
perforce
credential : String
Select the appropriate credential for the Perforce connection. Perforce Credentials are defined in the Jenkins Credentials plugin here.
There are two types:
workspace
Select the appropriate Perforce workspace behaviour from the list. Not all modes will suit all Jenkins Job build types.
There are five types:
manualSpec
charset : String
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.
pinHost : boolean
name : String
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.
spec
allwrite : boolean
clobber : boolean
compress : boolean
locked : boolean
modtime : boolean
rmdir : boolean
streamName : String
line : String
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.
view : String
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).
changeView : String
type : String
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.
serverID : String
backup : boolean
Client's participation in backup enable/disable. If not specified backup of a writable client defaults to enabled.
streamAtChange : String
(optional)
When specified, the client view is generated from the stream specification version at or before the change number.
cleanup : boolean
syncID : String
(optional)
specFileSpec
charset : String
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.
pinHost : boolean
name : String
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.
specPath : String
syncID : String
(optional)
staticSpec
charset : String
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.
pinHost : boolean
name : String
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
syncID : String
(optional)
streamSpec
charset : String
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.
pinHost : boolean
streamName : String
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-streamformat : String
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
streamAtChange : String
(optional)
When specified, the client view is generated from the stream specification version at or before the change number.
syncID : String
(optional)
templateSpec
charset : String
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.
pinHost : boolean
templateName : String
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
format : String
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
syncID : String
(optional)
filter
latest
latestChange : boolean
latestWithPin
latestWithPin : boolean
When enabled, in case of a pinned checkout, polling ignores the pin or the label specified in the checkout step and polls till the latest change.
pathFilter
path : String
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.
viewPattern
patternText : String
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
caseSensitive : boolean
incremental
perChange : boolean
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.
userFilter
user : String
Changes can be filtered to not trigger a build; if the owner of a change matches the specified name, the build is filtered.
viewFilter
viewMask : String
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
populate
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:
autoClean
replace : boolean
Perforce will check out and overwrite any depot files which are either missing from workspace, or have been modified locally.
delete : boolean
Perforce will delete any local files that are not in the depot.
tidy : boolean
modtime : boolean
quiet : boolean
Enables the -q flag for all applicable Perforce operations. Summary details will still be displayed.
pin : String
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).
parallel
enable : boolean
path : String
threads : String
minfiles : String
minbytes : String
previewOnly
quiet : boolean
Enables the -q flag for all applicable Perforce operations. Summary details will still be displayed.
pin : String
flushOnly
quiet : boolean
pin : String
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).
forceClean
have : boolean
quiet : boolean
Enables the -q flag for all applicable Perforce operations. Summary details will still be displayed.
pin : String
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).
parallel
enable : boolean
path : String
threads : String
minfiles : String
minbytes : String
graphClean
quiet : boolean
Enables the -q flag for all applicable Perforce operations. Summary details will still be displayed.
pin : String
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).
parallel
enable : boolean
path : String
threads : String
minfiles : String
minbytes : String
syncOnly
revert : boolean
have : boolean
force : boolean
modtime : boolean
quiet : boolean
Enables the -q flag for all applicable Perforce operations. Summary details will still be displayed.
pin : String
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).
parallel
enable : boolean
path : String
threads : String
minfiles : String
minbytes : String
browser
fishEye
url : String
rootModule : String
openGrok
url : String
depotPath : String
projectName : String
p4Web
url : String
swarm
url : String
$class: 'PlasticSCM'
selector : String
cleanup
MINIMAL
, STANDARD
, FULL
, DELETE
workingMode
NONE
, UP
, LDAP
credentialsId : String
useMultipleWorkspaces : boolean
additionalWorkspaces
selector : String
cleanup
MINIMAL
, STANDARD
, FULL
, DELETE
directory : String
pollOnController : boolean
directory : String
$class: 'ProxySCM'
projectName : String
$class: 'PvcsScm'
projectRoot : String
archiveRoot : String
changeLogPrefixFudge : String
moduleDir : String
loginId : String
pvcsWorkspace : String
promotionGroup : String
versionLabel : String
cleanCopy : boolean
$class: 'RTCScm'
$class: 'SCLMSCM'
server : String
port : int
credentialsId : String
JESINTERFACELEVEL1 : boolean
FTPActiveMode : boolean
project : String
alternate : String
group : String
types : String
custJobStep : boolean
JobStep : String
custJobHeader : boolean
JobHeader : String
$class: 'ShellScriptSCM'
checkoutShell : String
pollingShell : String
useCheckoutForPolling : boolean
$class: 'SimpleClearCaseSCM'
loadRules : String
/vobs/structure/package/product/subproduct
/vobs/structure/package/product/anothersubproduct.
viewname : String
branch : String
filter : boolean
SpaceGit
customSpaceRepository
Provide JetBrains SpaceCode repository.
This section is optional in case Triggered by JetBrains SpaceCode is enabled for a job or pipeline. The Build trigger settings will be used for checking out source code if the JetBrains SpaceCode repository is not specified here explicitly.
repository : String
refspec : String
gitTool : String
Name of the git tool to be used for this job. Git tool names are defined in "Global Tool Configuration".
extensions
authorInChangelog
$class: 'BuildChooserSetting'
This extension point in Jenkins is used by many other plugins to control the job to build specific commits. When you activate those plugins, you may see them installing a custom strategy here.
buildChooser
$class: 'AlternativeBuildChooser'
$class: 'AncestryBuildChooser'
maximumAgeInDays : int
ancestorCommitSha1 : String
$class: 'DefaultBuildChooser'
$class: 'DeflakeGitBuildChooser'
$class: 'GerritTriggerBuildChooser'
$class: 'InverseBuildChooser'
buildSingleRevisionOnly
changelogToBranch
options
compareRemote : String
origin
, that contains the branch you specify below.
compareTarget : String
checkoutOption
timeout : int
cleanBeforeCheckout
.gitignore
. It also resets all tracked files to their versioned state. This ensures that the workspace is in the same state as if you cloned and checked out in a brand-new empty directory, and ensures that your build is not affected by the files generated by the previous build.
deleteUntrackedNestedRepositories : boolean
(optional)
.git
directories.
cleanAfterCheckout
.gitignore
. It also resets all tracked files to their versioned state. This ensures that the workspace is in the same state as if you cloned and checked out in a brand-new empty directory, and ensures that your build is not affected by the files generated by the previous build.
deleteUntrackedNestedRepositories : boolean
(optional)
.git
directories.
cloneOption
shallow : boolean
noTags : boolean
reference : String
timeout : int
depth : int
(optional)
honorRefspec : boolean
(optional)
$class: 'CodeCommitURLHelper'
credentialId : String
OPTIONAL: Select the credentials to use.
If not specified, defaults to the DefaultAWSCredentialsProviderChain behaviour - *FROM THE JENKINS INSTANCE*
In the latter case, usage of IAM Role Profiles seems not to work, thus relying on environment variables / system properties or the ~/.aws/credentials file, thus not recommended.
repositoryName : String
$class: 'DisableRemotePoll'
$class: 'ExcludeFromChangeSet'
$class: 'ExcludeFromPoll'
firstBuildChangelog
makeChangelog : boolean
(optional)
lfs
$class: 'GitSCMChecksExtension'
verboseConsoleLog : boolean
(optional)
$class: 'GitSCMStatusChecksExtension'
name : String
(optional)
skip : boolean
(optional)
skipProgressUpdates : boolean
(optional)
suppressLogs : boolean
(optional)
unstableBuildNeutral : boolean
(optional)
$class: 'GitTagMessageExtension'
useMostRecentTag : boolean
(optional)
$class: 'IgnoreNotifyCommit'
localBranch
If selected, and its value is an empty string or "**", then the branch name is computed from the remote branch without the origin. In that case, a remote branch origin/master will be checked out to a local branch named master, and a remote branch origin/develop/new-feature will be checked out to a local branch named develop/newfeature.
Please note that this has not been tested with submodules.
localBranch : String
$class: 'MessageExclusion'
excludedMessage : String
.*\[maven-release-plugin\].*The example above illustrates that if only revisions with "[maven-release-plugin]" message in first comment line have been committed to the SCM a build will not occur. You can create more complex patterns using embedded flag expressions.
(?s).*FOO.*This example will search FOO message in all comment lines.
$class: 'PathRestriction'
includedRegions : String
myapp/src/main/web/.*\.html myapp/src/main/web/.*\.jpeg myapp/src/main/web/.*\.gifThe example above illustrates that a build will only occur, if html/jpeg/gif files have been committed to the SCM. Exclusions take precedence over inclusions, if there is an overlap between included and excluded regions.
excludedRegions : String
myapp/src/main/web/.*\.html myapp/src/main/web/.*\.jpeg myapp/src/main/web/.*\.gifThe example above illustrates that if only html/jpeg/gif files have been committed to the SCM a build will not occur.
perBuildTag
$class: 'PreBuildMerge'
options
mergeTarget : String
master
.
fastForwardMode
(optional)
FF
, FF_ONLY
, NO_FF
mergeRemote : String
(optional)
origin
, that contains the branch you specify below. If left blank, it'll default to the name of the first repository configured above.
mergeStrategy
(optional)
DEFAULT
, RESOLVE
, RECURSIVE
, OCTOPUS
, OURS
, SUBTREE
, RECURSIVE_THEIRS
pretestedIntegration
gitIntegrationStrategy
accumulated
shortCommitMessage : boolean
(optional)
ffonly
shortCommitMessage : boolean
(optional)
squash
integrationBranch : String
The branch name must match your integration branch name. No trailing slash.
git checkout -B <Branch name> <Repository name>/<Branch name> git merge --squash <Branch matched by git> git commit -C <Branch matched by git>
git checkout -B <Branch name> <Repository name>/<Branch name> git merge -m <commitMsg> <Branch matched by git> --no-ff
Changes are only ever pushed when the build results is SUCCESS
git push <Repository name> <Branch name>
repoName : String
The repository name. In git the repository is always the name of the remote. So if you have specified a repository name in your Git configuration. You need to specify the exact same name here, otherwise no integration will be performed. We do the merge based on this.
No trailing slash on repository name.
Remember to specify this when working with NAMED repositories in Git
pruneStaleBranch
pruneTags
pruneTags : boolean
$class: 'RelativeTargetDirectory'
relativeTargetDir : String
This extension should not be used in Jenkins Pipeline (either declarative or scripted). Jenkins Pipeline already provides standard techniques for checkout to a subdirectory. Use ws and dir in Jenkins Pipeline rather than this extension.
$class: 'ScmName'
Unique name for this SCM. Needed when using Git within the Multi SCM plugin.
name : String
sparseCheckout
Specify the paths that you'd like to sparse checkout. This may be used for saving space (Think about a reference repository). Be sure to use a recent version of Git, at least above 1.7.10
sparseCheckoutPaths
path : String
submodule
depth : int
(optional)
disableSubmodules : boolean
(optional)
parentCredentials : boolean
(optional)
recursiveSubmodules : boolean
(optional)
reference : String
(optional)
git init --bare git remote add SubProject1 https://gitrepo.com/subproject1 git remote add SubProject2 https://gitrepo.com/subproject2 git fetch --all
shallow : boolean
(optional)
threads : int
(optional)
timeout : int
(optional)
trackingSubmodules : boolean
(optional)
$class: 'UserExclusion'
excludedUsers : String
auto_build_userThe example above illustrates that if only revisions by "auto_build_user" have been committed to the SCM a build will not occur.
$class: 'UserIdentity'
name : String
If given, "GIT_COMMITTER_NAME=[this]" and "GIT_AUTHOR_NAME=[this]" are set for builds. This overrides whatever is in the global settings.
email : String
If given, "GIT_COMMITTER_EMAIL=[this]" and "GIT_AUTHOR_EMAIL=[this]" are set for builds. This overrides whatever is in the global settings.
$class: 'WipeWorkspace'
postBuildStatusToSpace : boolean
(optional)
If checked, Jenkins will automatically report the build to JetBrains SpaceCode. Adding any steps to the job or workflow definition will not be required.
The build will be reported as running upon its start and as succeeded or failed upon its completion.
Git commit and branch name for reporting will be taken from the GIT_COMMIT and GIT_BRANCH environment variables. These environment variables are provided by the standard Jenkins Git plugin when source code is checked out from a git repository.
$class: 'StoreSCM'
scriptName : String
repositoryName : String
pundles
pundleType
PACKAGE
, BUNDLE
name : String
versionRegex : String
minimumBlessingLevel : String
generateParcelBuilderInputFile : boolean
parcelBuilderInputFilename : String
$class: 'SubversionSCM'
$class: 'SurroundSCM'
server : String
serverPort : String
branch : String
repository : String
credentialsId : String
rsaKey
(optional)
rsaKeyFileId : String
(optional)
rsaKeyFilePath : String
(optional)
rsaKeyType
(optional)
NoKey
, Path
, ID
rsaKeyValue : String
(optional)
rsaKeyFileId : String
(optional)
rsaKeyFilePath : String
(optional)
rsaKeyPath : String
(optional)
$class: 'SynergySCM'
project : String
database : String
release : String
purpose : String
username : String
password : String
engine : String
oldProject : String
baseline : String
oldBaseline : String
ccmHome : String
remoteClient : boolean
detectConflict : boolean
replaceSubprojects : boolean
checkForUpdateWarnings : boolean
leaveSessionOpen : boolean
maintainWorkarea : boolean
checkTaskModifiedObjects : boolean
$class: 'VaultSCM'
serverName : String
path : String
userName : String
password : String
repositoryName : String
vaultName : String
sslEnabled : boolean
useNonWorkingFolder : boolean
merge : String
fileTime : String
makeWritableEnabled : boolean
verboseEnabled : boolean
$class: 'hudson.plugins.gradle_repo.RepoScm'
repositoryUrl : String
branch : String
$class: 'hudson.plugins.repo.RepoScm'
clone : boolean
(optional)
libraryPath : String
(optional)
modernSCM
scm
$class: 'BacklogPullRequestSCMSource'
multiBranch
dagshubScmSource
gerrit
remote : String
apiKey
(optional)
class hudson.util.Secret
browser
(optional)
assembla
repoUrl : String
$class: 'BacklogGitRepositoryBrowser'
repoName : String
repoUrl : String
bitbucketServer
repoUrl : String
bitbucket
repoUrl : String
cgit
repoUrl : String
fisheye
repoUrl : String
gitblit
repoUrl : String
projectName : String
$class: 'GitBucketBrowser'
url : String
gitLab
repoUrl : String
version : String
(optional)
gitLabBrowser
https://gitLab.example.com
then the URL for bob's skunkworks project might be https://gitLab.example.com/bob/skunkworks
.
projectUrl : String
https://gitLab.example.com
then the URL for bob's skunkworks project might be https://gitLab.example.com/bob/skunkworks
gitList
repoUrl : String
gitWeb
repoUrl : String
$class: 'GiteaBrowser'
repoUrl : String
https://gitea.example.com
then the URL for bob's skunkworks project repository might be https://gitea.example.com/bob/skunkworks
github
repoUrl : String
gitiles
repoUrl : String
$class: 'GitoriousWeb'
repoUrl : String
gogs
repoUrl : String
kiln
repoUrl : String
phabricator
repoUrl : String
repo : String
redmine
repoUrl : String
rhodeCode
repoUrl : String
$class: 'ScmManagerGitRepositoryBrowser'
repoUrl : String
jbSpace
repoUrl : String
$class: 'Stash'
repoUrl : String
$class: 'TracGitRepositoryBrowser'
$class: 'TuleapBrowser'
repositoryUrl : String
viewgit
repoUrl : String
projectName : String
credentialsId : String
(optional)
extensions
(optional)
authorInChangelog
$class: 'BuildChooserSetting'
This extension point in Jenkins is used by many other plugins to control the job to build specific commits. When you activate those plugins, you may see them installing a custom strategy here.
buildChooser
$class: 'AlternativeBuildChooser'
$class: 'AncestryBuildChooser'
maximumAgeInDays : int
ancestorCommitSha1 : String
$class: 'DefaultBuildChooser'
$class: 'DeflakeGitBuildChooser'
$class: 'GerritTriggerBuildChooser'
$class: 'InverseBuildChooser'
buildSingleRevisionOnly
changelogToBranch
options
compareRemote : String
origin
, that contains the branch you specify below.
compareTarget : String
checkoutOption
timeout : int
cleanBeforeCheckout
.gitignore
. It also resets all tracked files to their versioned state. This ensures that the workspace is in the same state as if you cloned and checked out in a brand-new empty directory, and ensures that your build is not affected by the files generated by the previous build.
deleteUntrackedNestedRepositories : boolean
(optional)
.git
directories.
cleanAfterCheckout
.gitignore
. It also resets all tracked files to their versioned state. This ensures that the workspace is in the same state as if you cloned and checked out in a brand-new empty directory, and ensures that your build is not affected by the files generated by the previous build.
deleteUntrackedNestedRepositories : boolean
(optional)
.git
directories.
cloneOption
shallow : boolean
noTags : boolean
reference : String
timeout : int
depth : int
(optional)
honorRefspec : boolean
(optional)
$class: 'CodeCommitURLHelper'
credentialId : String
OPTIONAL: Select the credentials to use.
If not specified, defaults to the DefaultAWSCredentialsProviderChain behaviour - *FROM THE JENKINS INSTANCE*
In the latter case, usage of IAM Role Profiles seems not to work, thus relying on environment variables / system properties or the ~/.aws/credentials file, thus not recommended.
repositoryName : String
$class: 'DisableRemotePoll'
$class: 'ExcludeFromChangeSet'
$class: 'ExcludeFromPoll'
firstBuildChangelog
makeChangelog : boolean
(optional)
lfs
$class: 'GitSCMChecksExtension'
verboseConsoleLog : boolean
(optional)
$class: 'GitSCMStatusChecksExtension'
name : String
(optional)
skip : boolean
(optional)
skipProgressUpdates : boolean
(optional)
suppressLogs : boolean
(optional)
unstableBuildNeutral : boolean
(optional)
$class: 'GitTagMessageExtension'
useMostRecentTag : boolean
(optional)
$class: 'IgnoreNotifyCommit'
localBranch
If selected, and its value is an empty string or "**", then the branch name is computed from the remote branch without the origin. In that case, a remote branch origin/master will be checked out to a local branch named master, and a remote branch origin/develop/new-feature will be checked out to a local branch named develop/newfeature.
Please note that this has not been tested with submodules.
localBranch : String
$class: 'MessageExclusion'
excludedMessage : String
.*\[maven-release-plugin\].*The example above illustrates that if only revisions with "[maven-release-plugin]" message in first comment line have been committed to the SCM a build will not occur. You can create more complex patterns using embedded flag expressions.
(?s).*FOO.*This example will search FOO message in all comment lines.
$class: 'PathRestriction'
includedRegions : String
myapp/src/main/web/.*\.html myapp/src/main/web/.*\.jpeg myapp/src/main/web/.*\.gifThe example above illustrates that a build will only occur, if html/jpeg/gif files have been committed to the SCM. Exclusions take precedence over inclusions, if there is an overlap between included and excluded regions.
excludedRegions : String
myapp/src/main/web/.*\.html myapp/src/main/web/.*\.jpeg myapp/src/main/web/.*\.gifThe example above illustrates that if only html/jpeg/gif files have been committed to the SCM a build will not occur.
perBuildTag
$class: 'PreBuildMerge'
options
mergeTarget : String
master
.
fastForwardMode
(optional)
FF
, FF_ONLY
, NO_FF
mergeRemote : String
(optional)
origin
, that contains the branch you specify below. If left blank, it'll default to the name of the first repository configured above.
mergeStrategy
(optional)
DEFAULT
, RESOLVE
, RECURSIVE
, OCTOPUS
, OURS
, SUBTREE
, RECURSIVE_THEIRS
pretestedIntegration
gitIntegrationStrategy
accumulated
shortCommitMessage : boolean
(optional)
ffonly
shortCommitMessage : boolean
(optional)
squash
integrationBranch : String
The branch name must match your integration branch name. No trailing slash.
git checkout -B <Branch name> <Repository name>/<Branch name> git merge --squash <Branch matched by git> git commit -C <Branch matched by git>
git checkout -B <Branch name> <Repository name>/<Branch name> git merge -m <commitMsg> <Branch matched by git> --no-ff
Changes are only ever pushed when the build results is SUCCESS
git push <Repository name> <Branch name>
repoName : String
The repository name. In git the repository is always the name of the remote. So if you have specified a repository name in your Git configuration. You need to specify the exact same name here, otherwise no integration will be performed. We do the merge based on this.
No trailing slash on repository name.
Remember to specify this when working with NAMED repositories in Git
pruneStaleBranch
pruneTags
pruneTags : boolean
$class: 'RelativeTargetDirectory'
relativeTargetDir : String
This extension should not be used in Jenkins Pipeline (either declarative or scripted). Jenkins Pipeline already provides standard techniques for checkout to a subdirectory. Use ws and dir in Jenkins Pipeline rather than this extension.
$class: 'ScmName'
Unique name for this SCM. Needed when using Git within the Multi SCM plugin.
name : String
sparseCheckout
Specify the paths that you'd like to sparse checkout. This may be used for saving space (Think about a reference repository). Be sure to use a recent version of Git, at least above 1.7.10
sparseCheckoutPaths
path : String
submodule
depth : int
(optional)
disableSubmodules : boolean
(optional)
parentCredentials : boolean
(optional)
recursiveSubmodules : boolean
(optional)
reference : String
(optional)
git init --bare git remote add SubProject1 https://gitrepo.com/subproject1 git remote add SubProject2 https://gitrepo.com/subproject2 git fetch --all
shallow : boolean
(optional)
threads : int
(optional)
timeout : int
(optional)
trackingSubmodules : boolean
(optional)
$class: 'UserExclusion'
excludedUsers : String
auto_build_userThe example above illustrates that if only revisions by "auto_build_user" have been committed to the SCM a build will not occur.
$class: 'UserIdentity'
name : String
If given, "GIT_COMMITTER_NAME=[this]" and "GIT_AUTHOR_NAME=[this]" are set for builds. This overrides whatever is in the global settings.
email : String
If given, "GIT_COMMITTER_EMAIL=[this]" and "GIT_AUTHOR_EMAIL=[this]" are set for builds. This overrides whatever is in the global settings.
$class: 'WipeWorkspace'
gitTool : String
(optional)
id : String
(optional)
insecureHttps : boolean
(optional)
traits
(optional)
$class: 'ApprovedPullRequestTrait'
strategyId : int
authorInChangelog
bitbucketAgedRefsTrait
retentionDays : String
bitbucketBranchCommitSkipTrait
$class: 'BitbucketBranchDiscoveryTrait'
bitbucketBuildStatusNotifications
disableNotificationForNotBuildJobs : boolean
(optional)
sendSuccessNotificationForUnstableBuild : boolean
(optional)
bitbucketCommitSkipTrait
$class: 'BitbucketGitBrowserSCMSourceTrait'
browser
assembla
repoUrl : String
$class: 'BacklogGitRepositoryBrowser'
repoName : String
repoUrl : String
bitbucketServer
repoUrl : String
bitbucket
repoUrl : String
cgit
repoUrl : String
fisheye
repoUrl : String
gitblit
repoUrl : String
projectName : String
$class: 'GitBucketBrowser'
url : String
gitLab
repoUrl : String
version : String
(optional)
gitLabBrowser
https://gitLab.example.com
then the URL for bob's skunkworks project might be https://gitLab.example.com/bob/skunkworks
.
projectUrl : String
https://gitLab.example.com
then the URL for bob's skunkworks project might be https://gitLab.example.com/bob/skunkworks
gitList
repoUrl : String
gitWeb
repoUrl : String
$class: 'GiteaBrowser'
repoUrl : String
https://gitea.example.com
then the URL for bob's skunkworks project repository might be https://gitea.example.com/bob/skunkworks
github
repoUrl : String
gitiles
repoUrl : String
$class: 'GitoriousWeb'
repoUrl : String
gogs
repoUrl : String
kiln
repoUrl : String
phabricator
repoUrl : String
repo : String
redmine
repoUrl : String
rhodeCode
repoUrl : String
$class: 'ScmManagerGitRepositoryBrowser'
repoUrl : String
jbSpace
repoUrl : String
$class: 'Stash'
repoUrl : String
$class: 'TracGitRepositoryBrowser'
$class: 'TuleapBrowser'
repositoryUrl : String
viewgit
repoUrl : String
projectName : String
$class: 'BitbucketJiraValidatorTrait'
jiraServerIdx : int
$class: 'BitbucketPullRequestDiscoveryTrait'
$class: 'BitbucketTagDiscoveryTrait'
buildStatusNameCustomPart
buildStatusNameCustomPart : String
(optional)
buildStatusNameOverwrite : boolean
(optional)
ignoreTypeInStatusName : boolean
(optional)
$class: 'ChangeDiscoveryTrait'
queryString : String
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
checkoutOption
extension
timeout : int
cleanAfterCheckout
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.
deleteUntrackedNestedRepositories : boolean
(optional)
.git
directories.
cleanBeforeCheckout
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.
deleteUntrackedNestedRepositories : boolean
(optional)
.git
directories.
$class: 'CleanMercurialSCMSourceTrait'
cloneOption
extension
shallow : boolean
noTags : boolean
reference : String
timeout : int
depth : int
(optional)
honorRefspec : boolean
(optional)
$class: 'DisableStatusUpdateTrait'
discoverOtherRefs
ref : String
The pattern under /refs on the remote repository to discover, can contain a wildcard.
Example: test/*/merged
nameMapping : String
(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}".
$class: 'FilterChecksTrait'
queryOperator
ID
, SCHEME
queryString : String
firstBuildChangelog
extension
makeChangelog : boolean
(optional)
gitLabForkDiscovery
strategyId : int
trust
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>
buildMRForksNotMirror : boolean
(optional)
browser
browser
assembla
repoUrl : String
$class: 'BacklogGitRepositoryBrowser'
repoName : String
repoUrl : String
bitbucketServer
repoUrl : String
bitbucket
repoUrl : String
cgit
repoUrl : String
fisheye
repoUrl : String
gitblit
repoUrl : String
projectName : String
$class: 'GitBucketBrowser'
url : String
gitLab
repoUrl : String
version : String
(optional)
gitLabBrowser
https://gitLab.example.com
then the URL for bob's skunkworks project might be https://gitLab.example.com/bob/skunkworks
.
projectUrl : String
https://gitLab.example.com
then the URL for bob's skunkworks project might be https://gitLab.example.com/bob/skunkworks
gitList
repoUrl : String
gitWeb
repoUrl : String
$class: 'GiteaBrowser'
repoUrl : String
https://gitea.example.com
then the URL for bob's skunkworks project repository might be https://gitea.example.com/bob/skunkworks
github
repoUrl : String
gitiles
repoUrl : String
$class: 'GitoriousWeb'
repoUrl : String
gogs
repoUrl : String
kiln
repoUrl : String
phabricator
repoUrl : String
repo : String
redmine
repoUrl : String
rhodeCode
repoUrl : String
$class: 'ScmManagerGitRepositoryBrowser'
repoUrl : String
jbSpace
repoUrl : String
$class: 'Stash'
repoUrl : String
$class: 'TracGitRepositoryBrowser'
$class: 'TuleapBrowser'
repositoryUrl : String
viewgit
repoUrl : String
projectName : String
gitHubAgedRefsTrait
retentionDays : String
gitHubBranchCommitSkipTrait
gitHubCommitSkipTrait
$class: 'GitHubJiraValidatorTrait'
jiraServerIdx : int
gitHubSourceChecks
verboseConsoleLog : boolean
(optional)
gitHubStatusChecks
name : String
(optional)
skip : boolean
(optional)
skipNotifications : boolean
(optional)
skipProgressUpdates : boolean
(optional)
suppressLogs : boolean
(optional)
unstableBuildNeutral : boolean
(optional)
lfs
gitlabAvatar
disableProjectAvatar : boolean
(optional)
gitlabMarkUnstableAsSuccess
markUnstableAsSuccess : boolean
(optional)
gitlabSkipNotifications
gitTool
gitTool : String
gitLabHookRegistration
webHookMode : String
systemHookMode : String
gitHubIgnoreDraftPullRequestFilter
ignoreOnPush
jervisFilter
This 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:
- main
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 create an allow list of branches (only) or a block list of branches (except) to be built.
# block branches from building
branches:
except:
- legacy
- experimental
# allow only these branches
branches:
only:
- main
- stable
The same YAML can be applied to tags.
# block tags from building
tags:
except:
- .*-rc
- .*-beta
# allow only these tags
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 an allow list in your main branch, then it will not propagate to other branches.
You can use regular expressions to allow or block branches:
branches:
only:
- main
- /^[.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 : String
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.
localBranch
logComment
logSuccess : boolean
(optional)
sudoUser : String
(optional)
$class: 'MercurialBrowserSCMSourceTrait'
browser
$class: 'FishEye'
url : String
$class: 'GoogleCode'
url : String
$class: 'HgWeb'
url : String
$class: 'Kallithea'
url : String
$class: 'KilnHG'
url : String
$class: 'RhodeCode'
url : String
$class: 'RhodeCodeLegacy'
url : String
$class: 'ScmManager'
url : String
http://YOURSCMMANAGER/scm/repo/NAMESPACE/NAME/
).
$class: 'MercurialInstallationSCMSourceTrait'
installation : String
multiBranchProjectDisplayNaming
displayNamingStrategy
Job display name with fallback to name:
Uses the branch source plugin's display name for the PR instead of the raw name
Value for configuration-as-code: OBJECT_DISPLAY_NAME
Name and, if available, display name:
Joins the raw name and the branch source plugin's display name
Value for configuration-as-code: RAW_AND_OBJECT_DISPLAY_NAME
OBJECT_DISPLAY_NAME
, RAW_AND_OBJECT_DISPLAY_NAME
gitHubNotificationContextTrait
contextLabel : String
typeSuffix : boolean
Appends the relevant suffix to the context label(s) based on the build type. '/pr-merge', '/pr-head' or '/branch'
multipleStatusDelimiter : String
(optional)
multipleStatuses : boolean
(optional)
gitLabOriginDiscovery
strategyId : int
$class: 'PathBasedPullRequestFilterTrait'
inclusionField : String
exclusionField : String
$class: 'PreBuildMergeTrait'
extension
options
mergeTarget : String
master
.
fastForwardMode
(optional)
FF
, FF_ONLY
, NO_FF
mergeRemote : String
(optional)
origin
, that contains the branch you specify below. If left blank, it'll default to the name of the first repository configured above.
mergeStrategy
(optional)
DEFAULT
, RESOLVE
, RECURSIVE
, OCTOPUS
, OURS
, SUBTREE
, RECURSIVE_THEIRS
$class: 'PretestedIntegrationSCMTrait'
extension
gitIntegrationStrategy
accumulated
shortCommitMessage : boolean
(optional)
ffonly
shortCommitMessage : boolean
(optional)
squash
integrationBranch : String
The branch name must match your integration branch name. No trailing slash.
git checkout -B <Branch name> <Repository name>/<Branch name> git merge --squash <Branch matched by git> git commit -C <Branch matched by git>
git checkout -B <Branch name> <Repository name>/<Branch name> git merge -m <commitMsg> <Branch matched by git> --no-ff
Changes are only ever pushed when the build results is SUCCESS
git push <Repository name> <Branch name>
repoName : String
The repository name. In git the repository is always the name of the remote. So if you have specified a repository name in your Git configuration. You need to specify the exact same name here, otherwise no integration will be performed. We do the merge based on this.
No trailing slash on repository name.
Remember to specify this when working with NAMED repositories in Git
pruneStaleBranch
pruneStaleTag
bitbucketPublicRepoPullRequestFilter
$class: 'PullRequestDiscoveryTrait'
excludeBranchesWithPRs : boolean
$class: 'PullRequestLabelsBlackListFilterTrait'
labels : String
$class: 'PullRequestLabelsMatchAllFilterTrait'
labels : String
$class: 'PullRequestLabelsMatchAnyFilterTrait'
labels : String
$class: 'PullRequestNameFilterTrait'
strategyId : int
phrase : String
ignoreCase : boolean
regex : boolean
$class: 'PullRequestSourceBranchFilterTrait'
strategyId : int
phrase : String
ignoreCase : boolean
regex : boolean
$class: 'PullRequestTargetBranchFilterTrait'
strategyId : int
phrase : String
ignoreCase : boolean
regex : boolean
refSpecs
templates
value : String
@{remote}
will be replaced by the remote name (which defaults to origin
) before use.
headRegexFilterWithPRFromOrigin
regex : String
tagRegex : String
giteaReleaseDiscovery
includePreReleases : boolean
(optional)
artifactToAssetMappingEnabled : boolean
(optional)
archiveArtifacts
) will be added as assets in the release, but only if the build was successfull.
remoteName
remoteName : String
$class: 'ScmManagerBranchDiscoveryTrait'
sparseCheckoutPaths
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
sparseCheckoutPaths
path : String
submoduleOption
extension
depth : int
(optional)
disableSubmodules : boolean
(optional)
parentCredentials : boolean
(optional)
recursiveSubmodules : boolean
(optional)
reference : String
(optional)
git init --bare git remote add SubProject1 https://gitrepo.com/subproject1 git remote add SubProject2 https://gitrepo.com/subproject2 git fetch --all
shallow : boolean
(optional)
threads : int
(optional)
timeout : int
(optional)
trackingSubmodules : boolean
(optional)
mrTriggerComment
commentBody : String
onlyTrustedMembersCanTrigger : boolean
tuleapBranchDiscovery
tuleapNotifyPullRequest
tuleapForkPullRequestDiscovery
tuleapPullRequestDiscovery
userIdentity
extension
name : String
If given, "GIT_COMMITTER_NAME=[this]" and "GIT_AUTHOR_NAME=[this]" are set for builds. This overrides whatever is in the global settings.
email : String
If given, "GIT_COMMITTER_EMAIL=[this]" and "GIT_AUTHOR_EMAIL=[this]" are set for builds. This overrides whatever is in the global settings.
bitbucketWebhookConfiguration
Sets 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 : String
WebhookListenerBuildConditionsTrait
alwaysBuildMROpen : boolean
(optional)
alwaysBuildMRReOpen : boolean
(optional)
alwaysIgnoreMRApproval : boolean
(optional)
alwaysIgnoreMRApproved : boolean
(optional)
alwaysIgnoreMRUnApproval : boolean
(optional)
alwaysIgnoreMRUnApproved : boolean
(optional)
alwaysIgnoreMRWorkInProgress : boolean
(optional)
alwaysIgnoreNonCodeRelatedUpdates : boolean
(optional)
headWildcardFilterWithPRFromOrigin
includes : String
*
as a wildcard; for example: master release*
excludes : String
release
tagIncludes : String
*
as a wildcard; for example: *-1.*
to build only 1.0 tags from the maven release plugin.
tagExcludes : String
*-0.*
$class: 'WipeWorkspaceTrait'
bitbucketBranchDiscovery
strategyId : int
bitbucketForkDiscovery
strategyId : int
trust
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.
bitbucketTrustEveryone
bitbucketTrustNobody
bitbucketTrustTeam
bitbucketPullRequestDiscovery
strategyId : int
bitbucketSshCheckout
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 : String
It must be a SSH key based credential.
bitbucketTagDiscovery
bitbucketWebhookRegistration
Overrides 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.TagDiscoveryTrait'
dagshubBranchDiscovery
$class: 'io.jenkins.plugins.dagshubbranchsource.traits.ForkPullRequestDiscoveryTrait'
buildOnPullHead : boolean
(optional)
$class: 'io.jenkins.plugins.dagshubbranchsource.traits.OriginPullRequestDiscoveryTrait'
buildOnPullHead : boolean
(optional)
dagshubTagDiscovery
gitLabBranchDiscovery
strategyId : int
branchesAlwaysIncludedRegex : String
(optional)
gitLabSshCheckout
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 : String
gitLabTagDiscovery
gitBranchDiscovery
gitTagDiscovery
headRegexFilter
regex : String
headWildcardFilter
includes : String
*
as a wildcard; for example: master release*
excludes : String
release alpha-* beta-*
headRegexFilterWithPR
regex : String
tagRegex : String
headWildcardFilterWithPR
includes : String
*
as a wildcard; for example: master release*
excludes : String
release
tagIncludes : String
*
as a wildcard; for example: *-1.*
to build only 1.0 tags from the maven release plugin.
tagExcludes : String
*-0.*
giteaBranchDiscovery
strategyId : int
giteaForkDiscovery
strategyId : int
trust
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
.
gitLabTrustMembers
bitbucketTrustTeam
bitbucketTrustEveryone
bitbucketTrustNobody
gitLabTrustEveryone
gitLabTrustNobody
gitLabTrustPermissions
giteaTrustContributors
giteaTrustEveryone
giteaTrustNobody
gitHubTrustContributors
gitHubTrustEveryone
gitHubTrustNobody
gitHubTrustPermissions
giteaPullRequestDiscovery
strategyId : int
giteaSSHCheckout
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 : String
giteaTagDiscovery
giteaWebhookRegistration
Overrides 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 : String
gitHubBranchDiscovery
strategyId : int
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.
gitHubForkDiscovery
strategyId : int
trust
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.
gitHubTrustContributors
gitHubTrustEveryone
gitHubTrustNobody
gitHubTrustPermissions
gitHubPullRequestDiscovery
strategyId : int
gitHubSshCheckout
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 : String
gitHubTagDiscovery
gitblit
gitblitUri : String
checkoutCredentialsId : String
scanCredentialsId : String
remote : String
git clone
command.
includes : String
excludes : String
id : String
(optional)
browser
(optional)
assembla
repoUrl : String
$class: 'BacklogGitRepositoryBrowser'
repoName : String
repoUrl : String
bitbucketServer
repoUrl : String
bitbucket
repoUrl : String
cgit
repoUrl : String
fisheye
repoUrl : String
gitblit
repoUrl : String
projectName : String
$class: 'GitBucketBrowser'
url : String
gitLab
repoUrl : String
version : String
(optional)
gitLabBrowser
https://gitLab.example.com
then the URL for bob's skunkworks project might be https://gitLab.example.com/bob/skunkworks
.
projectUrl : String
https://gitLab.example.com
then the URL for bob's skunkworks project might be https://gitLab.example.com/bob/skunkworks
gitList
repoUrl : String
gitWeb
repoUrl : String
$class: 'GiteaBrowser'
repoUrl : String
https://gitea.example.com
then the URL for bob's skunkworks project repository might be https://gitea.example.com/bob/skunkworks
github
repoUrl : String
gitiles
repoUrl : String
$class: 'GitoriousWeb'
repoUrl : String
gogs
repoUrl : String
kiln
repoUrl : String
phabricator
repoUrl : String
repo : String
redmine
repoUrl : String
rhodeCode
repoUrl : String
$class: 'ScmManagerGitRepositoryBrowser'
repoUrl : String
jbSpace
repoUrl : String
$class: 'Stash'
repoUrl : String
$class: 'TracGitRepositoryBrowser'
$class: 'TuleapBrowser'
repositoryUrl : String
viewgit
repoUrl : String
projectName : String
credentialsId : String
(optional)
extensions
(optional)
authorInChangelog
$class: 'BuildChooserSetting'
This extension point in Jenkins is used by many other plugins to control the job to build specific commits. When you activate those plugins, you may see them installing a custom strategy here.
buildChooser
$class: 'AlternativeBuildChooser'
$class: 'AncestryBuildChooser'
maximumAgeInDays : int
ancestorCommitSha1 : String
$class: 'DefaultBuildChooser'
$class: 'DeflakeGitBuildChooser'
$class: 'GerritTriggerBuildChooser'
$class: 'InverseBuildChooser'
buildSingleRevisionOnly
changelogToBranch
options
compareRemote : String
origin
, that contains the branch you specify below.
compareTarget : String
checkoutOption
timeout : int
cleanBeforeCheckout
.gitignore
. It also resets all tracked files to their versioned state. This ensures that the workspace is in the same state as if you cloned and checked out in a brand-new empty directory, and ensures that your build is not affected by the files generated by the previous build.
deleteUntrackedNestedRepositories : boolean
(optional)
.git
directories.
cleanAfterCheckout
.gitignore
. It also resets all tracked files to their versioned state. This ensures that the workspace is in the same state as if you cloned and checked out in a brand-new empty directory, and ensures that your build is not affected by the files generated by the previous build.
deleteUntrackedNestedRepositories : boolean
(optional)
.git
directories.
cloneOption
shallow : boolean
noTags : boolean
reference : String
timeout : int
depth : int
(optional)
honorRefspec : boolean
(optional)
$class: 'CodeCommitURLHelper'
credentialId : String
OPTIONAL: Select the credentials to use.
If not specified, defaults to the DefaultAWSCredentialsProviderChain behaviour - *FROM THE JENKINS INSTANCE*
In the latter case, usage of IAM Role Profiles seems not to work, thus relying on environment variables / system properties or the ~/.aws/credentials file, thus not recommended.
repositoryName : String
$class: 'DisableRemotePoll'
$class: 'ExcludeFromChangeSet'
$class: 'ExcludeFromPoll'
firstBuildChangelog
makeChangelog : boolean
(optional)
lfs
$class: 'GitSCMChecksExtension'
verboseConsoleLog : boolean
(optional)
$class: 'GitSCMStatusChecksExtension'
name : String
(optional)
skip : boolean
(optional)
skipProgressUpdates : boolean
(optional)
suppressLogs : boolean
(optional)
unstableBuildNeutral : boolean
(optional)
$class: 'GitTagMessageExtension'
useMostRecentTag : boolean
(optional)
$class: 'IgnoreNotifyCommit'
localBranch
If selected, and its value is an empty string or "**", then the branch name is computed from the remote branch without the origin. In that case, a remote branch origin/master will be checked out to a local branch named master, and a remote branch origin/develop/new-feature will be checked out to a local branch named develop/newfeature.
Please note that this has not been tested with submodules.
localBranch : String
$class: 'MessageExclusion'
excludedMessage : String
.*\[maven-release-plugin\].*The example above illustrates that if only revisions with "[maven-release-plugin]" message in first comment line have been committed to the SCM a build will not occur. You can create more complex patterns using embedded flag expressions.
(?s).*FOO.*This example will search FOO message in all comment lines.
$class: 'PathRestriction'
includedRegions : String
myapp/src/main/web/.*\.html myapp/src/main/web/.*\.jpeg myapp/src/main/web/.*\.gifThe example above illustrates that a build will only occur, if html/jpeg/gif files have been committed to the SCM. Exclusions take precedence over inclusions, if there is an overlap between included and excluded regions.
excludedRegions : String
myapp/src/main/web/.*\.html myapp/src/main/web/.*\.jpeg myapp/src/main/web/.*\.gifThe example above illustrates that if only html/jpeg/gif files have been committed to the SCM a build will not occur.
perBuildTag
$class: 'PreBuildMerge'
options
mergeTarget : String
master
.
fastForwardMode
(optional)
FF
, FF_ONLY
, NO_FF
mergeRemote : String
(optional)
origin
, that contains the branch you specify below. If left blank, it'll default to the name of the first repository configured above.
mergeStrategy
(optional)
DEFAULT
, RESOLVE
, RECURSIVE
, OCTOPUS
, OURS
, SUBTREE
, RECURSIVE_THEIRS
pretestedIntegration
gitIntegrationStrategy
accumulated
shortCommitMessage : boolean
(optional)
ffonly
shortCommitMessage : boolean
(optional)
squash
integrationBranch : String
The branch name must match your integration branch name. No trailing slash.
git checkout -B <Branch name> <Repository name>/<Branch name> git merge --squash <Branch matched by git> git commit -C <Branch matched by git>
git checkout -B <Branch name> <Repository name>/<Branch name> git merge -m <commitMsg> <Branch matched by git> --no-ff
Changes are only ever pushed when the build results is SUCCESS
git push <Repository name> <Branch name>
repoName : String
The repository name. In git the repository is always the name of the remote. So if you have specified a repository name in your Git configuration. You need to specify the exact same name here, otherwise no integration will be performed. We do the merge based on this.
No trailing slash on repository name.
Remember to specify this when working with NAMED repositories in Git
pruneStaleBranch
pruneTags
pruneTags : boolean
$class: 'RelativeTargetDirectory'
relativeTargetDir : String
This extension should not be used in Jenkins Pipeline (either declarative or scripted). Jenkins Pipeline already provides standard techniques for checkout to a subdirectory. Use ws and dir in Jenkins Pipeline rather than this extension.
$class: 'ScmName'
Unique name for this SCM. Needed when using Git within the Multi SCM plugin.
name : String
sparseCheckout
Specify the paths that you'd like to sparse checkout. This may be used for saving space (Think about a reference repository). Be sure to use a recent version of Git, at least above 1.7.10
sparseCheckoutPaths
path : String
submodule
depth : int
(optional)
disableSubmodules : boolean
(optional)
parentCredentials : boolean
(optional)
recursiveSubmodules : boolean
(optional)
reference : String
(optional)
git init --bare git remote add SubProject1 https://gitrepo.com/subproject1 git remote add SubProject2 https://gitrepo.com/subproject2 git fetch --all
shallow : boolean
(optional)
threads : int
(optional)
timeout : int
(optional)
trackingSubmodules : boolean
(optional)
$class: 'UserExclusion'
excludedUsers : String
auto_build_userThe example above illustrates that if only revisions by "auto_build_user" have been committed to the SCM a build will not occur.
$class: 'UserIdentity'
name : String
If given, "GIT_COMMITTER_NAME=[this]" and "GIT_AUTHOR_NAME=[this]" are set for builds. This overrides whatever is in the global settings.
email : String
If given, "GIT_COMMITTER_EMAIL=[this]" and "GIT_AUTHOR_EMAIL=[this]" are set for builds. This overrides whatever is in the global settings.
$class: 'WipeWorkspace'
gitTool : String
(optional)
traits
(optional)
$class: 'ApprovedPullRequestTrait'
strategyId : int
authorInChangelog
bitbucketAgedRefsTrait
retentionDays : String
bitbucketBranchCommitSkipTrait
$class: 'BitbucketBranchDiscoveryTrait'
bitbucketBuildStatusNotifications
disableNotificationForNotBuildJobs : boolean
(optional)
sendSuccessNotificationForUnstableBuild : boolean
(optional)
bitbucketCommitSkipTrait
$class: 'BitbucketGitBrowserSCMSourceTrait'
browser
assembla
repoUrl : String
$class: 'BacklogGitRepositoryBrowser'
repoName : String
repoUrl : String
bitbucketServer
repoUrl : String
bitbucket
repoUrl : String
cgit
repoUrl : String
fisheye
repoUrl : String
gitblit
repoUrl : String
projectName : String
$class: 'GitBucketBrowser'
url : String
gitLab
repoUrl : String
version : String
(optional)
gitLabBrowser
https://gitLab.example.com
then the URL for bob's skunkworks project might be https://gitLab.example.com/bob/skunkworks
.
projectUrl : String
https://gitLab.example.com
then the URL for bob's skunkworks project might be https://gitLab.example.com/bob/skunkworks
gitList
repoUrl : String
gitWeb
repoUrl : String
$class: 'GiteaBrowser'
repoUrl : String
https://gitea.example.com
then the URL for bob's skunkworks project repository might be https://gitea.example.com/bob/skunkworks
github
repoUrl : String
gitiles
repoUrl : String
$class: 'GitoriousWeb'
repoUrl : String
gogs
repoUrl : String
kiln
repoUrl : String
phabricator
repoUrl : String
repo : String
redmine
repoUrl : String
rhodeCode
repoUrl : String
$class: 'ScmManagerGitRepositoryBrowser'
repoUrl : String
jbSpace
repoUrl : String
$class: 'Stash'
repoUrl : String
$class: 'TracGitRepositoryBrowser'
$class: 'TuleapBrowser'
repositoryUrl : String
viewgit
repoUrl : String
projectName : String
$class: 'BitbucketJiraValidatorTrait'
jiraServerIdx : int
$class: 'BitbucketPullRequestDiscoveryTrait'
$class: 'BitbucketTagDiscoveryTrait'
buildStatusNameCustomPart
buildStatusNameCustomPart : String
(optional)
buildStatusNameOverwrite : boolean
(optional)
ignoreTypeInStatusName : boolean
(optional)
$class: 'ChangeDiscoveryTrait'
queryString : String
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
checkoutOption
extension
timeout : int
cleanAfterCheckout
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.
deleteUntrackedNestedRepositories : boolean
(optional)
.git
directories.
cleanBeforeCheckout
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.
deleteUntrackedNestedRepositories : boolean
(optional)
.git
directories.
$class: 'CleanMercurialSCMSourceTrait'
cloneOption
extension
shallow : boolean
noTags : boolean
reference : String
timeout : int
depth : int
(optional)
honorRefspec : boolean
(optional)
$class: 'DisableStatusUpdateTrait'
discoverOtherRefs
ref : String
The pattern under /refs on the remote repository to discover, can contain a wildcard.
Example: test/*/merged
nameMapping : String
(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}".
$class: 'FilterChecksTrait'
queryOperator
ID
, SCHEME
queryString : String
firstBuildChangelog
extension
makeChangelog : boolean
(optional)
gitLabForkDiscovery
strategyId : int
trust
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>
buildMRForksNotMirror : boolean
(optional)
browser
browser
assembla
repoUrl : String
$class: 'BacklogGitRepositoryBrowser'
repoName : String
repoUrl : String
bitbucketServer
repoUrl : String
bitbucket
repoUrl : String
cgit
repoUrl : String
fisheye
repoUrl : String
gitblit
repoUrl : String
projectName : String
$class: 'GitBucketBrowser'
url : String
gitLab
repoUrl : String
version : String
(optional)
gitLabBrowser
https://gitLab.example.com
then the URL for bob's skunkworks project might be https://gitLab.example.com/bob/skunkworks
.
projectUrl : String
https://gitLab.example.com
then the URL for bob's skunkworks project might be https://gitLab.example.com/bob/skunkworks
gitList
repoUrl : String
gitWeb
repoUrl : String
$class: 'GiteaBrowser'
repoUrl : String
https://gitea.example.com
then the URL for bob's skunkworks project repository might be https://gitea.example.com/bob/skunkworks
github
repoUrl : String
gitiles
repoUrl : String
$class: 'GitoriousWeb'
repoUrl : String
gogs
repoUrl : String
kiln
repoUrl : String
phabricator
repoUrl : String
repo : String
redmine
repoUrl : String
rhodeCode
repoUrl : String
$class: 'ScmManagerGitRepositoryBrowser'
repoUrl : String
jbSpace
repoUrl : String
$class: 'Stash'
repoUrl : String
$class: 'TracGitRepositoryBrowser'
$class: 'TuleapBrowser'
repositoryUrl : String
viewgit
repoUrl : String
projectName : String
gitHubAgedRefsTrait
retentionDays : String
gitHubBranchCommitSkipTrait
gitHubCommitSkipTrait
$class: 'GitHubJiraValidatorTrait'
jiraServerIdx : int
gitHubSourceChecks
verboseConsoleLog : boolean
(optional)
gitHubStatusChecks
name : String
(optional)
skip : boolean
(optional)
skipNotifications : boolean
(optional)
skipProgressUpdates : boolean
(optional)
suppressLogs : boolean
(optional)
unstableBuildNeutral : boolean
(optional)
lfs
gitlabAvatar
disableProjectAvatar : boolean
(optional)
gitlabMarkUnstableAsSuccess
markUnstableAsSuccess : boolean
(optional)
gitlabSkipNotifications
gitTool
gitTool : String
gitLabHookRegistration
webHookMode : String
systemHookMode : String
gitHubIgnoreDraftPullRequestFilter
ignoreOnPush
jervisFilter
This 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:
- main
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 create an allow list of branches (only) or a block list of branches (except) to be built.
# block branches from building
branches:
except:
- legacy
- experimental
# allow only these branches
branches:
only:
- main
- stable
The same YAML can be applied to tags.
# block tags from building
tags:
except:
- .*-rc
- .*-beta
# allow only these tags
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 an allow list in your main branch, then it will not propagate to other branches.
You can use regular expressions to allow or block branches:
branches:
only:
- main
- /^[.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 : String
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.
localBranch
logComment
logSuccess : boolean
(optional)
sudoUser : String
(optional)
$class: 'MercurialBrowserSCMSourceTrait'
browser
$class: 'FishEye'
url : String
$class: 'GoogleCode'
url : String
$class: 'HgWeb'
url : String
$class: 'Kallithea'
url : String
$class: 'KilnHG'
url : String
$class: 'RhodeCode'
url : String
$class: 'RhodeCodeLegacy'
url : String
$class: 'ScmManager'
url : String
http://YOURSCMMANAGER/scm/repo/NAMESPACE/NAME/
).
$class: 'MercurialInstallationSCMSourceTrait'
installation : String
multiBranchProjectDisplayNaming
displayNamingStrategy
Job display name with fallback to name:
Uses the branch source plugin's display name for the PR instead of the raw name
Value for configuration-as-code: OBJECT_DISPLAY_NAME
Name and, if available, display name:
Joins the raw name and the branch source plugin's display name
Value for configuration-as-code: RAW_AND_OBJECT_DISPLAY_NAME
OBJECT_DISPLAY_NAME
, RAW_AND_OBJECT_DISPLAY_NAME
gitHubNotificationContextTrait
contextLabel : String
typeSuffix : boolean
Appends the relevant suffix to the context label(s) based on the build type. '/pr-merge', '/pr-head' or '/branch'
multipleStatusDelimiter : String
(optional)
multipleStatuses : boolean
(optional)
gitLabOriginDiscovery
strategyId : int
$class: 'PathBasedPullRequestFilterTrait'
inclusionField : String
exclusionField : String
$class: 'PreBuildMergeTrait'
extension
options
mergeTarget : String
master
.
fastForwardMode
(optional)
FF
, FF_ONLY
, NO_FF
mergeRemote : String
(optional)
origin
, that contains the branch you specify below. If left blank, it'll default to the name of the first repository configured above.
mergeStrategy
(optional)
DEFAULT
, RESOLVE
, RECURSIVE
, OCTOPUS
, OURS
, SUBTREE
, RECURSIVE_THEIRS
$class: 'PretestedIntegrationSCMTrait'
extension
gitIntegrationStrategy
accumulated
shortCommitMessage : boolean
(optional)
ffonly
shortCommitMessage : boolean
(optional)
squash
integrationBranch : String
The branch name must match your integration branch name. No trailing slash.
git checkout -B <Branch name> <Repository name>/<Branch name> git merge --squash <Branch matched by git> git commit -C <Branch matched by git>
git checkout -B <Branch name> <Repository name>/<Branch name> git merge -m <commitMsg> <Branch matched by git> --no-ff
Changes are only ever pushed when the build results is SUCCESS
git push <Repository name> <Branch name>
repoName : String
The repository name. In git the repository is always the name of the remote. So if you have specified a repository name in your Git configuration. You need to specify the exact same name here, otherwise no integration will be performed. We do the merge based on this.
No trailing slash on repository name.
Remember to specify this when working with NAMED repositories in Git
pruneStaleBranch
pruneStaleTag
bitbucketPublicRepoPullRequestFilter
$class: 'PullRequestDiscoveryTrait'
excludeBranchesWithPRs : boolean
$class: 'PullRequestLabelsBlackListFilterTrait'
labels : String
$class: 'PullRequestLabelsMatchAllFilterTrait'
labels : String
$class: 'PullRequestLabelsMatchAnyFilterTrait'
labels : String
$class: 'PullRequestNameFilterTrait'
strategyId : int
phrase : String
ignoreCase : boolean
regex : boolean
$class: 'PullRequestSourceBranchFilterTrait'
strategyId : int
phrase : String
ignoreCase : boolean
regex : boolean
$class: 'PullRequestTargetBranchFilterTrait'
strategyId : int
phrase : String
ignoreCase : boolean
regex : boolean
refSpecs
templates
value : String
@{remote}
will be replaced by the remote name (which defaults to origin
) before use.
headRegexFilterWithPRFromOrigin
regex : String
tagRegex : String
giteaReleaseDiscovery
includePreReleases : boolean
(optional)
artifactToAssetMappingEnabled : boolean
(optional)
archiveArtifacts
) will be added as assets in the release, but only if the build was successfull.
remoteName
remoteName : String
$class: 'ScmManagerBranchDiscoveryTrait'
sparseCheckoutPaths
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
sparseCheckoutPaths
path : String
submoduleOption
extension
depth : int
(optional)
disableSubmodules : boolean
(optional)
parentCredentials : boolean
(optional)
recursiveSubmodules : boolean
(optional)
reference : String
(optional)
git init --bare git remote add SubProject1 https://gitrepo.com/subproject1 git remote add SubProject2 https://gitrepo.com/subproject2 git fetch --all
shallow : boolean
(optional)
threads : int
(optional)
timeout : int
(optional)
trackingSubmodules : boolean
(optional)
mrTriggerComment
commentBody : String
onlyTrustedMembersCanTrigger : boolean
tuleapBranchDiscovery
tuleapNotifyPullRequest
tuleapForkPullRequestDiscovery
tuleapPullRequestDiscovery
userIdentity
extension
name : String
If given, "GIT_COMMITTER_NAME=[this]" and "GIT_AUTHOR_NAME=[this]" are set for builds. This overrides whatever is in the global settings.
email : String
If given, "GIT_COMMITTER_EMAIL=[this]" and "GIT_AUTHOR_EMAIL=[this]" are set for builds. This overrides whatever is in the global settings.
bitbucketWebhookConfiguration
Sets 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 : String
WebhookListenerBuildConditionsTrait
alwaysBuildMROpen : boolean
(optional)
alwaysBuildMRReOpen : boolean
(optional)
alwaysIgnoreMRApproval : boolean
(optional)
alwaysIgnoreMRApproved : boolean
(optional)
alwaysIgnoreMRUnApproval : boolean
(optional)
alwaysIgnoreMRUnApproved : boolean
(optional)
alwaysIgnoreMRWorkInProgress : boolean
(optional)
alwaysIgnoreNonCodeRelatedUpdates : boolean
(optional)
headWildcardFilterWithPRFromOrigin
includes : String
*
as a wildcard; for example: master release*
excludes : String
release
tagIncludes : String
*
as a wildcard; for example: *-1.*
to build only 1.0 tags from the maven release plugin.
tagExcludes : String
*-0.*
$class: 'WipeWorkspaceTrait'
bitbucketBranchDiscovery
strategyId : int
bitbucketForkDiscovery
strategyId : int
trust
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.
bitbucketTrustEveryone
bitbucketTrustNobody
bitbucketTrustTeam
bitbucketPullRequestDiscovery
strategyId : int
bitbucketSshCheckout
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 : String
It must be a SSH key based credential.
bitbucketTagDiscovery
bitbucketWebhookRegistration
Overrides 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.TagDiscoveryTrait'
dagshubBranchDiscovery
$class: 'io.jenkins.plugins.dagshubbranchsource.traits.ForkPullRequestDiscoveryTrait'
buildOnPullHead : boolean
(optional)
$class: 'io.jenkins.plugins.dagshubbranchsource.traits.OriginPullRequestDiscoveryTrait'
buildOnPullHead : boolean
(optional)
dagshubTagDiscovery
gitLabBranchDiscovery
strategyId : int
branchesAlwaysIncludedRegex : String
(optional)
gitLabSshCheckout
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 : String
gitLabTagDiscovery
gitBranchDiscovery
gitTagDiscovery
headRegexFilter
regex : String
headWildcardFilter
includes : String
*
as a wildcard; for example: master release*
excludes : String
release alpha-* beta-*
headRegexFilterWithPR
regex : String
tagRegex : String
headWildcardFilterWithPR
includes : String
*
as a wildcard; for example: master release*
excludes : String
release
tagIncludes : String
*
as a wildcard; for example: *-1.*
to build only 1.0 tags from the maven release plugin.
tagExcludes : String
*-0.*
giteaBranchDiscovery
strategyId : int
giteaForkDiscovery
strategyId : int
trust
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
.
gitLabTrustMembers
bitbucketTrustTeam
bitbucketTrustEveryone
bitbucketTrustNobody
gitLabTrustEveryone
gitLabTrustNobody
gitLabTrustPermissions
giteaTrustContributors
giteaTrustEveryone
giteaTrustNobody
gitHubTrustContributors
gitHubTrustEveryone
gitHubTrustNobody
gitHubTrustPermissions
giteaPullRequestDiscovery
strategyId : int
giteaSSHCheckout
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 : String
giteaTagDiscovery
giteaWebhookRegistration
Overrides 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 : String
gitHubBranchDiscovery
strategyId : int
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.
gitHubForkDiscovery
strategyId : int
trust
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.
gitHubTrustContributors
gitHubTrustEveryone
gitHubTrustNobody
gitHubTrustPermissions
gitHubPullRequestDiscovery
strategyId : int
gitHubSshCheckout
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 : String
gitHubTagDiscovery
gitlab
serverName : String
projectOwner : String
projectPath : String
credentialsId : String
(optional)
id : String
(optional)
projectId : long
(optional)
traits
(optional)
$class: 'ApprovedPullRequestTrait'
strategyId : int
authorInChangelog
bitbucketAgedRefsTrait
retentionDays : String
bitbucketBranchCommitSkipTrait
$class: 'BitbucketBranchDiscoveryTrait'
bitbucketBuildStatusNotifications
disableNotificationForNotBuildJobs : boolean
(optional)
sendSuccessNotificationForUnstableBuild : boolean
(optional)
bitbucketCommitSkipTrait
$class: 'BitbucketGitBrowserSCMSourceTrait'
browser
assembla
repoUrl : String
$class: 'BacklogGitRepositoryBrowser'
repoName : String
repoUrl : String
bitbucketServer
repoUrl : String
bitbucket
repoUrl : String
cgit
repoUrl : String
fisheye
repoUrl : String
gitblit
repoUrl : String
projectName : String
$class: 'GitBucketBrowser'
url : String
gitLab
repoUrl : String
version : String
(optional)
gitLabBrowser
https://gitLab.example.com
then the URL for bob's skunkworks project might be https://gitLab.example.com/bob/skunkworks
.
projectUrl : String
https://gitLab.example.com
then the URL for bob's skunkworks project might be https://gitLab.example.com/bob/skunkworks
gitList
repoUrl : String
gitWeb
repoUrl : String
$class: 'GiteaBrowser'
repoUrl : String
https://gitea.example.com
then the URL for bob's skunkworks project repository might be https://gitea.example.com/bob/skunkworks
github
repoUrl : String
gitiles
repoUrl : String
$class: 'GitoriousWeb'
repoUrl : String
gogs
repoUrl : String
kiln
repoUrl : String
phabricator
repoUrl : String
repo : String
redmine
repoUrl : String
rhodeCode
repoUrl : String
$class: 'ScmManagerGitRepositoryBrowser'
repoUrl : String
jbSpace
repoUrl : String
$class: 'Stash'
repoUrl : String
$class: 'TracGitRepositoryBrowser'
$class: 'TuleapBrowser'
repositoryUrl : String
viewgit
repoUrl : String
projectName : String
$class: 'BitbucketJiraValidatorTrait'
jiraServerIdx : int
$class: 'BitbucketPullRequestDiscoveryTrait'
$class: 'BitbucketTagDiscoveryTrait'
buildStatusNameCustomPart
buildStatusNameCustomPart : String
(optional)
buildStatusNameOverwrite : boolean
(optional)
ignoreTypeInStatusName : boolean
(optional)
$class: 'ChangeDiscoveryTrait'
queryString : String
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
checkoutOption
extension
timeout : int
cleanAfterCheckout
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.
deleteUntrackedNestedRepositories : boolean
(optional)
.git
directories.
cleanBeforeCheckout
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.
deleteUntrackedNestedRepositories : boolean
(optional)
.git
directories.
$class: 'CleanMercurialSCMSourceTrait'
cloneOption
extension
shallow : boolean
noTags : boolean
reference : String
timeout : int
depth : int
(optional)
honorRefspec : boolean
(optional)
$class: 'DisableStatusUpdateTrait'
discoverOtherRefs
ref : String
The pattern under /refs on the remote repository to discover, can contain a wildcard.
Example: test/*/merged
nameMapping : String
(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}".
$class: 'FilterChecksTrait'
queryOperator
ID
, SCHEME
queryString : String
firstBuildChangelog
extension
makeChangelog : boolean
(optional)
gitLabForkDiscovery
strategyId : int
trust
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>
buildMRForksNotMirror : boolean
(optional)
browser
browser
assembla
repoUrl : String
$class: 'BacklogGitRepositoryBrowser'
repoName : String
repoUrl : String
bitbucketServer
repoUrl : String
bitbucket
repoUrl : String
cgit
repoUrl : String
fisheye
repoUrl : String
gitblit
repoUrl : String
projectName : String
$class: 'GitBucketBrowser'
url : String
gitLab
repoUrl : String
version : String
(optional)
gitLabBrowser
https://gitLab.example.com
then the URL for bob's skunkworks project might be https://gitLab.example.com/bob/skunkworks
.
projectUrl : String
https://gitLab.example.com
then the URL for bob's skunkworks project might be https://gitLab.example.com/bob/skunkworks
gitList
repoUrl : String
gitWeb
repoUrl : String
$class: 'GiteaBrowser'
repoUrl : String
https://gitea.example.com
then the URL for bob's skunkworks project repository might be https://gitea.example.com/bob/skunkworks
github
repoUrl : String
gitiles
repoUrl : String
$class: 'GitoriousWeb'
repoUrl : String
gogs
repoUrl : String
kiln
repoUrl : String
phabricator
repoUrl : String
repo : String
redmine
repoUrl : String
rhodeCode
repoUrl : String
$class: 'ScmManagerGitRepositoryBrowser'
repoUrl : String
jbSpace
repoUrl : String
$class: 'Stash'
repoUrl : String
$class: 'TracGitRepositoryBrowser'
$class: 'TuleapBrowser'
repositoryUrl : String
viewgit
repoUrl : String
projectName : String
gitHubAgedRefsTrait
retentionDays : String
gitHubBranchCommitSkipTrait
gitHubCommitSkipTrait
$class: 'GitHubJiraValidatorTrait'
jiraServerIdx : int
gitHubSourceChecks
verboseConsoleLog : boolean
(optional)
gitHubStatusChecks
name : String
(optional)
skip : boolean
(optional)
skipNotifications : boolean
(optional)
skipProgressUpdates : boolean
(optional)
suppressLogs : boolean
(optional)
unstableBuildNeutral : boolean
(optional)
lfs
gitlabAvatar
disableProjectAvatar : boolean
(optional)
gitlabMarkUnstableAsSuccess
markUnstableAsSuccess : boolean
(optional)
gitlabSkipNotifications
gitTool
gitTool : String
gitLabHookRegistration
webHookMode : String
systemHookMode : String
gitHubIgnoreDraftPullRequestFilter
ignoreOnPush
jervisFilter
This 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:
- main
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 create an allow list of branches (only) or a block list of branches (except) to be built.
# block branches from building
branches:
except:
- legacy
- experimental
# allow only these branches
branches:
only:
- main
- stable
The same YAML can be applied to tags.
# block tags from building
tags:
except:
- .*-rc
- .*-beta
# allow only these tags
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 an allow list in your main branch, then it will not propagate to other branches.
You can use regular expressions to allow or block branches:
branches:
only:
- main
- /^[.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 : String
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.
localBranch
logComment
logSuccess : boolean
(optional)
sudoUser : String
(optional)
$class: 'MercurialBrowserSCMSourceTrait'
browser
$class: 'FishEye'
url : String
$class: 'GoogleCode'
url : String
$class: 'HgWeb'
url : String
$class: 'Kallithea'
url : String
$class: 'KilnHG'
url : String
$class: 'RhodeCode'
url : String
$class: 'RhodeCodeLegacy'
url : String
$class: 'ScmManager'
url : String
http://YOURSCMMANAGER/scm/repo/NAMESPACE/NAME/
).
$class: 'MercurialInstallationSCMSourceTrait'
installation : String
multiBranchProjectDisplayNaming
displayNamingStrategy
Job display name with fallback to name:
Uses the branch source plugin's display name for the PR instead of the raw name
Value for configuration-as-code: OBJECT_DISPLAY_NAME
Name and, if available, display name:
Joins the raw name and the branch source plugin's display name
Value for configuration-as-code: RAW_AND_OBJECT_DISPLAY_NAME
OBJECT_DISPLAY_NAME
, RAW_AND_OBJECT_DISPLAY_NAME
gitHubNotificationContextTrait
contextLabel : String
typeSuffix : boolean
Appends the relevant suffix to the context label(s) based on the build type. '/pr-merge', '/pr-head' or '/branch'
multipleStatusDelimiter : String
(optional)
multipleStatuses : boolean
(optional)
gitLabOriginDiscovery
strategyId : int
$class: 'PathBasedPullRequestFilterTrait'
inclusionField : String
exclusionField : String
$class: 'PreBuildMergeTrait'
extension
options
mergeTarget : String
master
.
fastForwardMode
(optional)
FF
, FF_ONLY
, NO_FF
mergeRemote : String
(optional)
origin
, that contains the branch you specify below. If left blank, it'll default to the name of the first repository configured above.
mergeStrategy
(optional)
DEFAULT
, RESOLVE
, RECURSIVE
, OCTOPUS
, OURS
, SUBTREE
, RECURSIVE_THEIRS
$class: 'PretestedIntegrationSCMTrait'
extension
gitIntegrationStrategy
accumulated
shortCommitMessage : boolean
(optional)
ffonly
shortCommitMessage : boolean
(optional)
squash
integrationBranch : String
The branch name must match your integration branch name. No trailing slash.
git checkout -B <Branch name> <Repository name>/<Branch name> git merge --squash <Branch matched by git> git commit -C <Branch matched by git>
git checkout -B <Branch name> <Repository name>/<Branch name> git merge -m <commitMsg> <Branch matched by git> --no-ff
Changes are only ever pushed when the build results is SUCCESS
git push <Repository name> <Branch name>
repoName : String
The repository name. In git the repository is always the name of the remote. So if you have specified a repository name in your Git configuration. You need to specify the exact same name here, otherwise no integration will be performed. We do the merge based on this.
No trailing slash on repository name.
Remember to specify this when working with NAMED repositories in Git
pruneStaleBranch
pruneStaleTag
bitbucketPublicRepoPullRequestFilter
$class: 'PullRequestDiscoveryTrait'
excludeBranchesWithPRs : boolean
$class: 'PullRequestLabelsBlackListFilterTrait'
labels : String
$class: 'PullRequestLabelsMatchAllFilterTrait'
labels : String
$class: 'PullRequestLabelsMatchAnyFilterTrait'
labels : String
$class: 'PullRequestNameFilterTrait'
strategyId : int
phrase : String
ignoreCase : boolean
regex : boolean
$class: 'PullRequestSourceBranchFilterTrait'
strategyId : int
phrase : String
ignoreCase : boolean
regex : boolean
$class: 'PullRequestTargetBranchFilterTrait'
strategyId : int
phrase : String
ignoreCase : boolean
regex : boolean
refSpecs
templates
value : String
@{remote}
will be replaced by the remote name (which defaults to origin
) before use.
headRegexFilterWithPRFromOrigin
regex : String
tagRegex : String
giteaReleaseDiscovery
includePreReleases : boolean
(optional)
artifactToAssetMappingEnabled : boolean
(optional)
archiveArtifacts
) will be added as assets in the release, but only if the build was successfull.
remoteName
remoteName : String
$class: 'ScmManagerBranchDiscoveryTrait'
sparseCheckoutPaths
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
sparseCheckoutPaths
path : String
submoduleOption
extension
depth : int
(optional)
disableSubmodules : boolean
(optional)
parentCredentials : boolean
(optional)
recursiveSubmodules : boolean
(optional)
reference : String
(optional)
git init --bare git remote add SubProject1 https://gitrepo.com/subproject1 git remote add SubProject2 https://gitrepo.com/subproject2 git fetch --all
shallow : boolean
(optional)
threads : int
(optional)
timeout : int
(optional)
trackingSubmodules : boolean
(optional)
mrTriggerComment
commentBody : String
onlyTrustedMembersCanTrigger : boolean
tuleapBranchDiscovery
tuleapNotifyPullRequest
tuleapForkPullRequestDiscovery
tuleapPullRequestDiscovery
userIdentity
extension
name : String
If given, "GIT_COMMITTER_NAME=[this]" and "GIT_AUTHOR_NAME=[this]" are set for builds. This overrides whatever is in the global settings.
email : String
If given, "GIT_COMMITTER_EMAIL=[this]" and "GIT_AUTHOR_EMAIL=[this]" are set for builds. This overrides whatever is in the global settings.
bitbucketWebhookConfiguration
Sets 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 : String
WebhookListenerBuildConditionsTrait
alwaysBuildMROpen : boolean
(optional)
alwaysBuildMRReOpen : boolean
(optional)
alwaysIgnoreMRApproval : boolean
(optional)
alwaysIgnoreMRApproved : boolean
(optional)
alwaysIgnoreMRUnApproval : boolean
(optional)
alwaysIgnoreMRUnApproved : boolean
(optional)
alwaysIgnoreMRWorkInProgress : boolean
(optional)
alwaysIgnoreNonCodeRelatedUpdates : boolean
(optional)
headWildcardFilterWithPRFromOrigin
includes : String
*
as a wildcard; for example: master release*
excludes : String
release
tagIncludes : String
*
as a wildcard; for example: *-1.*
to build only 1.0 tags from the maven release plugin.
tagExcludes : String
*-0.*
$class: 'WipeWorkspaceTrait'
bitbucketBranchDiscovery
strategyId : int
bitbucketForkDiscovery
strategyId : int
trust
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.
bitbucketTrustEveryone
bitbucketTrustNobody
bitbucketTrustTeam
bitbucketPullRequestDiscovery
strategyId : int
bitbucketSshCheckout
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 : String
It must be a SSH key based credential.
bitbucketTagDiscovery
bitbucketWebhookRegistration
Overrides 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.TagDiscoveryTrait'
dagshubBranchDiscovery
$class: 'io.jenkins.plugins.dagshubbranchsource.traits.ForkPullRequestDiscoveryTrait'
buildOnPullHead : boolean
(optional)
$class: 'io.jenkins.plugins.dagshubbranchsource.traits.OriginPullRequestDiscoveryTrait'
buildOnPullHead : boolean
(optional)
dagshubTagDiscovery
gitLabBranchDiscovery
strategyId : int
branchesAlwaysIncludedRegex : String
(optional)
gitLabSshCheckout
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 : String
gitLabTagDiscovery
gitBranchDiscovery
gitTagDiscovery
headRegexFilter
regex : String
headWildcardFilter
includes : String
*
as a wildcard; for example: master release*
excludes : String
release alpha-* beta-*
headRegexFilterWithPR
regex : String
tagRegex : String
headWildcardFilterWithPR
includes : String
*
as a wildcard; for example: master release*
excludes : String
release
tagIncludes : String
*
as a wildcard; for example: *-1.*
to build only 1.0 tags from the maven release plugin.
tagExcludes : String
*-0.*
giteaBranchDiscovery
strategyId : int
giteaForkDiscovery
strategyId : int
trust
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
.
gitLabTrustMembers
bitbucketTrustTeam
bitbucketTrustEveryone
bitbucketTrustNobody
gitLabTrustEveryone
gitLabTrustNobody
gitLabTrustPermissions
giteaTrustContributors
giteaTrustEveryone
giteaTrustNobody
gitHubTrustContributors
gitHubTrustEveryone
gitHubTrustNobody
gitHubTrustPermissions
giteaPullRequestDiscovery
strategyId : int
giteaSSHCheckout
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 : String
giteaTagDiscovery
giteaWebhookRegistration
Overrides 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 : String
gitHubBranchDiscovery
strategyId : int
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.
gitHubForkDiscovery
strategyId : int
trust
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.
gitHubTrustContributors
gitHubTrustEveryone
gitHubTrustNobody
gitHubTrustPermissions
gitHubPullRequestDiscovery
strategyId : int
gitHubSshCheckout
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 : String
gitHubTagDiscovery
git
$class: 'GiteaSCMSource'
globalLib
credential : String
path : String
A Perforce Depot path to the library.
For example: //depot/myLibrary/...
charset : String
(optional)
excludes : String
(optional)
filter
(optional)
latest
latestChange : boolean
latestWithPin
latestWithPin : boolean
When enabled, in case of a pinned checkout, polling ignores the pin or the label specified in the checkout step and polls till the latest change.
pathFilter
path : String
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.
viewPattern
patternText : String
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
caseSensitive : boolean
incremental
perChange : boolean
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.
userFilter
user : String
Changes can be filtered to not trigger a build; if the owner of a change matches the specified name, the build is filtered.
viewFilter
viewMask : String
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
format : String
(optional)
id : String
(optional)
includes : String
(optional)
populate
(optional)
autoClean
replace : boolean
Perforce will check out and overwrite any depot files which are either missing from workspace, or have been modified locally.
delete : boolean
Perforce will delete any local files that are not in the depot.
tidy : boolean
modtime : boolean
quiet : boolean
Enables the -q flag for all applicable Perforce operations. Summary details will still be displayed.
pin : String
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).
parallel
enable : boolean
path : String
threads : String
minfiles : String
minbytes : String
previewOnly
quiet : boolean
Enables the -q flag for all applicable Perforce operations. Summary details will still be displayed.
pin : String
flushOnly
quiet : boolean
pin : String
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).
forceClean
have : boolean
quiet : boolean
Enables the -q flag for all applicable Perforce operations. Summary details will still be displayed.
pin : String
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).
parallel
enable : boolean
path : String
threads : String
minfiles : String
minbytes : String
graphClean
quiet : boolean
Enables the -q flag for all applicable Perforce operations. Summary details will still be displayed.
pin : String
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).
parallel
enable : boolean
path : String
threads : String
minfiles : String
minbytes : String
syncOnly
revert : boolean
have : boolean
force : boolean
modtime : boolean
quiet : boolean
Enables the -q flag for all applicable Perforce operations. Summary details will still be displayed.
pin : String
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).
parallel
enable : boolean
path : String
threads : String
minfiles : String
minbytes : String
traits
(optional)
$class: 'ApprovedPullRequestTrait'
strategyId : int
authorInChangelog
bitbucketAgedRefsTrait
retentionDays : String
bitbucketBranchCommitSkipTrait
$class: 'BitbucketBranchDiscoveryTrait'
bitbucketBuildStatusNotifications
disableNotificationForNotBuildJobs : boolean
(optional)
sendSuccessNotificationForUnstableBuild : boolean
(optional)
bitbucketCommitSkipTrait
$class: 'BitbucketGitBrowserSCMSourceTrait'
browser
assembla
repoUrl : String
$class: 'BacklogGitRepositoryBrowser'
repoName : String
repoUrl : String
bitbucketServer
repoUrl : String
bitbucket
repoUrl : String
cgit
repoUrl : String
fisheye
repoUrl : String
gitblit
repoUrl : String
projectName : String
$class: 'GitBucketBrowser'
url : String
gitLab
repoUrl : String
version : String
(optional)
gitLabBrowser
https://gitLab.example.com
then the URL for bob's skunkworks project might be https://gitLab.example.com/bob/skunkworks
.
projectUrl : String
https://gitLab.example.com
then the URL for bob's skunkworks project might be https://gitLab.example.com/bob/skunkworks
gitList
repoUrl : String
gitWeb
repoUrl : String
$class: 'GiteaBrowser'
repoUrl : String
https://gitea.example.com
then the URL for bob's skunkworks project repository might be https://gitea.example.com/bob/skunkworks
github
repoUrl : String
gitiles
repoUrl : String
$class: 'GitoriousWeb'
repoUrl : String
gogs
repoUrl : String
kiln
repoUrl : String
phabricator
repoUrl : String
repo : String
redmine
repoUrl : String
rhodeCode
repoUrl : String
$class: 'ScmManagerGitRepositoryBrowser'
repoUrl : String
jbSpace
repoUrl : String
$class: 'Stash'
repoUrl : String
$class: 'TracGitRepositoryBrowser'
$class: 'TuleapBrowser'
repositoryUrl : String
viewgit
repoUrl : String
projectName : String
$class: 'BitbucketJiraValidatorTrait'
jiraServerIdx : int
$class: 'BitbucketPullRequestDiscoveryTrait'
$class: 'BitbucketTagDiscoveryTrait'
buildStatusNameCustomPart
buildStatusNameCustomPart : String
(optional)
buildStatusNameOverwrite : boolean
(optional)
ignoreTypeInStatusName : boolean
(optional)
$class: 'ChangeDiscoveryTrait'
queryString : String
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
checkoutOption
extension
timeout : int
cleanAfterCheckout
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.
deleteUntrackedNestedRepositories : boolean
(optional)
.git
directories.
cleanBeforeCheckout
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.
deleteUntrackedNestedRepositories : boolean
(optional)
.git
directories.
$class: 'CleanMercurialSCMSourceTrait'
cloneOption
extension
shallow : boolean
noTags : boolean
reference : String
timeout : int
depth : int
(optional)
honorRefspec : boolean
(optional)
$class: 'DisableStatusUpdateTrait'
discoverOtherRefs
ref : String
The pattern under /refs on the remote repository to discover, can contain a wildcard.
Example: test/*/merged
nameMapping : String
(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}".
$class: 'FilterChecksTrait'
queryOperator
ID
, SCHEME
queryString : String
firstBuildChangelog
extension
makeChangelog : boolean
(optional)
gitLabForkDiscovery
strategyId : int
trust
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>
buildMRForksNotMirror : boolean
(optional)
browser
browser
assembla
repoUrl : String
$class: 'BacklogGitRepositoryBrowser'
repoName : String
repoUrl : String
bitbucketServer
repoUrl : String
bitbucket
repoUrl : String
cgit
repoUrl : String
fisheye
repoUrl : String
gitblit
repoUrl : String
projectName : String
$class: 'GitBucketBrowser'
url : String
gitLab
repoUrl : String
version : String
(optional)
gitLabBrowser
https://gitLab.example.com
then the URL for bob's skunkworks project might be https://gitLab.example.com/bob/skunkworks
.
projectUrl : String
https://gitLab.example.com
then the URL for bob's skunkworks project might be https://gitLab.example.com/bob/skunkworks
gitList
repoUrl : String
gitWeb
repoUrl : String
$class: 'GiteaBrowser'
repoUrl : String
https://gitea.example.com
then the URL for bob's skunkworks project repository might be https://gitea.example.com/bob/skunkworks
github
repoUrl : String
gitiles
repoUrl : String
$class: 'GitoriousWeb'
repoUrl : String
gogs
repoUrl : String
kiln
repoUrl : String
phabricator
repoUrl : String
repo : String
redmine
repoUrl : String
rhodeCode
repoUrl : String
$class: 'ScmManagerGitRepositoryBrowser'
repoUrl : String
jbSpace
repoUrl : String
$class: 'Stash'
repoUrl : String
$class: 'TracGitRepositoryBrowser'
$class: 'TuleapBrowser'
repositoryUrl : String
viewgit
repoUrl : String
projectName : String
gitHubAgedRefsTrait
retentionDays : String
gitHubBranchCommitSkipTrait
gitHubCommitSkipTrait
$class: 'GitHubJiraValidatorTrait'
jiraServerIdx : int
gitHubSourceChecks
verboseConsoleLog : boolean
(optional)
gitHubStatusChecks
name : String
(optional)
skip : boolean
(optional)
skipNotifications : boolean
(optional)
skipProgressUpdates : boolean
(optional)
suppressLogs : boolean
(optional)
unstableBuildNeutral : boolean
(optional)
lfs
gitlabAvatar
disableProjectAvatar : boolean
(optional)
gitlabMarkUnstableAsSuccess
markUnstableAsSuccess : boolean
(optional)
gitlabSkipNotifications
gitTool
gitTool : String
gitLabHookRegistration
webHookMode : String
systemHookMode : String
gitHubIgnoreDraftPullRequestFilter
ignoreOnPush
jervisFilter
This 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:
- main
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 create an allow list of branches (only) or a block list of branches (except) to be built.
# block branches from building
branches:
except:
- legacy
- experimental
# allow only these branches
branches:
only:
- main
- stable
The same YAML can be applied to tags.
# block tags from building
tags:
except:
- .*-rc
- .*-beta
# allow only these tags
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 an allow list in your main branch, then it will not propagate to other branches.
You can use regular expressions to allow or block branches:
branches:
only:
- main
- /^[.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 : String
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.
localBranch
logComment
logSuccess : boolean
(optional)
sudoUser : String
(optional)
$class: 'MercurialBrowserSCMSourceTrait'
browser
$class: 'FishEye'
url : String
$class: 'GoogleCode'
url : String
$class: 'HgWeb'
url : String
$class: 'Kallithea'
url : String
$class: 'KilnHG'
url : String
$class: 'RhodeCode'
url : String
$class: 'RhodeCodeLegacy'
url : String
$class: 'ScmManager'
url : String
http://YOURSCMMANAGER/scm/repo/NAMESPACE/NAME/
).
$class: 'MercurialInstallationSCMSourceTrait'
installation : String
multiBranchProjectDisplayNaming
displayNamingStrategy
Job display name with fallback to name:
Uses the branch source plugin's display name for the PR instead of the raw name
Value for configuration-as-code: OBJECT_DISPLAY_NAME
Name and, if available, display name:
Joins the raw name and the branch source plugin's display name
Value for configuration-as-code: RAW_AND_OBJECT_DISPLAY_NAME
OBJECT_DISPLAY_NAME
, RAW_AND_OBJECT_DISPLAY_NAME
gitHubNotificationContextTrait
contextLabel : String
typeSuffix : boolean
Appends the relevant suffix to the context label(s) based on the build type. '/pr-merge', '/pr-head' or '/branch'
multipleStatusDelimiter : String
(optional)
multipleStatuses : boolean
(optional)
gitLabOriginDiscovery
strategyId : int
$class: 'PathBasedPullRequestFilterTrait'
inclusionField : String
exclusionField : String
$class: 'PreBuildMergeTrait'
extension
options
mergeTarget : String
master
.
fastForwardMode
(optional)
FF
, FF_ONLY
, NO_FF
mergeRemote : String
(optional)
origin
, that contains the branch you specify below. If left blank, it'll default to the name of the first repository configured above.
mergeStrategy
(optional)
DEFAULT
, RESOLVE
, RECURSIVE
, OCTOPUS
, OURS
, SUBTREE
, RECURSIVE_THEIRS
$class: 'PretestedIntegrationSCMTrait'
extension
gitIntegrationStrategy
accumulated
shortCommitMessage : boolean
(optional)
ffonly
shortCommitMessage : boolean
(optional)
squash
integrationBranch : String
The branch name must match your integration branch name. No trailing slash.
git checkout -B <Branch name> <Repository name>/<Branch name> git merge --squash <Branch matched by git> git commit -C <Branch matched by git>
git checkout -B <Branch name> <Repository name>/<Branch name> git merge -m <commitMsg> <Branch matched by git> --no-ff
Changes are only ever pushed when the build results is SUCCESS
git push <Repository name> <Branch name>
repoName : String
The repository name. In git the repository is always the name of the remote. So if you have specified a repository name in your Git configuration. You need to specify the exact same name here, otherwise no integration will be performed. We do the merge based on this.
No trailing slash on repository name.
Remember to specify this when working with NAMED repositories in Git
pruneStaleBranch
pruneStaleTag
bitbucketPublicRepoPullRequestFilter
$class: 'PullRequestDiscoveryTrait'
excludeBranchesWithPRs : boolean
$class: 'PullRequestLabelsBlackListFilterTrait'
labels : String
$class: 'PullRequestLabelsMatchAllFilterTrait'
labels : String
$class: 'PullRequestLabelsMatchAnyFilterTrait'
labels : String
$class: 'PullRequestNameFilterTrait'
strategyId : int
phrase : String
ignoreCase : boolean
regex : boolean
$class: 'PullRequestSourceBranchFilterTrait'
strategyId : int
phrase : String
ignoreCase : boolean
regex : boolean
$class: 'PullRequestTargetBranchFilterTrait'
strategyId : int
phrase : String
ignoreCase : boolean
regex : boolean
refSpecs
templates
value : String
@{remote}
will be replaced by the remote name (which defaults to origin
) before use.
headRegexFilterWithPRFromOrigin
regex : String
tagRegex : String
giteaReleaseDiscovery
includePreReleases : boolean
(optional)
artifactToAssetMappingEnabled : boolean
(optional)
archiveArtifacts
) will be added as assets in the release, but only if the build was successfull.
remoteName
remoteName : String
$class: 'ScmManagerBranchDiscoveryTrait'
sparseCheckoutPaths
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
sparseCheckoutPaths
path : String
submoduleOption
extension
depth : int
(optional)
disableSubmodules : boolean
(optional)
parentCredentials : boolean
(optional)
recursiveSubmodules : boolean
(optional)
reference : String
(optional)
git init --bare git remote add SubProject1 https://gitrepo.com/subproject1 git remote add SubProject2 https://gitrepo.com/subproject2 git fetch --all
shallow : boolean
(optional)
threads : int
(optional)
timeout : int
(optional)
trackingSubmodules : boolean
(optional)
mrTriggerComment
commentBody : String
onlyTrustedMembersCanTrigger : boolean
tuleapBranchDiscovery
tuleapNotifyPullRequest
tuleapForkPullRequestDiscovery
tuleapPullRequestDiscovery
userIdentity
extension
name : String
If given, "GIT_COMMITTER_NAME=[this]" and "GIT_AUTHOR_NAME=[this]" are set for builds. This overrides whatever is in the global settings.
email : String
If given, "GIT_COMMITTER_EMAIL=[this]" and "GIT_AUTHOR_EMAIL=[this]" are set for builds. This overrides whatever is in the global settings.
bitbucketWebhookConfiguration
Sets 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 : String
WebhookListenerBuildConditionsTrait
alwaysBuildMROpen : boolean
(optional)
alwaysBuildMRReOpen : boolean
(optional)
alwaysIgnoreMRApproval : boolean
(optional)
alwaysIgnoreMRApproved : boolean
(optional)
alwaysIgnoreMRUnApproval : boolean
(optional)
alwaysIgnoreMRUnApproved : boolean
(optional)
alwaysIgnoreMRWorkInProgress : boolean
(optional)
alwaysIgnoreNonCodeRelatedUpdates : boolean
(optional)
headWildcardFilterWithPRFromOrigin
includes : String
*
as a wildcard; for example: master release*
excludes : String
release
tagIncludes : String
*
as a wildcard; for example: *-1.*
to build only 1.0 tags from the maven release plugin.
tagExcludes : String
*-0.*
$class: 'WipeWorkspaceTrait'
bitbucketBranchDiscovery
strategyId : int
bitbucketForkDiscovery
strategyId : int
trust
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.
bitbucketTrustEveryone
bitbucketTrustNobody
bitbucketTrustTeam
bitbucketPullRequestDiscovery
strategyId : int
bitbucketSshCheckout
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 : String
It must be a SSH key based credential.
bitbucketTagDiscovery
bitbucketWebhookRegistration
Overrides 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.TagDiscoveryTrait'
dagshubBranchDiscovery
$class: 'io.jenkins.plugins.dagshubbranchsource.traits.ForkPullRequestDiscoveryTrait'
buildOnPullHead : boolean
(optional)
$class: 'io.jenkins.plugins.dagshubbranchsource.traits.OriginPullRequestDiscoveryTrait'
buildOnPullHead : boolean
(optional)
dagshubTagDiscovery
gitLabBranchDiscovery
strategyId : int
branchesAlwaysIncludedRegex : String
(optional)
gitLabSshCheckout
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 : String
gitLabTagDiscovery
gitBranchDiscovery
gitTagDiscovery
headRegexFilter
regex : String
headWildcardFilter
includes : String
*
as a wildcard; for example: master release*
excludes : String
release alpha-* beta-*
headRegexFilterWithPR
regex : String
tagRegex : String
headWildcardFilterWithPR
includes : String
*
as a wildcard; for example: master release*
excludes : String
release
tagIncludes : String
*
as a wildcard; for example: *-1.*
to build only 1.0 tags from the maven release plugin.
tagExcludes : String
*-0.*
giteaBranchDiscovery
strategyId : int
giteaForkDiscovery
strategyId : int
trust
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
.
gitLabTrustMembers
bitbucketTrustTeam
bitbucketTrustEveryone
bitbucketTrustNobody
gitLabTrustEveryone
gitLabTrustNobody
gitLabTrustPermissions
giteaTrustContributors
giteaTrustEveryone
giteaTrustNobody
gitHubTrustContributors
gitHubTrustEveryone
gitHubTrustNobody
gitHubTrustPermissions
giteaPullRequestDiscovery
strategyId : int
giteaSSHCheckout
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 : String
giteaTagDiscovery
giteaWebhookRegistration
Overrides 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 : String
gitHubBranchDiscovery
strategyId : int
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.
gitHubForkDiscovery
strategyId : int
trust
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.
gitHubTrustContributors
gitHubTrustEveryone
gitHubTrustNobody
gitHubTrustPermissions
gitHubPullRequestDiscovery
strategyId : int
gitHubSshCheckout
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 : String
gitHubTagDiscovery
multiGraph
$class: 'MercurialSCMSource'
scmManager
scmManagerSvn
fromScm
jetbrains-space-code
spaceConnectionId : String
projectKey : String
repository : String
branchSpec : String
(optional)
id : String
(optional)
mergeRequestSourceBranchSpec : String
(optional)
Merge request source branch must match the specified branches.
Reference branches in the format "+|-:". Use + to include and - to exclude branches. Use * as a wildcard. Use ; to separate branches.
mergeRequestTargetBranchSpec : String
(optional)
Merge request target branch must match the specified branches.
Reference branches in the format "+|-:". Use + to include and - to exclude branches. Use * as a wildcard. Use ; to separate branches.
mergeRequestTitleRegex : String
(optional)
Merge request title must match the specified regular expression.
Regular expression must match the entire merge request title, not just a part of it. For example, to exclude all merge requests with a title starting with "WIP" from triggering builds, specify (?!WIP).+ as a regex.
spaceWebhookId : String
(optional)
traits
(optional)
$class: 'ApprovedPullRequestTrait'
strategyId : int
authorInChangelog
bitbucketAgedRefsTrait
retentionDays : String
bitbucketBranchCommitSkipTrait
$class: 'BitbucketBranchDiscoveryTrait'
bitbucketBuildStatusNotifications
disableNotificationForNotBuildJobs : boolean
(optional)
sendSuccessNotificationForUnstableBuild : boolean
(optional)
bitbucketCommitSkipTrait
$class: 'BitbucketGitBrowserSCMSourceTrait'
browser
assembla
repoUrl : String
$class: 'BacklogGitRepositoryBrowser'
repoName : String
repoUrl : String
bitbucketServer
repoUrl : String
bitbucket
repoUrl : String
cgit
repoUrl : String
fisheye
repoUrl : String
gitblit
repoUrl : String
projectName : String
$class: 'GitBucketBrowser'
url : String
gitLab
repoUrl : String
version : String
(optional)
gitLabBrowser
https://gitLab.example.com
then the URL for bob's skunkworks project might be https://gitLab.example.com/bob/skunkworks
.
projectUrl : String
https://gitLab.example.com
then the URL for bob's skunkworks project might be https://gitLab.example.com/bob/skunkworks
gitList
repoUrl : String
gitWeb
repoUrl : String
$class: 'GiteaBrowser'
repoUrl : String
https://gitea.example.com
then the URL for bob's skunkworks project repository might be https://gitea.example.com/bob/skunkworks
github
repoUrl : String
gitiles
repoUrl : String
$class: 'GitoriousWeb'
repoUrl : String
gogs
repoUrl : String
kiln
repoUrl : String
phabricator
repoUrl : String
repo : String
redmine
repoUrl : String
rhodeCode
repoUrl : String
$class: 'ScmManagerGitRepositoryBrowser'
repoUrl : String
jbSpace
repoUrl : String
$class: 'Stash'
repoUrl : String
$class: 'TracGitRepositoryBrowser'
$class: 'TuleapBrowser'
repositoryUrl : String
viewgit
repoUrl : String
projectName : String
$class: 'BitbucketJiraValidatorTrait'
jiraServerIdx : int
$class: 'BitbucketPullRequestDiscoveryTrait'
$class: 'BitbucketTagDiscoveryTrait'
buildStatusNameCustomPart
buildStatusNameCustomPart : String
(optional)
buildStatusNameOverwrite : boolean
(optional)
ignoreTypeInStatusName : boolean
(optional)
$class: 'ChangeDiscoveryTrait'
queryString : String
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
checkoutOption
extension
timeout : int
cleanAfterCheckout
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.
deleteUntrackedNestedRepositories : boolean
(optional)
.git
directories.
cleanBeforeCheckout
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.
deleteUntrackedNestedRepositories : boolean
(optional)
.git
directories.
$class: 'CleanMercurialSCMSourceTrait'
cloneOption
extension
shallow : boolean
noTags : boolean
reference : String
timeout : int
depth : int
(optional)
honorRefspec : boolean
(optional)
$class: 'DisableStatusUpdateTrait'
discoverOtherRefs
ref : String
The pattern under /refs on the remote repository to discover, can contain a wildcard.
Example: test/*/merged
nameMapping : String
(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}".
$class: 'FilterChecksTrait'
queryOperator
ID
, SCHEME
queryString : String
firstBuildChangelog
extension
makeChangelog : boolean
(optional)
gitLabForkDiscovery
strategyId : int
trust
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>
buildMRForksNotMirror : boolean
(optional)
browser
browser
assembla
repoUrl : String
$class: 'BacklogGitRepositoryBrowser'
repoName : String
repoUrl : String
bitbucketServer
repoUrl : String
bitbucket
repoUrl : String
cgit
repoUrl : String
fisheye
repoUrl : String
gitblit
repoUrl : String
projectName : String
$class: 'GitBucketBrowser'
url : String
gitLab
repoUrl : String
version : String
(optional)
gitLabBrowser
https://gitLab.example.com
then the URL for bob's skunkworks project might be https://gitLab.example.com/bob/skunkworks
.
projectUrl : String
https://gitLab.example.com
then the URL for bob's skunkworks project might be https://gitLab.example.com/bob/skunkworks
gitList
repoUrl : String
gitWeb
repoUrl : String
$class: 'GiteaBrowser'
repoUrl : String
https://gitea.example.com
then the URL for bob's skunkworks project repository might be https://gitea.example.com/bob/skunkworks
github
repoUrl : String
gitiles
repoUrl : String
$class: 'GitoriousWeb'
repoUrl : String
gogs
repoUrl : String
kiln
repoUrl : String
phabricator
repoUrl : String
repo : String
redmine
repoUrl : String
rhodeCode
repoUrl : String
$class: 'ScmManagerGitRepositoryBrowser'
repoUrl : String
jbSpace
repoUrl : String
$class: 'Stash'
repoUrl : String
$class: 'TracGitRepositoryBrowser'
$class: 'TuleapBrowser'
repositoryUrl : String
viewgit
repoUrl : String
projectName : String
gitHubAgedRefsTrait
retentionDays : String
gitHubBranchCommitSkipTrait
gitHubCommitSkipTrait
$class: 'GitHubJiraValidatorTrait'
jiraServerIdx : int
gitHubSourceChecks
verboseConsoleLog : boolean
(optional)
gitHubStatusChecks
name : String
(optional)
skip : boolean
(optional)
skipNotifications : boolean
(optional)
skipProgressUpdates : boolean
(optional)
suppressLogs : boolean
(optional)
unstableBuildNeutral : boolean
(optional)
lfs
gitlabAvatar
disableProjectAvatar : boolean
(optional)
gitlabMarkUnstableAsSuccess
markUnstableAsSuccess : boolean
(optional)
gitlabSkipNotifications
gitTool
gitTool : String
gitLabHookRegistration
webHookMode : String
systemHookMode : String
gitHubIgnoreDraftPullRequestFilter
ignoreOnPush
jervisFilter
This 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:
- main
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 create an allow list of branches (only) or a block list of branches (except) to be built.
# block branches from building
branches:
except:
- legacy
- experimental
# allow only these branches
branches:
only:
- main
- stable
The same YAML can be applied to tags.
# block tags from building
tags:
except:
- .*-rc
- .*-beta
# allow only these tags
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 an allow list in your main branch, then it will not propagate to other branches.
You can use regular expressions to allow or block branches:
branches:
only:
- main
- /^[.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 : String
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.
localBranch
logComment
logSuccess : boolean
(optional)
sudoUser : String
(optional)
$class: 'MercurialBrowserSCMSourceTrait'
browser
$class: 'FishEye'
url : String
$class: 'GoogleCode'
url : String
$class: 'HgWeb'
url : String
$class: 'Kallithea'
url : String
$class: 'KilnHG'
url : String
$class: 'RhodeCode'
url : String
$class: 'RhodeCodeLegacy'
url : String
$class: 'ScmManager'
url : String
http://YOURSCMMANAGER/scm/repo/NAMESPACE/NAME/
).
$class: 'MercurialInstallationSCMSourceTrait'
installation : String
multiBranchProjectDisplayNaming
displayNamingStrategy
Job display name with fallback to name:
Uses the branch source plugin's display name for the PR instead of the raw name
Value for configuration-as-code: OBJECT_DISPLAY_NAME
Name and, if available, display name:
Joins the raw name and the branch source plugin's display name
Value for configuration-as-code: RAW_AND_OBJECT_DISPLAY_NAME
OBJECT_DISPLAY_NAME
, RAW_AND_OBJECT_DISPLAY_NAME
gitHubNotificationContextTrait
contextLabel : String
typeSuffix : boolean
Appends the relevant suffix to the context label(s) based on the build type. '/pr-merge', '/pr-head' or '/branch'
multipleStatusDelimiter : String
(optional)
multipleStatuses : boolean
(optional)
gitLabOriginDiscovery
strategyId : int
$class: 'PathBasedPullRequestFilterTrait'
inclusionField : String
exclusionField : String
$class: 'PreBuildMergeTrait'
extension
options
mergeTarget : String
master
.
fastForwardMode
(optional)
FF
, FF_ONLY
, NO_FF
mergeRemote : String
(optional)
origin
, that contains the branch you specify below. If left blank, it'll default to the name of the first repository configured above.
mergeStrategy
(optional)
DEFAULT
, RESOLVE
, RECURSIVE
, OCTOPUS
, OURS
, SUBTREE
, RECURSIVE_THEIRS
$class: 'PretestedIntegrationSCMTrait'
extension
gitIntegrationStrategy
accumulated
shortCommitMessage : boolean
(optional)
ffonly
shortCommitMessage : boolean
(optional)
squash
integrationBranch : String
The branch name must match your integration branch name. No trailing slash.
git checkout -B <Branch name> <Repository name>/<Branch name> git merge --squash <Branch matched by git> git commit -C <Branch matched by git>
git checkout -B <Branch name> <Repository name>/<Branch name> git merge -m <commitMsg> <Branch matched by git> --no-ff
Changes are only ever pushed when the build results is SUCCESS
git push <Repository name> <Branch name>
repoName : String
The repository name. In git the repository is always the name of the remote. So if you have specified a repository name in your Git configuration. You need to specify the exact same name here, otherwise no integration will be performed. We do the merge based on this.
No trailing slash on repository name.
Remember to specify this when working with NAMED repositories in Git
pruneStaleBranch
pruneStaleTag
bitbucketPublicRepoPullRequestFilter
$class: 'PullRequestDiscoveryTrait'
excludeBranchesWithPRs : boolean
$class: 'PullRequestLabelsBlackListFilterTrait'
labels : String
$class: 'PullRequestLabelsMatchAllFilterTrait'
labels : String
$class: 'PullRequestLabelsMatchAnyFilterTrait'
labels : String
$class: 'PullRequestNameFilterTrait'
strategyId : int
phrase : String
ignoreCase : boolean
regex : boolean
$class: 'PullRequestSourceBranchFilterTrait'
strategyId : int
phrase : String
ignoreCase : boolean
regex : boolean
$class: 'PullRequestTargetBranchFilterTrait'
strategyId : int
phrase : String
ignoreCase : boolean
regex : boolean
refSpecs
templates
value : String
@{remote}
will be replaced by the remote name (which defaults to origin
) before use.
headRegexFilterWithPRFromOrigin
regex : String
tagRegex : String
giteaReleaseDiscovery
includePreReleases : boolean
(optional)
artifactToAssetMappingEnabled : boolean
(optional)
archiveArtifacts
) will be added as assets in the release, but only if the build was successfull.
remoteName
remoteName : String
$class: 'ScmManagerBranchDiscoveryTrait'
sparseCheckoutPaths
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
sparseCheckoutPaths
path : String
submoduleOption
extension
depth : int
(optional)
disableSubmodules : boolean
(optional)
parentCredentials : boolean
(optional)
recursiveSubmodules : boolean
(optional)
reference : String
(optional)
git init --bare git remote add SubProject1 https://gitrepo.com/subproject1 git remote add SubProject2 https://gitrepo.com/subproject2 git fetch --all
shallow : boolean
(optional)
threads : int
(optional)
timeout : int
(optional)
trackingSubmodules : boolean
(optional)
mrTriggerComment
commentBody : String
onlyTrustedMembersCanTrigger : boolean
tuleapBranchDiscovery
tuleapNotifyPullRequest
tuleapForkPullRequestDiscovery
tuleapPullRequestDiscovery
userIdentity
extension
name : String
If given, "GIT_COMMITTER_NAME=[this]" and "GIT_AUTHOR_NAME=[this]" are set for builds. This overrides whatever is in the global settings.
email : String
If given, "GIT_COMMITTER_EMAIL=[this]" and "GIT_AUTHOR_EMAIL=[this]" are set for builds. This overrides whatever is in the global settings.
bitbucketWebhookConfiguration
Sets 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 : String
WebhookListenerBuildConditionsTrait
alwaysBuildMROpen : boolean
(optional)
alwaysBuildMRReOpen : boolean
(optional)
alwaysIgnoreMRApproval : boolean
(optional)
alwaysIgnoreMRApproved : boolean
(optional)
alwaysIgnoreMRUnApproval : boolean
(optional)
alwaysIgnoreMRUnApproved : boolean
(optional)
alwaysIgnoreMRWorkInProgress : boolean
(optional)
alwaysIgnoreNonCodeRelatedUpdates : boolean
(optional)
headWildcardFilterWithPRFromOrigin
includes : String
*
as a wildcard; for example: master release*
excludes : String
release
tagIncludes : String
*
as a wildcard; for example: *-1.*
to build only 1.0 tags from the maven release plugin.
tagExcludes : String
*-0.*
$class: 'WipeWorkspaceTrait'
bitbucketBranchDiscovery
strategyId : int
bitbucketForkDiscovery
strategyId : int
trust
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.
bitbucketTrustEveryone
bitbucketTrustNobody
bitbucketTrustTeam
bitbucketPullRequestDiscovery
strategyId : int
bitbucketSshCheckout
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 : String
It must be a SSH key based credential.
bitbucketTagDiscovery
bitbucketWebhookRegistration
Overrides 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.TagDiscoveryTrait'
dagshubBranchDiscovery
$class: 'io.jenkins.plugins.dagshubbranchsource.traits.ForkPullRequestDiscoveryTrait'
buildOnPullHead : boolean
(optional)
$class: 'io.jenkins.plugins.dagshubbranchsource.traits.OriginPullRequestDiscoveryTrait'
buildOnPullHead : boolean
(optional)
dagshubTagDiscovery
gitLabBranchDiscovery
strategyId : int
branchesAlwaysIncludedRegex : String
(optional)
gitLabSshCheckout
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 : String
gitLabTagDiscovery
gitBranchDiscovery
gitTagDiscovery
headRegexFilter
regex : String
headWildcardFilter
includes : String
*
as a wildcard; for example: master release*
excludes : String
release alpha-* beta-*
headRegexFilterWithPR
regex : String
tagRegex : String
headWildcardFilterWithPR
includes : String
*
as a wildcard; for example: master release*
excludes : String
release
tagIncludes : String
*
as a wildcard; for example: *-1.*
to build only 1.0 tags from the maven release plugin.
tagExcludes : String
*-0.*
giteaBranchDiscovery
strategyId : int
giteaForkDiscovery
strategyId : int
trust
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
.
gitLabTrustMembers
bitbucketTrustTeam
bitbucketTrustEveryone
bitbucketTrustNobody
gitLabTrustEveryone
gitLabTrustNobody
gitLabTrustPermissions
giteaTrustContributors
giteaTrustEveryone
giteaTrustNobody
gitHubTrustContributors
gitHubTrustEveryone
gitHubTrustNobody
gitHubTrustPermissions
giteaPullRequestDiscovery
strategyId : int
giteaSSHCheckout
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 : String
giteaTagDiscovery
giteaWebhookRegistration
Overrides 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 : String
gitHubBranchDiscovery
strategyId : int
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.
gitHubForkDiscovery
strategyId : int
trust
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.
gitHubTrustContributors
gitHubTrustEveryone
gitHubTrustNobody
gitHubTrustPermissions
gitHubPullRequestDiscovery
strategyId : int
gitHubSshCheckout
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 : String
gitHubTagDiscovery
type
(optional)
Branches
, MergeRequests
multiStreams
$class: 'SubversionSCMSource'
multiSwarm
Tuleap
BbS
credentialsId : String
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.
sshCredentialsId : String
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:
traits
$class: 'ApprovedPullRequestTrait'
strategyId : int
authorInChangelog
bitbucketAgedRefsTrait
retentionDays : String
bitbucketBranchCommitSkipTrait
$class: 'BitbucketBranchDiscoveryTrait'
bitbucketBuildStatusNotifications
disableNotificationForNotBuildJobs : boolean
(optional)
sendSuccessNotificationForUnstableBuild : boolean
(optional)
bitbucketCommitSkipTrait
$class: 'BitbucketGitBrowserSCMSourceTrait'
browser
assembla
repoUrl : String
$class: 'BacklogGitRepositoryBrowser'
repoName : String
repoUrl : String
bitbucketServer
repoUrl : String
bitbucket
repoUrl : String
cgit
repoUrl : String
fisheye
repoUrl : String
gitblit
repoUrl : String
projectName : String
$class: 'GitBucketBrowser'
url : String
gitLab
repoUrl : String
version : String
(optional)
gitLabBrowser
https://gitLab.example.com
then the URL for bob's skunkworks project might be https://gitLab.example.com/bob/skunkworks
.
projectUrl : String
https://gitLab.example.com
then the URL for bob's skunkworks project might be https://gitLab.example.com/bob/skunkworks
gitList
repoUrl : String
gitWeb
repoUrl : String
$class: 'GiteaBrowser'
repoUrl : String
https://gitea.example.com
then the URL for bob's skunkworks project repository might be https://gitea.example.com/bob/skunkworks
github
repoUrl : String
gitiles
repoUrl : String
$class: 'GitoriousWeb'
repoUrl : String
gogs
repoUrl : String
kiln
repoUrl : String
phabricator
repoUrl : String
repo : String
redmine
repoUrl : String
rhodeCode
repoUrl : String
$class: 'ScmManagerGitRepositoryBrowser'
repoUrl : String
jbSpace
repoUrl : String
$class: 'Stash'
repoUrl : String
$class: 'TracGitRepositoryBrowser'
$class: 'TuleapBrowser'
repositoryUrl : String
viewgit
repoUrl : String
projectName : String
$class: 'BitbucketJiraValidatorTrait'
jiraServerIdx : int
$class: 'BitbucketPullRequestDiscoveryTrait'
$class: 'BitbucketTagDiscoveryTrait'
buildStatusNameCustomPart
buildStatusNameCustomPart : String
(optional)
buildStatusNameOverwrite : boolean
(optional)
ignoreTypeInStatusName : boolean
(optional)
$class: 'ChangeDiscoveryTrait'
queryString : String
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
checkoutOption
extension
timeout : int
cleanAfterCheckout
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.
deleteUntrackedNestedRepositories : boolean
(optional)
.git
directories.
cleanBeforeCheckout
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.
deleteUntrackedNestedRepositories : boolean
(optional)
.git
directories.
$class: 'CleanMercurialSCMSourceTrait'
cloneOption
extension
shallow : boolean
noTags : boolean
reference : String
timeout : int
depth : int
(optional)
honorRefspec : boolean
(optional)
$class: 'DisableStatusUpdateTrait'
discoverOtherRefs
ref : String
The pattern under /refs on the remote repository to discover, can contain a wildcard.
Example: test/*/merged
nameMapping : String
(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}".
$class: 'FilterChecksTrait'
queryOperator
ID
, SCHEME
queryString : String
firstBuildChangelog
extension
makeChangelog : boolean
(optional)
gitLabForkDiscovery
strategyId : int
trust
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>
buildMRForksNotMirror : boolean
(optional)
browser
browser
assembla
repoUrl : String
$class: 'BacklogGitRepositoryBrowser'
repoName : String
repoUrl : String
bitbucketServer
repoUrl : String
bitbucket
repoUrl : String
cgit
repoUrl : String
fisheye
repoUrl : String
gitblit
repoUrl : String
projectName : String
$class: 'GitBucketBrowser'
url : String
gitLab
repoUrl : String
version : String
(optional)
gitLabBrowser
https://gitLab.example.com
then the URL for bob's skunkworks project might be https://gitLab.example.com/bob/skunkworks
.
projectUrl : String
https://gitLab.example.com
then the URL for bob's skunkworks project might be https://gitLab.example.com/bob/skunkworks
gitList
repoUrl : String
gitWeb
repoUrl : String
$class: 'GiteaBrowser'
repoUrl : String
https://gitea.example.com
then the URL for bob's skunkworks project repository might be https://gitea.example.com/bob/skunkworks
github
repoUrl : String
gitiles
repoUrl : String
$class: 'GitoriousWeb'
repoUrl : String
gogs
repoUrl : String
kiln
repoUrl : String
phabricator
repoUrl : String
repo : String
redmine
repoUrl : String
rhodeCode
repoUrl : String
$class: 'ScmManagerGitRepositoryBrowser'
repoUrl : String
jbSpace
repoUrl : String
$class: 'Stash'
repoUrl : String
$class: 'TracGitRepositoryBrowser'
$class: 'TuleapBrowser'
repositoryUrl : String
viewgit
repoUrl : String
projectName : String
gitHubAgedRefsTrait
retentionDays : String
gitHubBranchCommitSkipTrait
gitHubCommitSkipTrait
$class: 'GitHubJiraValidatorTrait'
jiraServerIdx : int
gitHubSourceChecks
verboseConsoleLog : boolean
(optional)
gitHubStatusChecks
name : String
(optional)
skip : boolean
(optional)
skipNotifications : boolean
(optional)
skipProgressUpdates : boolean
(optional)
suppressLogs : boolean
(optional)
unstableBuildNeutral : boolean
(optional)
lfs
gitlabAvatar
disableProjectAvatar : boolean
(optional)
gitlabMarkUnstableAsSuccess
markUnstableAsSuccess : boolean
(optional)
gitlabSkipNotifications
gitTool
gitTool : String
gitLabHookRegistration
webHookMode : String
systemHookMode : String
gitHubIgnoreDraftPullRequestFilter
ignoreOnPush
jervisFilter
This 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:
- main
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 create an allow list of branches (only) or a block list of branches (except) to be built.
# block branches from building
branches:
except:
- legacy
- experimental
# allow only these branches
branches:
only:
- main
- stable
The same YAML can be applied to tags.
# block tags from building
tags:
except:
- .*-rc
- .*-beta
# allow only these tags
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 an allow list in your main branch, then it will not propagate to other branches.
You can use regular expressions to allow or block branches:
branches:
only:
- main
- /^[.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 : String
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.
localBranch
logComment
logSuccess : boolean
(optional)
sudoUser : String
(optional)
$class: 'MercurialBrowserSCMSourceTrait'
browser
$class: 'FishEye'
url : String
$class: 'GoogleCode'
url : String
$class: 'HgWeb'
url : String
$class: 'Kallithea'
url : String
$class: 'KilnHG'
url : String
$class: 'RhodeCode'
url : String
$class: 'RhodeCodeLegacy'
url : String
$class: 'ScmManager'
url : String
http://YOURSCMMANAGER/scm/repo/NAMESPACE/NAME/
).
$class: 'MercurialInstallationSCMSourceTrait'
installation : String
multiBranchProjectDisplayNaming
displayNamingStrategy
Job display name with fallback to name:
Uses the branch source plugin's display name for the PR instead of the raw name
Value for configuration-as-code: OBJECT_DISPLAY_NAME
Name and, if available, display name:
Joins the raw name and the branch source plugin's display name
Value for configuration-as-code: RAW_AND_OBJECT_DISPLAY_NAME
OBJECT_DISPLAY_NAME
, RAW_AND_OBJECT_DISPLAY_NAME
gitHubNotificationContextTrait
contextLabel : String
typeSuffix : boolean
Appends the relevant suffix to the context label(s) based on the build type. '/pr-merge', '/pr-head' or '/branch'
multipleStatusDelimiter : String
(optional)
multipleStatuses : boolean
(optional)
gitLabOriginDiscovery
strategyId : int
$class: 'PathBasedPullRequestFilterTrait'
inclusionField : String
exclusionField : String
$class: 'PreBuildMergeTrait'
extension
options
mergeTarget : String
master
.
fastForwardMode
(optional)
FF
, FF_ONLY
, NO_FF
mergeRemote : String
(optional)
origin
, that contains the branch you specify below. If left blank, it'll default to the name of the first repository configured above.
mergeStrategy
(optional)
DEFAULT
, RESOLVE
, RECURSIVE
, OCTOPUS
, OURS
, SUBTREE
, RECURSIVE_THEIRS
$class: 'PretestedIntegrationSCMTrait'
extension
gitIntegrationStrategy
accumulated
shortCommitMessage : boolean
(optional)
ffonly
shortCommitMessage : boolean
(optional)
squash
integrationBranch : String
The branch name must match your integration branch name. No trailing slash.
git checkout -B <Branch name> <Repository name>/<Branch name> git merge --squash <Branch matched by git> git commit -C <Branch matched by git>
git checkout -B <Branch name> <Repository name>/<Branch name> git merge -m <commitMsg> <Branch matched by git> --no-ff
Changes are only ever pushed when the build results is SUCCESS
git push <Repository name> <Branch name>
repoName : String
The repository name. In git the repository is always the name of the remote. So if you have specified a repository name in your Git configuration. You need to specify the exact same name here, otherwise no integration will be performed. We do the merge based on this.
No trailing slash on repository name.
Remember to specify this when working with NAMED repositories in Git
pruneStaleBranch
pruneStaleTag
bitbucketPublicRepoPullRequestFilter
$class: 'PullRequestDiscoveryTrait'
excludeBranchesWithPRs : boolean
$class: 'PullRequestLabelsBlackListFilterTrait'
labels : String
$class: 'PullRequestLabelsMatchAllFilterTrait'
labels : String
$class: 'PullRequestLabelsMatchAnyFilterTrait'
labels : String
$class: 'PullRequestNameFilterTrait'
strategyId : int
phrase : String
ignoreCase : boolean
regex : boolean
$class: 'PullRequestSourceBranchFilterTrait'
strategyId : int
phrase : String
ignoreCase : boolean
regex : boolean
$class: 'PullRequestTargetBranchFilterTrait'
strategyId : int
phrase : String
ignoreCase : boolean
regex : boolean
refSpecs
templates
value : String
@{remote}
will be replaced by the remote name (which defaults to origin
) before use.
headRegexFilterWithPRFromOrigin
regex : String
tagRegex : String
giteaReleaseDiscovery
includePreReleases : boolean
(optional)
artifactToAssetMappingEnabled : boolean
(optional)
archiveArtifacts
) will be added as assets in the release, but only if the build was successfull.
remoteName
remoteName : String
$class: 'ScmManagerBranchDiscoveryTrait'
sparseCheckoutPaths
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
sparseCheckoutPaths
path : String
submoduleOption
extension
depth : int
(optional)
disableSubmodules : boolean
(optional)
parentCredentials : boolean
(optional)
recursiveSubmodules : boolean
(optional)
reference : String
(optional)
git init --bare git remote add SubProject1 https://gitrepo.com/subproject1 git remote add SubProject2 https://gitrepo.com/subproject2 git fetch --all
shallow : boolean
(optional)
threads : int
(optional)
timeout : int
(optional)
trackingSubmodules : boolean
(optional)
mrTriggerComment
commentBody : String
onlyTrustedMembersCanTrigger : boolean
tuleapBranchDiscovery
tuleapNotifyPullRequest
tuleapForkPullRequestDiscovery
tuleapPullRequestDiscovery
userIdentity
extension
name : String
If given, "GIT_COMMITTER_NAME=[this]" and "GIT_AUTHOR_NAME=[this]" are set for builds. This overrides whatever is in the global settings.
email : String
If given, "GIT_COMMITTER_EMAIL=[this]" and "GIT_AUTHOR_EMAIL=[this]" are set for builds. This overrides whatever is in the global settings.
bitbucketWebhookConfiguration
Sets 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 : String
WebhookListenerBuildConditionsTrait
alwaysBuildMROpen : boolean
(optional)
alwaysBuildMRReOpen : boolean
(optional)
alwaysIgnoreMRApproval : boolean
(optional)
alwaysIgnoreMRApproved : boolean
(optional)
alwaysIgnoreMRUnApproval : boolean
(optional)
alwaysIgnoreMRUnApproved : boolean
(optional)
alwaysIgnoreMRWorkInProgress : boolean
(optional)
alwaysIgnoreNonCodeRelatedUpdates : boolean
(optional)
headWildcardFilterWithPRFromOrigin
includes : String
*
as a wildcard; for example: master release*
excludes : String
release
tagIncludes : String
*
as a wildcard; for example: *-1.*
to build only 1.0 tags from the maven release plugin.
tagExcludes : String
*-0.*
$class: 'WipeWorkspaceTrait'
bitbucketBranchDiscovery
strategyId : int
bitbucketForkDiscovery
strategyId : int
trust
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.
bitbucketTrustEveryone
bitbucketTrustNobody
bitbucketTrustTeam
bitbucketPullRequestDiscovery
strategyId : int
bitbucketSshCheckout
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 : String
It must be a SSH key based credential.
bitbucketTagDiscovery
bitbucketWebhookRegistration
Overrides 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.TagDiscoveryTrait'
dagshubBranchDiscovery
$class: 'io.jenkins.plugins.dagshubbranchsource.traits.ForkPullRequestDiscoveryTrait'
buildOnPullHead : boolean
(optional)
$class: 'io.jenkins.plugins.dagshubbranchsource.traits.OriginPullRequestDiscoveryTrait'
buildOnPullHead : boolean
(optional)
dagshubTagDiscovery
gitLabBranchDiscovery
strategyId : int
branchesAlwaysIncludedRegex : String
(optional)
gitLabSshCheckout
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 : String
gitLabTagDiscovery
gitBranchDiscovery
gitTagDiscovery
headRegexFilter
regex : String
headWildcardFilter
includes : String
*
as a wildcard; for example: master release*
excludes : String
release alpha-* beta-*
headRegexFilterWithPR
regex : String
tagRegex : String
headWildcardFilterWithPR
includes : String
*
as a wildcard; for example: master release*
excludes : String
release
tagIncludes : String
*
as a wildcard; for example: *-1.*
to build only 1.0 tags from the maven release plugin.
tagExcludes : String
*-0.*
giteaBranchDiscovery
strategyId : int
giteaForkDiscovery
strategyId : int
trust
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
.
gitLabTrustMembers
bitbucketTrustTeam
bitbucketTrustEveryone
bitbucketTrustNobody
gitLabTrustEveryone
gitLabTrustNobody
gitLabTrustPermissions
giteaTrustContributors
giteaTrustEveryone
giteaTrustNobody
gitHubTrustContributors
gitHubTrustEveryone
gitHubTrustNobody
gitHubTrustPermissions
giteaPullRequestDiscovery
strategyId : int
giteaSSHCheckout
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 : String
giteaTagDiscovery
giteaWebhookRegistration
Overrides 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 : String
gitHubBranchDiscovery
strategyId : int
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.
gitHubForkDiscovery
strategyId : int
trust
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.
gitHubTrustContributors
gitHubTrustEveryone
gitHubTrustNobody
gitHubTrustPermissions
gitHubPullRequestDiscovery
strategyId : int
gitHubSshCheckout
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 : String
gitHubTagDiscovery
projectName : String
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.
repositoryName : String
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.
serverId : String
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.
mirrorName : String
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.
id : String
(optional)
bitbucket
repoOwner : String
It could be a Bitbucket Project also, if using Bitbucket Server. In this case (Bitbucket Server):
repository : String
autoRegisterHook : boolean
(optional)
bitbucketServerUrl : String
(optional)
checkoutCredentialsId : String
(optional)
credentialsId : String
(optional)
For security reasons most credentials are only available when HTTPS is used.
excludes : String
(optional)
id : String
(optional)
includes : String
(optional)
mirrorId : String
(optional)
serverUrl : String
(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.
traits
(optional)
$class: 'ApprovedPullRequestTrait'
strategyId : int
authorInChangelog
bitbucketAgedRefsTrait
retentionDays : String
bitbucketBranchCommitSkipTrait
$class: 'BitbucketBranchDiscoveryTrait'
bitbucketBuildStatusNotifications
disableNotificationForNotBuildJobs : boolean
(optional)
sendSuccessNotificationForUnstableBuild : boolean
(optional)
bitbucketCommitSkipTrait
$class: 'BitbucketGitBrowserSCMSourceTrait'
browser
assembla
repoUrl : String
$class: 'BacklogGitRepositoryBrowser'
repoName : String
repoUrl : String
bitbucketServer
repoUrl : String
bitbucket
repoUrl : String
cgit
repoUrl : String
fisheye
repoUrl : String
gitblit
repoUrl : String
projectName : String
$class: 'GitBucketBrowser'
url : String
gitLab
repoUrl : String
version : String
(optional)
gitLabBrowser
https://gitLab.example.com
then the URL for bob's skunkworks project might be https://gitLab.example.com/bob/skunkworks
.
projectUrl : String
https://gitLab.example.com
then the URL for bob's skunkworks project might be https://gitLab.example.com/bob/skunkworks
gitList
repoUrl : String
gitWeb
repoUrl : String
$class: 'GiteaBrowser'
repoUrl : String
https://gitea.example.com
then the URL for bob's skunkworks project repository might be https://gitea.example.com/bob/skunkworks
github
repoUrl : String
gitiles
repoUrl : String
$class: 'GitoriousWeb'
repoUrl : String
gogs
repoUrl : String
kiln
repoUrl : String
phabricator
repoUrl : String
repo : String
redmine
repoUrl : String
rhodeCode
repoUrl : String
$class: 'ScmManagerGitRepositoryBrowser'
repoUrl : String
jbSpace
repoUrl : String
$class: 'Stash'
repoUrl : String
$class: 'TracGitRepositoryBrowser'
$class: 'TuleapBrowser'
repositoryUrl : String
viewgit
repoUrl : String
projectName : String
$class: 'BitbucketJiraValidatorTrait'
jiraServerIdx : int
$class: 'BitbucketPullRequestDiscoveryTrait'
$class: 'BitbucketTagDiscoveryTrait'
buildStatusNameCustomPart
buildStatusNameCustomPart : String
(optional)
buildStatusNameOverwrite : boolean
(optional)
ignoreTypeInStatusName : boolean
(optional)
$class: 'ChangeDiscoveryTrait'
queryString : String
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
checkoutOption
extension
timeout : int
cleanAfterCheckout
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.
deleteUntrackedNestedRepositories : boolean
(optional)
.git
directories.
cleanBeforeCheckout
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.
deleteUntrackedNestedRepositories : boolean
(optional)
.git
directories.
$class: 'CleanMercurialSCMSourceTrait'
cloneOption
extension
shallow : boolean
noTags : boolean
reference : String
timeout : int
depth : int
(optional)
honorRefspec : boolean
(optional)
$class: 'DisableStatusUpdateTrait'
discoverOtherRefs
ref : String
The pattern under /refs on the remote repository to discover, can contain a wildcard.
Example: test/*/merged
nameMapping : String
(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}".
$class: 'FilterChecksTrait'
queryOperator
ID
, SCHEME
queryString : String
firstBuildChangelog
extension
makeChangelog : boolean
(optional)
gitLabForkDiscovery
strategyId : int
trust
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>
buildMRForksNotMirror : boolean
(optional)
browser
browser
assembla
repoUrl : String
$class: 'BacklogGitRepositoryBrowser'
repoName : String
repoUrl : String
bitbucketServer
repoUrl : String
bitbucket
repoUrl : String
cgit
repoUrl : String
fisheye
repoUrl : String
gitblit
repoUrl : String
projectName : String
$class: 'GitBucketBrowser'
url : String
gitLab
repoUrl : String
version : String
(optional)
gitLabBrowser
https://gitLab.example.com
then the URL for bob's skunkworks project might be https://gitLab.example.com/bob/skunkworks
.
projectUrl : String
https://gitLab.example.com
then the URL for bob's skunkworks project might be https://gitLab.example.com/bob/skunkworks
gitList
repoUrl : String
gitWeb
repoUrl : String
$class: 'GiteaBrowser'
repoUrl : String
https://gitea.example.com
then the URL for bob's skunkworks project repository might be https://gitea.example.com/bob/skunkworks
github
repoUrl : String
gitiles
repoUrl : String
$class: 'GitoriousWeb'
repoUrl : String
gogs
repoUrl : String
kiln
repoUrl : String
phabricator
repoUrl : String
repo : String
redmine
repoUrl : String
rhodeCode
repoUrl : String
$class: 'ScmManagerGitRepositoryBrowser'
repoUrl : String
jbSpace
repoUrl : String
$class: 'Stash'
repoUrl : String
$class: 'TracGitRepositoryBrowser'
$class: 'TuleapBrowser'
repositoryUrl : String
viewgit
repoUrl : String
projectName : String
gitHubAgedRefsTrait
retentionDays : String
gitHubBranchCommitSkipTrait
gitHubCommitSkipTrait
$class: 'GitHubJiraValidatorTrait'
jiraServerIdx : int
gitHubSourceChecks
verboseConsoleLog : boolean
(optional)
gitHubStatusChecks
name : String
(optional)
skip : boolean
(optional)
skipNotifications : boolean
(optional)
skipProgressUpdates : boolean
(optional)
suppressLogs : boolean
(optional)
unstableBuildNeutral : boolean
(optional)
lfs
gitlabAvatar
disableProjectAvatar : boolean
(optional)
gitlabMarkUnstableAsSuccess
markUnstableAsSuccess : boolean
(optional)
gitlabSkipNotifications
gitTool
gitTool : String
gitLabHookRegistration
webHookMode : String
systemHookMode : String
gitHubIgnoreDraftPullRequestFilter
ignoreOnPush
jervisFilter
This 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:
- main
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 create an allow list of branches (only) or a block list of branches (except) to be built.
# block branches from building
branches:
except:
- legacy
- experimental
# allow only these branches
branches:
only:
- main
- stable
The same YAML can be applied to tags.
# block tags from building
tags:
except:
- .*-rc
- .*-beta
# allow only these tags
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 an allow list in your main branch, then it will not propagate to other branches.
You can use regular expressions to allow or block branches:
branches:
only:
- main
- /^[.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 : String
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.
localBranch
logComment
logSuccess : boolean
(optional)
sudoUser : String
(optional)
$class: 'MercurialBrowserSCMSourceTrait'
browser
$class: 'FishEye'
url : String
$class: 'GoogleCode'
url : String
$class: 'HgWeb'
url : String
$class: 'Kallithea'
url : String
$class: 'KilnHG'
url : String
$class: 'RhodeCode'
url : String
$class: 'RhodeCodeLegacy'
url : String
$class: 'ScmManager'
url : String
http://YOURSCMMANAGER/scm/repo/NAMESPACE/NAME/
).
$class: 'MercurialInstallationSCMSourceTrait'
installation : String
multiBranchProjectDisplayNaming
displayNamingStrategy
Job display name with fallback to name:
Uses the branch source plugin's display name for the PR instead of the raw name
Value for configuration-as-code: OBJECT_DISPLAY_NAME
Name and, if available, display name:
Joins the raw name and the branch source plugin's display name
Value for configuration-as-code: RAW_AND_OBJECT_DISPLAY_NAME
OBJECT_DISPLAY_NAME
, RAW_AND_OBJECT_DISPLAY_NAME
gitHubNotificationContextTrait
contextLabel : String
typeSuffix : boolean
Appends the relevant suffix to the context label(s) based on the build type. '/pr-merge', '/pr-head' or '/branch'
multipleStatusDelimiter : String
(optional)
multipleStatuses : boolean
(optional)
gitLabOriginDiscovery
strategyId : int
$class: 'PathBasedPullRequestFilterTrait'
inclusionField : String
exclusionField : String
$class: 'PreBuildMergeTrait'
extension
options
mergeTarget : String
master
.
fastForwardMode
(optional)
FF
, FF_ONLY
, NO_FF
mergeRemote : String
(optional)
origin
, that contains the branch you specify below. If left blank, it'll default to the name of the first repository configured above.
mergeStrategy
(optional)
DEFAULT
, RESOLVE
, RECURSIVE
, OCTOPUS
, OURS
, SUBTREE
, RECURSIVE_THEIRS
$class: 'PretestedIntegrationSCMTrait'
extension
gitIntegrationStrategy
accumulated
shortCommitMessage : boolean
(optional)
ffonly
shortCommitMessage : boolean
(optional)
squash
integrationBranch : String
The branch name must match your integration branch name. No trailing slash.
git checkout -B <Branch name> <Repository name>/<Branch name> git merge --squash <Branch matched by git> git commit -C <Branch matched by git>
git checkout -B <Branch name> <Repository name>/<Branch name> git merge -m <commitMsg> <Branch matched by git> --no-ff
Changes are only ever pushed when the build results is SUCCESS
git push <Repository name> <Branch name>
repoName : String
The repository name. In git the repository is always the name of the remote. So if you have specified a repository name in your Git configuration. You need to specify the exact same name here, otherwise no integration will be performed. We do the merge based on this.
No trailing slash on repository name.
Remember to specify this when working with NAMED repositories in Git
pruneStaleBranch
pruneStaleTag
bitbucketPublicRepoPullRequestFilter
$class: 'PullRequestDiscoveryTrait'
excludeBranchesWithPRs : boolean
$class: 'PullRequestLabelsBlackListFilterTrait'
labels : String
$class: 'PullRequestLabelsMatchAllFilterTrait'
labels : String
$class: 'PullRequestLabelsMatchAnyFilterTrait'
labels : String
$class: 'PullRequestNameFilterTrait'
strategyId : int
phrase : String
ignoreCase : boolean
regex : boolean
$class: 'PullRequestSourceBranchFilterTrait'
strategyId : int
phrase : String
ignoreCase : boolean
regex : boolean
$class: 'PullRequestTargetBranchFilterTrait'
strategyId : int
phrase : String
ignoreCase : boolean
regex : boolean
refSpecs
templates
value : String
@{remote}
will be replaced by the remote name (which defaults to origin
) before use.
headRegexFilterWithPRFromOrigin
regex : String
tagRegex : String
giteaReleaseDiscovery
includePreReleases : boolean
(optional)
artifactToAssetMappingEnabled : boolean
(optional)
archiveArtifacts
) will be added as assets in the release, but only if the build was successfull.
remoteName
remoteName : String
$class: 'ScmManagerBranchDiscoveryTrait'
sparseCheckoutPaths
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
sparseCheckoutPaths
path : String
submoduleOption
extension
depth : int
(optional)
disableSubmodules : boolean
(optional)
parentCredentials : boolean
(optional)
recursiveSubmodules : boolean
(optional)
reference : String
(optional)
git init --bare git remote add SubProject1 https://gitrepo.com/subproject1 git remote add SubProject2 https://gitrepo.com/subproject2 git fetch --all
shallow : boolean
(optional)
threads : int
(optional)
timeout : int
(optional)
trackingSubmodules : boolean
(optional)
mrTriggerComment
commentBody : String
onlyTrustedMembersCanTrigger : boolean
tuleapBranchDiscovery
tuleapNotifyPullRequest
tuleapForkPullRequestDiscovery
tuleapPullRequestDiscovery
userIdentity
extension
name : String
If given, "GIT_COMMITTER_NAME=[this]" and "GIT_AUTHOR_NAME=[this]" are set for builds. This overrides whatever is in the global settings.
email : String
If given, "GIT_COMMITTER_EMAIL=[this]" and "GIT_AUTHOR_EMAIL=[this]" are set for builds. This overrides whatever is in the global settings.
bitbucketWebhookConfiguration
Sets 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 : String
WebhookListenerBuildConditionsTrait
alwaysBuildMROpen : boolean
(optional)
alwaysBuildMRReOpen : boolean
(optional)
alwaysIgnoreMRApproval : boolean
(optional)
alwaysIgnoreMRApproved : boolean
(optional)
alwaysIgnoreMRUnApproval : boolean
(optional)
alwaysIgnoreMRUnApproved : boolean
(optional)
alwaysIgnoreMRWorkInProgress : boolean
(optional)
alwaysIgnoreNonCodeRelatedUpdates : boolean
(optional)
headWildcardFilterWithPRFromOrigin
includes : String
*
as a wildcard; for example: master release*
excludes : String
release
tagIncludes : String
*
as a wildcard; for example: *-1.*
to build only 1.0 tags from the maven release plugin.
tagExcludes : String
*-0.*
$class: 'WipeWorkspaceTrait'
bitbucketBranchDiscovery
strategyId : int
bitbucketForkDiscovery
strategyId : int
trust
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.
bitbucketTrustEveryone
bitbucketTrustNobody
bitbucketTrustTeam
bitbucketPullRequestDiscovery
strategyId : int
bitbucketSshCheckout
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 : String
It must be a SSH key based credential.
bitbucketTagDiscovery
bitbucketWebhookRegistration
Overrides 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.TagDiscoveryTrait'
dagshubBranchDiscovery
$class: 'io.jenkins.plugins.dagshubbranchsource.traits.ForkPullRequestDiscoveryTrait'
buildOnPullHead : boolean
(optional)
$class: 'io.jenkins.plugins.dagshubbranchsource.traits.OriginPullRequestDiscoveryTrait'
buildOnPullHead : boolean
(optional)
dagshubTagDiscovery
gitLabBranchDiscovery
strategyId : int
branchesAlwaysIncludedRegex : String
(optional)
gitLabSshCheckout
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 : String
gitLabTagDiscovery
gitBranchDiscovery
gitTagDiscovery
headRegexFilter
regex : String
headWildcardFilter
includes : String
*
as a wildcard; for example: master release*
excludes : String
release alpha-* beta-*
headRegexFilterWithPR
regex : String
tagRegex : String
headWildcardFilterWithPR
includes : String
*
as a wildcard; for example: master release*
excludes : String
release
tagIncludes : String
*
as a wildcard; for example: *-1.*
to build only 1.0 tags from the maven release plugin.
tagExcludes : String
*-0.*
giteaBranchDiscovery
strategyId : int
giteaForkDiscovery
strategyId : int
trust
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
.
gitLabTrustMembers
bitbucketTrustTeam
bitbucketTrustEveryone
bitbucketTrustNobody
gitLabTrustEveryone
gitLabTrustNobody
gitLabTrustPermissions
giteaTrustContributors
giteaTrustEveryone
giteaTrustNobody
gitHubTrustContributors
gitHubTrustEveryone
gitHubTrustNobody
gitHubTrustPermissions
giteaPullRequestDiscovery
strategyId : int
giteaSSHCheckout
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 : String
giteaTagDiscovery
giteaWebhookRegistration
Overrides 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 : String
gitHubBranchDiscovery
strategyId : int
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.
gitHubForkDiscovery
strategyId : int
trust
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.
gitHubTrustContributors
gitHubTrustEveryone
gitHubTrustNobody
gitHubTrustPermissions
gitHubPullRequestDiscovery
strategyId : int
gitHubSshCheckout
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 : String
gitHubTagDiscovery
gitHub
handlers
(optional)
branches
events
(optional)
commit
checks
commitMessagePattern
exclude : boolean
(optional)
matchCriteria : String
(optional)
branchCreated
deleted
hashChanged
restriction
exclude : boolean
(optional)
matchAsPattern : boolean
(optional)
matchCriteriaStr : String
(optional)
pullRequests
events
(optional)
close
commentPattern
comment : String
commitChanged
description
skipMsg : String
labelsAdded
label
labels : String
Every new label on new line
labelsExist
label
labels : String
Every new label on new line
skip : boolean
labelsNotExist
label
labels : String
Every new label on new line
skip : boolean
labelsPatternExists
label
labels : String
Every new label on new line
skip : boolean
labelsRemoved
label
labels : String
Every new label on new line
nonMergeable
skip : boolean
Number
number : int
match : boolean
skip : boolean
Open
tags
events
(optional)
created
restrictions
exclude : boolean
(optional)
matchAsPattern : boolean
(optional)
matchCriteriaStr : String
(optional)
id : String
(optional)
projectUrlStr : String
(optional)
repoProvider
(optional)
gitHubPlugin
cacheConnection : boolean
(optional)
manageHooks : boolean
(optional)
repoPermission
(optional)
ADMIN
, PUSH
, PULL
scmFactory
(optional)
asIsGITScm
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.
Use the Pipeline Snippet Generator to generate a sample pipeline script for the checkout
step. Examples of the checkout
step include:
The checkout
step provides access to all the Pipeline capabilities provided by the git plugin:
checkout scmGit(userRemoteConfigs: [ [ url: 'https://github.com/jenkinsci/git-plugin' ] ])
NOTE: The checkout
step is the preferred SCM checkout method. For simpler cases that do not require all the capabilities of the git plugin, the git
step can also be used.
Use the Pipeline Snippet Generator to generate a sample pipeline script for the checkout step.
The checkout
step can be used in many cases where the git
step cannot be used. Refer to the git plugin documentation for detailed descriptions of options available to the checkout step. For example, the checkout
step supports:
Checkout from the git plugin source repository using https protocol, no credentials, and the master branch.
The Pipeline Snippet Generator generates this example:
checkout scmGit(userRemoteConfigs: [ [ url: 'https://github.com/jenkinsci/git-plugin' ] ])Example: Checkout step with https and a specific branch
Checkout from the Jenkins source repository using https protocol, no credentials, and a specific branch (stable-2.289).
The Pipeline Snippet Generator generates this example:
checkout scmGit(branches: [[name: 'stable-2.289']], userRemoteConfigs: [ [ url: 'https://github.com/jenkinsci/jenkins.git' ] ])Example: Checkout step with ssh and a private key credential
Checkout from the git client plugin source repository using ssh protocol, private key credentials, and the master branch. The credential must be a private key credential if the remote git repository is accessed with the ssh protocol. The credential must be a username / password credential if the remote git repository is accessed with http or https protocol.
The Pipeline Snippet Generator generates this example:
checkout changelog: false, scm: scmGit(userRemoteConfigs: [ [ credentialsId: 'my-private-key-credential-id', url: 'git@github.com:jenkinsci/git-client-plugin.git' ] ])Example: Checkout step with https and changelog disabled
Checkout from the Jenkins source repository using https protocol, no credentials, the master branch, and changelog calculation disabled. If changelog is false
, then the changelog will not be computed for this job. If changelog is true
or is not set, then the changelog will be computed. See the workflow scm step documentation for more changelog details.
The Pipeline Snippet Generator generates this example:
checkout changelog: false, scmGit(userRemoteConfigs: [ [ url: 'https://github.com/jenkinsci/credentials-plugin' ] ])Example: Checkout step with git protocol and polling disabled
Checkout from the command line git repository using git protocol, no credentials, the master branch, and no polling for changes. If poll is false
, then the remote repository will not be polled for changes. If poll is true
or is not set, then the remote repository will be polled for changes. See the workflow scm step documentation for more polling details.
The Pipeline Snippet Generator generates this example:
checkout poll: false, scmGit(userRemoteConfigs: [ [ url: 'git://git.kernel.org/pub/scm/git/git.git ] ])Argument Descriptions
userRemoteConfigs
${SUPER_PROJECT_URL}/${SUBMODULE}
, rather than relying on information from .gitmodules.url : String
git clone
command.
name : String
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.
refspec : String
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.
credentialsId : String
branches
name : String
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/feature
origin/prefix
or origin/prefix_123
or origin/prefix-abc
:origin/release-\d{8}
origin/release-20150101
origin/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-123
origin/master
or origin/develop
browser
assembla
repoUrl : String
$class: 'BacklogGitRepositoryBrowser'
repoName : String
repoUrl : String
bitbucketServer
repoUrl : String
bitbucket
repoUrl : String
cgit
repoUrl : String
fisheye
repoUrl : String
gitblit
repoUrl : String
projectName : String
$class: 'GitBucketBrowser'
url : String
gitLab
repoUrl : String
version : String
(optional)
gitLabBrowser
https://gitLab.example.com
then the URL for bob's skunkworks project might be https://gitLab.example.com/bob/skunkworks
.
projectUrl : String
https://gitLab.example.com
then the URL for bob's skunkworks project might be https://gitLab.example.com/bob/skunkworks
gitList
repoUrl : String
gitWeb
repoUrl : String
$class: 'GiteaBrowser'
repoUrl : String
https://gitea.example.com
then the URL for bob's skunkworks project repository might be https://gitea.example.com/bob/skunkworks
github
repoUrl : String
gitiles
repoUrl : String
$class: 'GitoriousWeb'
repoUrl : String
gogs
repoUrl : String
kiln
repoUrl : String
phabricator
repoUrl : String
repo : String
redmine
repoUrl : String
rhodeCode
repoUrl : String
$class: 'ScmManagerGitRepositoryBrowser'
repoUrl : String
jbSpace
repoUrl : String
$class: 'Stash'
repoUrl : String
$class: 'TracGitRepositoryBrowser'
$class: 'TuleapBrowser'
repositoryUrl : String
viewgit
repoUrl : String
projectName : String
gitTool : String
Name of the git tool to be used for this job. Git tool names are defined in "Global Tool Configuration".
extensions
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:
authorInChangelog
$class: 'BuildChooserSetting'
This extension point in Jenkins is used by many other plugins to control the job to build specific commits. When you activate those plugins, you may see them installing a custom strategy here.
buildChooser
$class: 'AlternativeBuildChooser'
$class: 'AncestryBuildChooser'
maximumAgeInDays : int
ancestorCommitSha1 : String
$class: 'DefaultBuildChooser'
$class: 'DeflakeGitBuildChooser'
$class: 'GerritTriggerBuildChooser'
$class: 'InverseBuildChooser'
buildSingleRevisionOnly
changelogToBranch
options
compareRemote : String
origin
, that contains the branch you specify below.
compareTarget : String
checkoutOption
timeout : int
cleanBeforeCheckout
.gitignore
. It also resets all tracked files to their versioned state. This ensures that the workspace is in the same state as if you cloned and checked out in a brand-new empty directory, and ensures that your build is not affected by the files generated by the previous build.
deleteUntrackedNestedRepositories : boolean
(optional)
.git
directories.
cleanAfterCheckout
.gitignore
. It also resets all tracked files to their versioned state. This ensures that the workspace is in the same state as if you cloned and checked out in a brand-new empty directory, and ensures that your build is not affected by the files generated by the previous build.
deleteUntrackedNestedRepositories : boolean
(optional)
.git
directories.
cloneOption
shallow : boolean
noTags : boolean
reference : String
timeout : int
depth : int
(optional)
honorRefspec : boolean
(optional)
$class: 'CodeCommitURLHelper'
credentialId : String
OPTIONAL: Select the credentials to use.
If not specified, defaults to the DefaultAWSCredentialsProviderChain behaviour - *FROM THE JENKINS INSTANCE*
In the latter case, usage of IAM Role Profiles seems not to work, thus relying on environment variables / system properties or the ~/.aws/credentials file, thus not recommended.
repositoryName : String
$class: 'DisableRemotePoll'
$class: 'ExcludeFromChangeSet'
$class: 'ExcludeFromPoll'
firstBuildChangelog
makeChangelog : boolean
(optional)
lfs
$class: 'GitSCMChecksExtension'
verboseConsoleLog : boolean
(optional)
$class: 'GitSCMStatusChecksExtension'
name : String
(optional)
skip : boolean
(optional)
skipProgressUpdates : boolean
(optional)
suppressLogs : boolean
(optional)
unstableBuildNeutral : boolean
(optional)
$class: 'GitTagMessageExtension'
useMostRecentTag : boolean
(optional)
$class: 'IgnoreNotifyCommit'
localBranch
If selected, and its value is an empty string or "**", then the branch name is computed from the remote branch without the origin. In that case, a remote branch origin/master will be checked out to a local branch named master, and a remote branch origin/develop/new-feature will be checked out to a local branch named develop/newfeature.
Please note that this has not been tested with submodules.
localBranch : String
$class: 'MessageExclusion'
excludedMessage : String
.*\[maven-release-plugin\].*The example above illustrates that if only revisions with "[maven-release-plugin]" message in first comment line have been committed to the SCM a build will not occur. You can create more complex patterns using embedded flag expressions.
(?s).*FOO.*This example will search FOO message in all comment lines.
$class: 'PathRestriction'
includedRegions : String
myapp/src/main/web/.*\.html myapp/src/main/web/.*\.jpeg myapp/src/main/web/.*\.gifThe example above illustrates that a build will only occur, if html/jpeg/gif files have been committed to the SCM. Exclusions take precedence over inclusions, if there is an overlap between included and excluded regions.
excludedRegions : String
myapp/src/main/web/.*\.html myapp/src/main/web/.*\.jpeg myapp/src/main/web/.*\.gifThe example above illustrates that if only html/jpeg/gif files have been committed to the SCM a build will not occur.
perBuildTag
$class: 'PreBuildMerge'
options
mergeTarget : String
master
.
fastForwardMode
(optional)
FF
, FF_ONLY
, NO_FF
mergeRemote : String
(optional)
origin
, that contains the branch you specify below. If left blank, it'll default to the name of the first repository configured above.
mergeStrategy
(optional)
DEFAULT
, RESOLVE
, RECURSIVE
, OCTOPUS
, OURS
, SUBTREE
, RECURSIVE_THEIRS
pretestedIntegration
gitIntegrationStrategy
accumulated
shortCommitMessage : boolean
(optional)
ffonly
shortCommitMessage : boolean
(optional)
squash
integrationBranch : String
The branch name must match your integration branch name. No trailing slash.
git checkout -B <Branch name> <Repository name>/<Branch name> git merge --squash <Branch matched by git> git commit -C <Branch matched by git>
git checkout -B <Branch name> <Repository name>/<Branch name> git merge -m <commitMsg> <Branch matched by git> --no-ff
Changes are only ever pushed when the build results is SUCCESS
git push <Repository name> <Branch name>
repoName : String
The repository name. In git the repository is always the name of the remote. So if you have specified a repository name in your Git configuration. You need to specify the exact same name here, otherwise no integration will be performed. We do the merge based on this.
No trailing slash on repository name.
Remember to specify this when working with NAMED repositories in Git
pruneStaleBranch
pruneTags
pruneTags : boolean
$class: 'RelativeTargetDirectory'
relativeTargetDir : String
This extension should not be used in Jenkins Pipeline (either declarative or scripted). Jenkins Pipeline already provides standard techniques for checkout to a subdirectory. Use ws and dir in Jenkins Pipeline rather than this extension.
$class: 'ScmName'
Unique name for this SCM. Needed when using Git within the Multi SCM plugin.
name : String
sparseCheckout
Specify the paths that you'd like to sparse checkout. This may be used for saving space (Think about a reference repository). Be sure to use a recent version of Git, at least above 1.7.10
sparseCheckoutPaths
path : String
submodule
depth : int
(optional)
disableSubmodules : boolean
(optional)
parentCredentials : boolean
(optional)
recursiveSubmodules : boolean
(optional)
reference : String
(optional)
git init --bare git remote add SubProject1 https://gitrepo.com/subproject1 git remote add SubProject2 https://gitrepo.com/subproject2 git fetch --all
shallow : boolean
(optional)
threads : int
(optional)
timeout : int
(optional)
trackingSubmodules : boolean
(optional)
$class: 'UserExclusion'
excludedUsers : String
auto_build_userThe example above illustrates that if only revisions by "auto_build_user" have been committed to the SCM a build will not occur.
$class: 'UserIdentity'
name : String
If given, "GIT_COMMITTER_NAME=[this]" and "GIT_AUTHOR_NAME=[this]" are set for builds. This overrides whatever is in the global settings.
email : String
If given, "GIT_COMMITTER_EMAIL=[this]" and "GIT_AUTHOR_EMAIL=[this]" are set for builds. This overrides whatever is in the global settings.
$class: 'WipeWorkspace'
doGenerateSubmoduleConfigurations : boolean
(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.
submoduleCfg
(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.
submoduleName : String
Removed in git plugin 4.6.0.
branches : Array / List of String
Removed in git plugin 4.6.0.
noGITScm
github
repoOwner : String
Specify the name of the GitHub Organization or GitHub User Account.
repository : String
repositoryUrl : String
Specify the HTTPS URL of the GitHub Organization / User Account and repository.
GitHub examples:
GitHub Enterprise examples:
configuredByUrl : boolean
apiUri : String
(optional)
buildForkPRHead : boolean
(optional)
buildForkPRMerge : boolean
(optional)
buildOriginBranch : boolean
(optional)
buildOriginBranchWithPR : boolean
(optional)
buildOriginPRHead : boolean
(optional)
buildOriginPRMerge : boolean
(optional)
credentialsId : String
(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".
excludes : String
(optional)
id : String
(optional)
includes : String
(optional)
traits
(optional)
$class: 'ApprovedPullRequestTrait'
strategyId : int
authorInChangelog
bitbucketAgedRefsTrait
retentionDays : String
bitbucketBranchCommitSkipTrait
$class: 'BitbucketBranchDiscoveryTrait'
bitbucketBuildStatusNotifications
disableNotificationForNotBuildJobs : boolean
(optional)
sendSuccessNotificationForUnstableBuild : boolean
(optional)
bitbucketCommitSkipTrait
$class: 'BitbucketGitBrowserSCMSourceTrait'
browser
assembla
repoUrl : String
$class: 'BacklogGitRepositoryBrowser'
repoName : String
repoUrl : String
bitbucketServer
repoUrl : String
bitbucket
repoUrl : String
cgit
repoUrl : String
fisheye
repoUrl : String
gitblit
repoUrl : String
projectName : String
$class: 'GitBucketBrowser'
url : String
gitLab
repoUrl : String
version : String
(optional)
gitLabBrowser
https://gitLab.example.com
then the URL for bob's skunkworks project might be https://gitLab.example.com/bob/skunkworks
.
projectUrl : String
https://gitLab.example.com
then the URL for bob's skunkworks project might be https://gitLab.example.com/bob/skunkworks
gitList
repoUrl : String
gitWeb
repoUrl : String
$class: 'GiteaBrowser'
repoUrl : String
https://gitea.example.com
then the URL for bob's skunkworks project repository might be https://gitea.example.com/bob/skunkworks
github
repoUrl : String
gitiles
repoUrl : String
$class: 'GitoriousWeb'
repoUrl : String
gogs
repoUrl : String
kiln
repoUrl : String
phabricator
repoUrl : String
repo : String
redmine
repoUrl : String
rhodeCode
repoUrl : String
$class: 'ScmManagerGitRepositoryBrowser'
repoUrl : String
jbSpace
repoUrl : String
$class: 'Stash'
repoUrl : String
$class: 'TracGitRepositoryBrowser'
$class: 'TuleapBrowser'
repositoryUrl : String
viewgit
repoUrl : String
projectName : String
$class: 'BitbucketJiraValidatorTrait'
jiraServerIdx : int
$class: 'BitbucketPullRequestDiscoveryTrait'
$class: 'BitbucketTagDiscoveryTrait'
buildStatusNameCustomPart
buildStatusNameCustomPart : String
(optional)
buildStatusNameOverwrite : boolean
(optional)
ignoreTypeInStatusName : boolean
(optional)
$class: 'ChangeDiscoveryTrait'
queryString : String
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
checkoutOption
extension
timeout : int
cleanAfterCheckout
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.
deleteUntrackedNestedRepositories : boolean
(optional)
.git
directories.
cleanBeforeCheckout
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.
deleteUntrackedNestedRepositories : boolean
(optional)
.git
directories.
$class: 'CleanMercurialSCMSourceTrait'
cloneOption
extension
shallow : boolean
noTags : boolean
reference : String
timeout : int
depth : int
(optional)
honorRefspec : boolean
(optional)
$class: 'DisableStatusUpdateTrait'
discoverOtherRefs
ref : String
The pattern under /refs on the remote repository to discover, can contain a wildcard.
Example: test/*/merged
nameMapping : String
(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}".
$class: 'FilterChecksTrait'
queryOperator
ID
, SCHEME
queryString : String
firstBuildChangelog
extension
makeChangelog : boolean
(optional)
gitLabForkDiscovery
strategyId : int
trust
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>
buildMRForksNotMirror : boolean
(optional)
browser
browser
assembla
repoUrl : String
$class: 'BacklogGitRepositoryBrowser'
repoName : String
repoUrl : String
bitbucketServer
repoUrl : String
bitbucket
repoUrl : String
cgit
repoUrl : String
fisheye
repoUrl : String
gitblit
repoUrl : String
projectName : String
$class: 'GitBucketBrowser'
url : String
gitLab
repoUrl : String
version : String
(optional)
gitLabBrowser
https://gitLab.example.com
then the URL for bob's skunkworks project might be https://gitLab.example.com/bob/skunkworks
.
projectUrl : String
https://gitLab.example.com
then the URL for bob's skunkworks project might be https://gitLab.example.com/bob/skunkworks
gitList
repoUrl : String
gitWeb
repoUrl : String
$class: 'GiteaBrowser'
repoUrl : String
https://gitea.example.com
then the URL for bob's skunkworks project repository might be https://gitea.example.com/bob/skunkworks
github
repoUrl : String
gitiles
repoUrl : String
$class: 'GitoriousWeb'
repoUrl : String
gogs
repoUrl : String
kiln
repoUrl : String
phabricator
repoUrl : String
repo : String
redmine
repoUrl : String
rhodeCode
repoUrl : String
$class: 'ScmManagerGitRepositoryBrowser'
repoUrl : String
jbSpace
repoUrl : String
$class: 'Stash'
repoUrl : String
$class: 'TracGitRepositoryBrowser'
$class: 'TuleapBrowser'
repositoryUrl : String
viewgit
repoUrl : String
projectName : String
gitHubAgedRefsTrait
retentionDays : String
gitHubBranchCommitSkipTrait
gitHubCommitSkipTrait
$class: 'GitHubJiraValidatorTrait'
jiraServerIdx : int
gitHubSourceChecks
verboseConsoleLog : boolean
(optional)
gitHubStatusChecks
name : String
(optional)
skip : boolean
(optional)
skipNotifications : boolean
(optional)
skipProgressUpdates : boolean
(optional)
suppressLogs : boolean
(optional)
unstableBuildNeutral : boolean
(optional)
lfs
gitlabAvatar
disableProjectAvatar : boolean
(optional)
gitlabMarkUnstableAsSuccess
markUnstableAsSuccess : boolean
(optional)
gitlabSkipNotifications
gitTool
gitTool : String
gitLabHookRegistration
webHookMode : String
systemHookMode : String
gitHubIgnoreDraftPullRequestFilter
ignoreOnPush
jervisFilter
This 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:
- main
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 create an allow list of branches (only) or a block list of branches (except) to be built.
# block branches from building
branches:
except:
- legacy
- experimental
# allow only these branches
branches:
only:
- main
- stable
The same YAML can be applied to tags.
# block tags from building
tags:
except:
- .*-rc
- .*-beta
# allow only these tags
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 an allow list in your main branch, then it will not propagate to other branches.
You can use regular expressions to allow or block branches:
branches:
only:
- main
- /^[.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 : String
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.
localBranch
logComment
logSuccess : boolean
(optional)
sudoUser : String
(optional)
$class: 'MercurialBrowserSCMSourceTrait'
browser
$class: 'FishEye'
url : String
$class: 'GoogleCode'
url : String
$class: 'HgWeb'
url : String
$class: 'Kallithea'
url : String
$class: 'KilnHG'
url : String
$class: 'RhodeCode'
url : String
$class: 'RhodeCodeLegacy'
url : String
$class: 'ScmManager'
url : String
http://YOURSCMMANAGER/scm/repo/NAMESPACE/NAME/
).
$class: 'MercurialInstallationSCMSourceTrait'
installation : String
multiBranchProjectDisplayNaming
displayNamingStrategy
Job display name with fallback to name:
Uses the branch source plugin's display name for the PR instead of the raw name
Value for configuration-as-code: OBJECT_DISPLAY_NAME
Name and, if available, display name:
Joins the raw name and the branch source plugin's display name
Value for configuration-as-code: RAW_AND_OBJECT_DISPLAY_NAME
OBJECT_DISPLAY_NAME
, RAW_AND_OBJECT_DISPLAY_NAME
gitHubNotificationContextTrait
contextLabel : String
typeSuffix : boolean
Appends the relevant suffix to the context label(s) based on the build type. '/pr-merge', '/pr-head' or '/branch'
multipleStatusDelimiter : String
(optional)
multipleStatuses : boolean
(optional)
gitLabOriginDiscovery
strategyId : int
$class: 'PathBasedPullRequestFilterTrait'
inclusionField : String
exclusionField : String
$class: 'PreBuildMergeTrait'
extension
options
mergeTarget : String
master
.
fastForwardMode
(optional)
FF
, FF_ONLY
, NO_FF
mergeRemote : String
(optional)
origin
, that contains the branch you specify below. If left blank, it'll default to the name of the first repository configured above.
mergeStrategy
(optional)
DEFAULT
, RESOLVE
, RECURSIVE
, OCTOPUS
, OURS
, SUBTREE
, RECURSIVE_THEIRS
$class: 'PretestedIntegrationSCMTrait'
extension
gitIntegrationStrategy
accumulated
shortCommitMessage : boolean
(optional)
ffonly
shortCommitMessage : boolean
(optional)
squash
integrationBranch : String
The branch name must match your integration branch name. No trailing slash.
git checkout -B <Branch name> <Repository name>/<Branch name> git merge --squash <Branch matched by git> git commit -C <Branch matched by git>
git checkout -B <Branch name> <Repository name>/<Branch name> git merge -m <commitMsg> <Branch matched by git> --no-ff
Changes are only ever pushed when the build results is SUCCESS
git push <Repository name> <Branch name>
repoName : String
The repository name. In git the repository is always the name of the remote. So if you have specified a repository name in your Git configuration. You need to specify the exact same name here, otherwise no integration will be performed. We do the merge based on this.
No trailing slash on repository name.
Remember to specify this when working with NAMED repositories in Git
pruneStaleBranch
pruneStaleTag
bitbucketPublicRepoPullRequestFilter
$class: 'PullRequestDiscoveryTrait'
excludeBranchesWithPRs : boolean
$class: 'PullRequestLabelsBlackListFilterTrait'
labels : String
$class: 'PullRequestLabelsMatchAllFilterTrait'
labels : String
$class: 'PullRequestLabelsMatchAnyFilterTrait'
labels : String
$class: 'PullRequestNameFilterTrait'
strategyId : int
phrase : String
ignoreCase : boolean
regex : boolean
$class: 'PullRequestSourceBranchFilterTrait'
strategyId : int
phrase : String
ignoreCase : boolean
regex : boolean
$class: 'PullRequestTargetBranchFilterTrait'
strategyId : int
phrase : String
ignoreCase : boolean
regex : boolean
refSpecs
templates
value : String
@{remote}
will be replaced by the remote name (which defaults to origin
) before use.
headRegexFilterWithPRFromOrigin
regex : String
tagRegex : String
giteaReleaseDiscovery
includePreReleases : boolean
(optional)
artifactToAssetMappingEnabled : boolean
(optional)
archiveArtifacts
) will be added as assets in the release, but only if the build was successfull.
remoteName
remoteName : String
$class: 'ScmManagerBranchDiscoveryTrait'
sparseCheckoutPaths
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
sparseCheckoutPaths
path : String
submoduleOption
extension
depth : int
(optional)
disableSubmodules : boolean
(optional)
parentCredentials : boolean
(optional)
recursiveSubmodules : boolean
(optional)
reference : String
(optional)
git init --bare git remote add SubProject1 https://gitrepo.com/subproject1 git remote add SubProject2 https://gitrepo.com/subproject2 git fetch --all
shallow : boolean
(optional)
threads : int
(optional)
timeout : int
(optional)
trackingSubmodules : boolean
(optional)
mrTriggerComment
commentBody : String
onlyTrustedMembersCanTrigger : boolean
tuleapBranchDiscovery
tuleapNotifyPullRequest
tuleapForkPullRequestDiscovery
tuleapPullRequestDiscovery
userIdentity
extension
name : String
If given, "GIT_COMMITTER_NAME=[this]" and "GIT_AUTHOR_NAME=[this]" are set for builds. This overrides whatever is in the global settings.
email : String
If given, "GIT_COMMITTER_EMAIL=[this]" and "GIT_AUTHOR_EMAIL=[this]" are set for builds. This overrides whatever is in the global settings.
bitbucketWebhookConfiguration
Sets 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 : String
WebhookListenerBuildConditionsTrait
alwaysBuildMROpen : boolean
(optional)
alwaysBuildMRReOpen : boolean
(optional)
alwaysIgnoreMRApproval : boolean
(optional)
alwaysIgnoreMRApproved : boolean
(optional)
alwaysIgnoreMRUnApproval : boolean
(optional)
alwaysIgnoreMRUnApproved : boolean
(optional)
alwaysIgnoreMRWorkInProgress : boolean
(optional)
alwaysIgnoreNonCodeRelatedUpdates : boolean
(optional)
headWildcardFilterWithPRFromOrigin
includes : String
*
as a wildcard; for example: master release*
excludes : String
release
tagIncludes : String
*
as a wildcard; for example: *-1.*
to build only 1.0 tags from the maven release plugin.
tagExcludes : String
*-0.*
$class: 'WipeWorkspaceTrait'
bitbucketBranchDiscovery
strategyId : int
bitbucketForkDiscovery
strategyId : int
trust
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.
bitbucketTrustEveryone
bitbucketTrustNobody
bitbucketTrustTeam
bitbucketPullRequestDiscovery
strategyId : int
bitbucketSshCheckout
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 : String
It must be a SSH key based credential.
bitbucketTagDiscovery
bitbucketWebhookRegistration
Overrides 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.TagDiscoveryTrait'
dagshubBranchDiscovery
$class: 'io.jenkins.plugins.dagshubbranchsource.traits.ForkPullRequestDiscoveryTrait'
buildOnPullHead : boolean
(optional)
$class: 'io.jenkins.plugins.dagshubbranchsource.traits.OriginPullRequestDiscoveryTrait'
buildOnPullHead : boolean
(optional)
dagshubTagDiscovery
gitLabBranchDiscovery
strategyId : int
branchesAlwaysIncludedRegex : String
(optional)
gitLabSshCheckout
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 : String
gitLabTagDiscovery
gitBranchDiscovery
gitTagDiscovery
headRegexFilter
regex : String
headWildcardFilter
includes : String
*
as a wildcard; for example: master release*
excludes : String
release alpha-* beta-*
headRegexFilterWithPR
regex : String
tagRegex : String
headWildcardFilterWithPR
includes : String
*
as a wildcard; for example: master release*
excludes : String
release
tagIncludes : String
*
as a wildcard; for example: *-1.*
to build only 1.0 tags from the maven release plugin.
tagExcludes : String
*-0.*
giteaBranchDiscovery
strategyId : int
giteaForkDiscovery
strategyId : int
trust
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
.
gitLabTrustMembers
bitbucketTrustTeam
bitbucketTrustEveryone
bitbucketTrustNobody
gitLabTrustEveryone
gitLabTrustNobody
gitLabTrustPermissions
giteaTrustContributors
giteaTrustEveryone
giteaTrustNobody
gitHubTrustContributors
gitHubTrustEveryone
gitHubTrustNobody
gitHubTrustPermissions
giteaPullRequestDiscovery
strategyId : int
giteaSSHCheckout
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 : String
giteaTagDiscovery
giteaWebhookRegistration
Overrides 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 : String
gitHubBranchDiscovery
strategyId : int
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.
gitHubForkDiscovery
strategyId : int
trust
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.
gitHubTrustContributors
gitHubTrustEveryone
gitHubTrustNobody
gitHubTrustPermissions
gitHubPullRequestDiscovery
strategyId : int
gitHubSshCheckout
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 : String
gitHubTagDiscovery
clone : boolean
(optional)
libraryPath : String
(optional)
libraryResource
: Load a resource file from a libraryresource : String
/
-separated) path to a resource in a library's /resources
folder.
encoding : String
(optional)
Please submit your feedback about this page through this quick form.
Alternatively, if you don't wish to complete the quick form, you can simply indicate if you found this page helpful?
See existing feedback here.