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.
scmManagerserverUrl : String
repository : String
credentialsId : String
id : String (optional)
traits (optional)
$class: 'ApprovedPullRequestTrait'strategyId : int
authorInChangelogbitbucketAgedBranchesTraitretentionDays : String
bitbucketAgedPullRequestsTraitretentionDays : String
bitbucketAgedRefsTraitretentionDays : String
bitbucketAgedTagsTraitretentionDays : String
bitbucketBranchCommitSkipTrait$class: 'BitbucketBranchDiscoveryTrait'bitbucketBuildStatusNotificationsdisableNotificationForNotBuildJobs : boolean (optional)
sendStoppedNotificationForAbortBuild : boolean (optional)
sendSuccessNotificationForUnstableBuild : boolean (optional)
useReadableNotificationIds : boolean (optional)
Please note that changing this value will cause all build-time commits (e.g. pull requests) to have a duplicate build notification status due to the key change.
bitbucketCommitSkipTrait$class: 'BitbucketGitBrowserSCMSourceTrait'browser
assemblarepoUrl : String
$class: 'BacklogGitRepositoryBrowser'repoName : String
repoUrl : String
bitbucketServerrepoUrl : String
bitbucketrepoUrl : String
cgitrepoUrl : String
fisheyerepoUrl : String
gitblitrepoUrl : String
projectName : String
$class: 'GitBucketBrowser'url : String
gitLabrepoUrl : String
version : String (optional)
gitLabBrowserhttps://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
gitListrepoUrl : String
gitWebrepoUrl : 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
githubrepoUrl : String
gitilesrepoUrl : String
$class: 'GitoriousWeb'repoUrl : String
gogsrepoUrl : String
kilnrepoUrl : String
phabricatorrepoUrl : String
repo : String
redminerepoUrl : String
rhodeCoderepoUrl : String
$class: 'ScmManagerGitRepositoryBrowser'repoUrl : String
jbSpacerepoUrl : String
$class: 'Stash'repoUrl : String
teamFoundationrepoUrl : String
If TFS is also used as the repository server, this can usually be left blank.
$class: 'TracGitRepositoryBrowser'$class: 'TuleapBrowser'repositoryUrl : String
viewgitrepoUrl : String
projectName : String
$class: 'BitbucketJiraValidatorTrait'jiraServerIdx : int
$class: 'BitbucketPullRequestDiscoveryTrait'$class: 'BitbucketTagDiscoveryTrait'buildStatusNameCustomPartbuildStatusNameCustomPart : 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
checkoutOptionextension
timeout : int
cleanAfterCheckoutextension
.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.
cleanBeforeCheckoutextension
.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'cloneOptionextension
shallow : boolean
noTags : boolean
reference : String
timeout : int
depth : int (optional)
honorRefspec : boolean (optional)
$class: 'DisableStatusUpdateTrait'bitbucketDiscardOldBranchkeepForDays : int
bitbucketDiscardOldTagkeepForDays : int
discoverOtherRefsref : 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, SCHEMEqueryString : String
firstBuildChangelogextension
makeChangelog : boolean (optional)
gitLabForkDiscoverystrategyId : 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)
browserbrowser
assemblarepoUrl : String
$class: 'BacklogGitRepositoryBrowser'repoName : String
repoUrl : String
bitbucketServerrepoUrl : String
bitbucketrepoUrl : String
cgitrepoUrl : String
fisheyerepoUrl : String
gitblitrepoUrl : String
projectName : String
$class: 'GitBucketBrowser'url : String
gitLabrepoUrl : String
version : String (optional)
gitLabBrowserhttps://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
gitListrepoUrl : String
gitWebrepoUrl : 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
githubrepoUrl : String
gitilesrepoUrl : String
$class: 'GitoriousWeb'repoUrl : String
gogsrepoUrl : String
kilnrepoUrl : String
phabricatorrepoUrl : String
repo : String
redminerepoUrl : String
rhodeCoderepoUrl : String
$class: 'ScmManagerGitRepositoryBrowser'repoUrl : String
jbSpacerepoUrl : String
$class: 'Stash'repoUrl : String
teamFoundationrepoUrl : String
If TFS is also used as the repository server, this can usually be left blank.
$class: 'TracGitRepositoryBrowser'$class: 'TuleapBrowser'repositoryUrl : String
viewgitrepoUrl : String
projectName : String
gitHubAgedBranchesTraitretentionDays : String
gitHubAgedPullRequestsTraitretentionDays : String
gitHubAgedRefsTraitretentionDays : String
gitHubAgedTagsTraitretentionDays : String
gitHubBranchCommitSkipTraitgitHubCommitSkipTrait$class: 'GitHubJiraValidatorTrait'jiraServerIdx : int
gitHubSourceChecksverboseConsoleLog : boolean (optional)
gitHubStatusChecksname : String (optional)
skip : boolean (optional)
skipNotifications : boolean (optional)
skipProgressUpdates : boolean (optional)
suppressLogs : boolean (optional)
unstableBuildNeutral : boolean (optional)
lfsgitlabAvatardisableProjectAvatar : boolean (optional)
gitlabMarkUnstableAsSuccessmarkUnstableAsSuccess : boolean (optional)
gitlabSkipNotificationsgitToolgitTool : String
gitLabHookRegistrationwebHookMode : String
systemHookMode : String
gitHubIgnoreDraftPullRequestFilterignoreOnPushjervisFilterThis 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.
localBranchlogCommentlogSuccess : 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
multiBranchProjectDisplayNamingdisplayNamingStrategy
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
Simple name:
Just the raw name
Value for configuration-as-code: RAW
OBJECT_DISPLAY_NAME, RAW_AND_OBJECT_DISPLAY_NAME, RAWgitHubNotificationContextTraitcontextLabel : 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)
gitLabOriginDiscoverystrategyId : int
$class: 'PathBasedPullRequestFilterTrait'inclusionField : String
exclusionField : String
postWebhook2ConfigurationignoredSources : String
A comma-separated list of Bitbucket branch regexes that should be ignored.
References could be found here.
ignoredUsers : String
Comma separated list of users in bitbucket to ignore commits from for triggering the webhook.
References could be found here.
ignoredGroups : String
Comma separated list of groups in bitbucket to ignore commits from for triggering the webhook.
References could be found here.
ignoreCerts : boolean
Accept self-signed certificates for jenkins callback URL.
References could be found here.
ignoreURLValidation : boolean
Do not validate callback URL.
References could be found here.
skipCI : boolean
Do not post webhooks if the title or description of a PR, or the last commit message contain "[ci skip]" or "[skip ci]".
References could be found here.
postWebhookConfigurationcommittersToIgnore : String
Comma separated list of user ids in bitbucket to ignore commits from for triggering the webhook.
References could be found here.
branchesToIgnore : String
Comma separated list of branch masks to ignore notifications from.
References could be found here.
skipCI : boolean
Do not post webhooks if the title or description of a PR, or the last commit message contain "[ci skip]" or "[skip ci]".
References could be found here.
$class: 'PreBuildMergeTrait'extension
options
mergeTarget : String
master.
fastForwardMode (optional)
FF, FF_ONLY, NO_FFmergeRemote : 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
accumulatedshortCommitMessage : boolean (optional)
ffonlyshortCommitMessage : boolean (optional)
squashintegrationBranch : 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
pruneStaleBranchpruneStaleTagbitbucketPublicRepoPullRequestFilter$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
bitbucketPRTargetBranchRefSpecrefSpecstemplates
value : String
@{remote} will be replaced by the remote name (which defaults to origin) before use.
headRegexFilterWithPRFromOriginregex : String
tagRegex : String
giteaReleaseDiscoveryincludePreReleases : boolean (optional)
artifactToAssetMappingEnabled : boolean (optional)
archiveArtifacts) will be added as assets in the release, but only if the build was successfull.
remoteNameremoteName : String
$class: 'ScmManagerBranchDiscoveryTrait'showBitbucketAvatarBitbucket as default avatar generates an SVG image, since this format is not supported will be replaced with an image generated by Jenkins.
sparseCheckoutPathsextension
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
submoduleOptionextension
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)
mrTriggerCommentcommentBody : String
onlyTrustedMembersCanTrigger : boolean
tuleapBranchDiscoverytuleapNotifyPullRequesttuleapForkPullRequestDiscoverytuleapPullRequestDiscoveryuserIdentityextension
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.
bitbucketWebhookConfigurationComma separated list of user ids in bitbucket to ignore commits from for triggering the webhook.
committerToIgnore is used exclusively by the "Post Webhooks for Bitbucket" plugin to prevent a server notification from being sent to the Jenkins instance to avoid triggering builds when commits are made by certain users.
References could be found here.
committersToIgnore : String
WebhookListenerBuildConditionsTraitalwaysBuildMROpen : boolean (optional)
alwaysBuildMRReOpen : boolean (optional)
alwaysIgnoreMRApproval : boolean (optional)
alwaysIgnoreMRApproved : boolean (optional)
alwaysIgnoreMRUnApproval : boolean (optional)
alwaysIgnoreMRUnApproved : boolean (optional)
alwaysIgnoreMRWorkInProgress : boolean (optional)
alwaysIgnoreNonCodeRelatedUpdates : boolean (optional)
headWildcardFilterWithPRFromOriginincludes : 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'bitbucketBranchDiscoverystrategyId : int
bitbucketForkDiscoverystrategyId : 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.
bitbucketTrustEveryonebitbucketTrustNobodybitbucketTrustTeambitbucketPullRequestDiscoverystrategyId : int
bitbucketSshCheckouthttps:// 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.
bitbucketTagDiscoverybitbucketWebhookRegistrationOverrides 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 » System › 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)
dagshubTagDiscoverygitLabBranchDiscoverystrategyId : int
branchesAlwaysIncludedRegex : String (optional)
gitLabSshCheckouthttps:// 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
gitLabTagDiscoverygitBranchDiscoverygitTagDiscoveryheadRegexFilterregex : String
headWildcardFilterincludes : String
* as a wildcard; for example: master release*
excludes : String
release alpha-* beta-*
headRegexFilterWithPRregex : String
tagRegex : String
headWildcardFilterWithPRincludes : 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.*
giteaBranchDiscoverystrategyId : int
giteaForkDiscoverystrategyId : 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.
gitLabTrustMembersbitbucketTrustTeambitbucketTrustEveryonebitbucketTrustNobodygitLabTrustEveryonegitLabTrustNobodygitLabTrustPermissionsgiteaTrustContributorsgiteaTrustEveryonegiteaTrustNobodygitHubTrustContributorsgitHubTrustEveryonegitHubTrustNobodygitHubTrustPermissionsgiteaPullRequestDiscoverystrategyId : int
giteaSSHCheckouthttps:// 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
giteaTagDiscoverygiteaWebhookRegistrationOverrides 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
gitHubBranchDiscoverystrategyId : 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.
gitHubForkDiscoverystrategyId : 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.
gitHubTrustContributorsgitHubTrustEveryonegitHubTrustNobodygitHubTrustPermissionsgitHubPullRequestDiscoverystrategyId : int
gitHubSshCheckouthttps:// 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
gitHubTagDiscoveryPlease 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.