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.
properties
: Set job propertiesJenkinsfile
itself can encode what would otherwise be static job configuration. Existing properties set through the Jenkins UI for non-multibranch Pipelines will be preserved.
properties
allowBrokenBuildClaiming
$class: 'AssemblaProjectProperty'
spaceName : String
backtrackEnabled : boolean
siteName : String
pluginEnabled : boolean
$class: 'AuthorizeProjectProperty'
strategy
$class: 'AnonymousAuthorizationStrategy'
$class: 'OwnershipAuthorizeProjectStrategy'
$class: 'SpecificUsersAuthorizationStrategy'
userid : String
useApitoken : boolean
apitoken : String
password : String
You can use API token for authentication instead by checking "Use API Token for authentication". You can get your API token from your user configuration page.
dontRestrictJobConfiguration : boolean
(optional)
"Run as Specific User" restricts the job configuration only to the specified user. Other users cannot configure the job even if the Jenkins access control configuration allows it.
This option disabled that feature, and the job configuration is controlled by the Jenkins access control.
Use this feature carefully, for a malicious user can run unintended commands without authentication by changing configuration of the job. Check the access control configuration, and ensure that the CONFIGURE permission for this job is granted only to proper users.
$class: 'SystemAuthorizationStrategy'
$class: 'TriggeringUsersAuthorizationStrategy'
azureAdAuthorizationMatrix
entries
group
name : String
permissions : Array / List of String
user
name : String
permissions : Array / List of String
userOrGroup
name : String
permissions : Array / List of String
inheritanceStrategy
(optional)
inheritingGlobal
inheriting
nonInheriting
$class: 'BacklogProjectProperty'
url : String
userId : String
UserId when using Backlog API.
password : String
Password when using Backlog API.
apiKey : String
API key when using Backlog API version 2.
$class: 'BalanceProjectProperty'
disk : long
(optional)
diskUnit
(optional)
K
, M
, G
memory : long
(optional)
memoryUnit
(optional)
K
, M
, G
$class: 'BeforeJobSnapshotJobProperty'
snapshots
snapshotsEnabled : boolean
snapshotName : String
$class: 'BlockBuildJobProperty'
useBlockBuildUpstreamProject : boolean
When this option is checked, Jenkins will prevent the project from building when a dependency of this project is in the queue, or building. The dependencies include the direct as well as the transitive dependencies.
Optional final projects can be given. When Jenkins checks for dependencies to block the build, it will stop checking when it reaches the final projects.
finalUpstreamProjects : String
Comma separated list of upstream projects.
useBlockBuildDownstreamProject : boolean
When this option is checked, Jenkins will prevent the project from building when a dependency of this project is in the queue, or building. The dependencies include the direct as well as the transitive dependencies.
Optional final projects can be given. When Jenkins checks for dependencies to block the build, it will stop checking when it reaches the final projects.
finalDownstreamProjects : String
Comma separated list of downstream projects.
$class: 'BlockItemJobProperty'
conditions
$class: 'BuildingBlockQueueCondition'
project : String
For compatibility, as a fallback when nothing else matches, a simple path like "foo/bar" can also be treated as "/foo/bar".
unblockGitHubPRLabel
label
labels : String
Every new label on new line
$class: 'JobResultBlockQueueCondition'
project : String
For compatibility, as a fallback when nothing else matches, a simple path like "foo/bar" can also be treated as "/foo/bar".
result : String
buildBlocker
useBuildBlocker : boolean
blockLevel : String
scanQueueFor : String
blockingJobs : String
.*-deploy ^maintainance.*
$class: 'BuildConfigProjectProperty'
namespace : String
name : String
uid : String
resourceVersion : String
buildRunPolicy : String
buildDiscarder
Keeping fewer builds means less disk space will be used in the Build Record Root Directory , which is specified on the Configure System screen.
Jenkins offers two options for determining when builds should be discarded:
You can also ensure that important builds are kept forever, regardless of the setting here — click the Keep this build forever button on the build page.
The last stable and last successful build are also excluded from these rules.
For example, if a project builds some software and produces a large installer, which is archived, you may wish to always keep the console log and information about which source control commit was built, while for disk space reasons, you may want to keep only the last three installers that were built.
This can make sense for projects where you can easily recreate the same artifacts later by building the same source control commit again.
strategy
BuildHistoryManager
rules
conditions
BuildAgeRange
Description
Matches builds that age is between given days range. It calculates days only without checking build time.
Use cases
Allow to match several builds at once based on build age.
Warning!
Provided values are always relative to today so most likely they interact with different builds every day.
Time of the build completed is reset to zero before comparison so only days are compared.
maxDaysAge = 0
refers to builds which were completed today
1-2
means builds which were completed yesterday or the day before yesterday.
Build completed time (age) is calculated as sum of getStartTimeInMillis()
and getDuration()
.
maxDaysAge : int
(optional)
minDaysAge : int
(optional)
BuildNumberRange
Description
Matches builds with build number between given number range (both inclusive).
Use cases
Allow to match several builds at once based on build numbers that do not change over the time.
Check also Wiki.
Warning!
Use number 1
to match very build from the beginning of the history.
maxBuildNumber : int
(optional)
minBuildNumber : int
(optional)
BuildResult
Description
Matches builds with chosen results.
Use cases
Allow to select builds based on the result.
Check also Wiki.
matchAborted : boolean
(optional)
matchFailure : boolean
(optional)
matchNotBuilt : boolean
(optional)
matchSuccess : boolean
(optional)
matchUnstable : boolean
(optional)
Cause
Description
Matches builds that class for the cause contains given string.
Use cases
Most popular class names are:
UserIdCause
- when user starts the buildTimerTriggerCause
- for builds triggered by time (mostly cron)To check class name of the cause, use following code for debug:
stage("Print causes") { for (String cause in currentBuild.getBuildCauses()) { print cause._class } }
Warning!
It validates every cause of the build and expects that at least one of cause matches.
Does not support regular expressions but uses contains()
to compare class name.
causeClass : String
(optional)
MatchEveryBuild
Description
Matches every build. Unconditionally.
Use cases
Allow to perform action for every build from the history.
Warning!
Use this action wisely because recovering deleted build might be impossible.
TokenMacro
Description
It consists from pair of template and value. Template written as token macro and is compared to value.
Use cases
Allow to build condition based on any variable which is provided by Token Macro Plugin.
Warning!
This plugin starts working then the build completes so it may not have access to all variables which are usually available during the build time.
template : String
value : String
actions
ChangeBuildDescription
Description
Updates build description.
Use cases
This action is helpful for testing and debugging. It does not change or delete the build what might be hard to rollback. Instead, it allows to test conditions before final action is used.
The result of this action is a string [build-history-manager]
which is prepend to job description.
Use this action as long as the final result of condition is not examined. This is helpful also for users who do not have access to Jenkins logs.
DeleteArtifacts
Description
Deletes the build artifacts.
Use cases
Deletes the artifact when they it is not needed any more, it is not valuable or there is no need to keep all artifacts over the time.
Check also Wiki.
Warning!
Use this action wisely because if wrong build is matched to this action then recovering deleted build might be impossible.
DeleteBuild
Description
Deletes the build.
Use cases
Deletes the build from the history when it is not needed any more, it is not valuable or there is no need to keep all builds over the time.
Warning!
Use this action wisely because if wrong build is matched to this action then recovering deleted build might be impossible.
DeleteLogFile
Description
Deletes the build log file.
Use cases
To leave build and delete the log file which eg. might contain sensitive data or are very big.
Warning!
Log file should not be deleted for the build which was already removed.
continueAfterMatch : boolean
(optional)
Description
false
, AND the conditions of this rule are met, this rule will be the final rule applied to the build, the plugin stops applying rules to this build, and goes to the next iteration of the "for each completed build" loop.true
(which is the default), AND the conditions of this rule are met, the next rule is applied to the same build, and goes to the next iteration of the "for each rule" loop.Use cases
This feature allows for the application of multiple consecutive rules to the same build, as long as the conditions for each of those rules are met.
matchAtMost : int
(optional)
Description
The rule will stop being processed after a certain number of matched builds. Once this condition is met, only the other rules will continue to be processed.
Use cases
This feature provides the option to control the number of builds the rule can process. It may save a significant amount of time when the build history is long.
-1
, there is no limitation, all builds will be evaluated.0
, no builds will be evaluated. This disables the rule as it will not apply to any build.1..n
, once the value is reached, the rule is effectively disabled and is no longer applied.Warning!
If the matchAtMost
value is set to zero, the rule is effectively disabled. This is useful if the user wants to disable a rule while keeping its other configuration values.
$class: 'BuildRotator'
daysToKeep : int
numToKeep : int
artifactsDaysToKeep : int
artifactsNumToKeep : int
$class: 'EnhancedOldBuildDiscarder'
daysToKeepStr : String
numToKeepStr : String
artifactDaysToKeepStr : String
artifactNumToKeepStr : String
discardOnlyOnSuccess : boolean
holdMaxBuilds : boolean
logRotator
daysToKeepStr : String
numToKeepStr : String
artifactDaysToKeepStr : String
artifactNumToKeepStr : String
compressBuildLog
customizeBuildNow
labels
alternateBuildButton : String
(optional)
alternateBuildNow : String
(optional)
alternateBuildWithParams : String
(optional)
$class: 'BuildPreferenceJobProperty'
buildPreferenceList
labelExpression : String
preference : int
$class: 'CNAuthProjectProperty'
project : String
This CollabNet TeamForge project will be used to determine what permissions users have on this Jenkins job.
createRoles : boolean
Check "Create Jenkins roles" to automatically create the Jenkins-related roles in the CollabNet TeamForge project. This will only work if you are a project admin in the project. If the roles already exist, no new roles will be created.
storedProjectId : String
grantDefaultRoles : boolean
Check "Grant Default Permissions" to automatically give project admins in the project full permissions in the project, and all members read permission. This will only work if you are a project admin in the project.
$class: 'CachetJobProperty'
requiredResources : boolean
resources : Array / List of String
$class: 'ChaosButlerOptOutJobProperty'
optOut : boolean
$class: 'CheckBuildJobProperty'
checkPars : String
on : boolean
$class: 'ConfigurationPermissionEnforcer'
$class: 'ConjurJITJobProperty'
conjurConfiguration
(optional)
applianceURL : String
(optional)
account : String
(optional)
certificateCredentialID : String
(optional)
credentialID : String
(optional)
authWebServiceId : String
(optional)
hostPrefix : String
(optional)
inheritFromParent : boolean
(optional)
useJustInTime : boolean
(optional)
$class: 'ContrastPluginConfig'
copyArtifactPermission
projectNames : String
Both relative names (../OtherFolder/ProjectName) and absolute names (/Folder/ProjectName) are allowed. Note that you need to add "/" to the head of the name to specify it as an absolute name.
$class: 'CustomIconProperty'
iconfile : String
$class: 'CustomMsgJobProperty'
on : boolean
briefDesc : String
insertOnFinish : boolean
$class: 'DatadogJobProperty'
emitSCMEvents : boolean
(optional)
enableFile : boolean
(optional)
enableProperty : boolean
(optional)
tagFile : String
(optional)
tagProperties : String
(optional)
$class: 'DeployNowJobProperty'
oneClickDeploy : boolean
hosts
? extends com.cloudbees.plugins.deployer.hosts.DeployHost<?, ?>
$class: 'DingTalkJobProperty'
notifierConfigs
raw : boolean
disabled : boolean
checked : boolean
robotId : String
robotName : String
atAll : boolean
atMobile : String
content : String
Environment Variables | Description |
---|---|
EXECUTOR_NAME | Executor name |
EXECUTOR_MOBILE | Executor mobile |
PROJECT_NAME | Project name |
PROJECT_URL | Project url |
JOB_NAME | Job name |
JOB_URL | Job url |
JOB_DURATION | Job duration |
JOB_STATUS | Job status |
message : String
Environment Variables | Description |
---|---|
EXECUTOR_NAME | Executor name |
EXECUTOR_MOBILE | Executor mobile |
PROJECT_NAME | Project name |
PROJECT_URL | Project url |
JOB_NAME | Job name |
JOB_URL | Job url |
JOB_DURATION | Job duration |
JOB_STATUS | Job status |
noticeOccasions : Array / List of String
disableConcurrentBuilds
abortPrevious : boolean
(optional)
disableResume
$class: 'DockerJobProperty'
additionalTag : String
cleanImages : boolean
registry
(optional)
url : String
https://index.docker.io/v1/
).
credentialsId : String
$class: 'DockerJobTemplateProperty'
cloudname : String
template
dockerTemplateBase
$class: 'DockerTemplateBase'
image : String
bindAllPorts : boolean
(optional)
bindPorts : String
(optional)
capabilitiesToAddString : String
(optional)
A list of new line separated capabilities.
Each line represents an option for the --cap-add
parameter sent to the docker server. Each one must be a known capability "Key" as per the docker documentation.
Please check https://docs.docker.com/engine/reference/run/#runtime-privilege-and-linux-capabilities for further information.
capabilitiesToDropString : String
(optional)
A list of new line separated capabilities.
Each line represents an option for the --cap-drop
parameter sent to the docker server. Each one must be a known capability "Key" as per the docker documentation.
Please check https://docs.docker.com/engine/reference/run/#runtime-privilege-and-linux-capabilities for further information.
cpuPeriod : long
(optional)
Set the period of CPUs to limit the container’s CPU usage.
The default CPU CFS (Completely Fair Scheduler) period is 100000us.
Consult Docker Run Documentation for further information.
cpuQuota : long
(optional)
Limits the container’s CPU usage.
The default 0 value allows the container to take 100% of a CPU resource.
Consult Docker Run Documentation for further information.
cpuShares : int
(optional)
cpus : String
(optional)
Specify how much of the available CPU resources a container can use as a floating point number.
The default is not set.
Consult Docker Run Documentation for further information.
devicesString : String
(optional)
dnsString : String
(optional)
dockerCommand : String
(optional)
environmentsString : String
(optional)
Zero or more environment variables that are set within the docker container. This is a multi-line text field. Each line must be of the form key=value and specify one variable name and its value.
Note that quotes are not interpreted.
e.g. foo="bar" will result in the quotes being part of foo's value.
Note also that whitespace is easily broken. Editing this field this without first expanding the box to its multi-line form will cause any whitespace within a line to be turned into end of line codes, breaking up the line and thus changing its meaning.
e.g. The single setting:
JENKINS_AGENT_SSH_PUBKEY=ssh-rsa MyPubKey jenkins@hostname
can be (accidentally) turned into three separate settings:
JENKINS_AGENT_SSH_PUBKEY=ssh-rsa MyPubKey jenkins@hostname
thus preventing the configuration from working as was intended.
extraDockerLabelsString : String
(optional)
A list of new line separated docker labels to be set on the container, Specified in the form "label_name=value"
.
This has no effect on Jenkins functionality, and is not related to the labels used by Jenkins to map jobs to agent nodes. These labels are metadata attached to the docker container itself (again, not the jenkins agent), and which can typically be read using the docker inspect
command.
This can be useful when using a docker cluster (like docker swarm) to pass information to the scheduler, in conjunction with constraints; or to let other services (portainer, prometheus...) know how they should categorize or otherwise deal with this specific container.
Notes:
extraGroupsString : String
(optional)
extraHostsString : String
(optional)
hostname : String
(optional)
macAddress : String
(optional)
memoryLimit : int
(optional)
The operator can constrain the memory available to a container. If the host supports swap memory, then the setting can be larger than physical RAM.
When the processes inside the container exceed the memory limit, effects vary depending on your setup, e.g. out of memory errors may occur or the operating system could start killing processes.
Consult Docker Run Documentation for further information.
Note that on most Docker installations, the memory limit will not stop Jenkins/Docker from spawning so many containers that the machines total available memory will be exceeded. However, some Docker installations might be able to constrain the number of containers automatically using the memory limit.
memorySwap : int
(optional)
mountsString : String
(optional)
network : String
(optional)
privileged : boolean
(optional)
pullCredentialsId : String
(optional)
securityOptsString : String
(optional)
A list of new line separated security options.
Each line represents an option for the --security-opt
parameter sent to the docker server. The options are in the format key=value
.
Please check https://docs.docker.com/engine/reference/run/#security-configuration for further information.
shmSize : int
(optional)
tty : boolean
(optional)
user : String
(optional)
volumesFromString : String
(optional)
connector
For all connection methods, Jenkins will start by triggering a docker run
. Then, after this step, there will optionally be more steps to establish the connection. There is currently three alternative ways to connect your Jenkins master to the dynamically provisioned Docker agents.
There are different pros and cons for each connection method. Depending on your environment, choose the one matching your needs. More detailed prerequisites are provided once you select a given method.
docker exec
, all by using the Docker API. The agent does not need to be able to reach the master through the network layers to communicate ; all will go through Docker API.
docker run
command with the right secret. And the remoting agent will establish the connection with the master through the network. Hence, the agent must be able to access the master through its address and port.
attach
entryPointCmdString : String
(optional)
javaExe : String
(optional)
jvmArgsString : String
(optional)
user : String
(optional)
root
") will be used if this is left blank.
jnlp
entryPointArgumentsString : String
(optional)
jenkinsUrl : String
(optional)
user : String
(optional)
ssh
sshKeyStrategy
$class: 'InjectSSHKey'
user : String
$class: 'ManuallyConfiguredSSHKey'
credentialsId : String
sshHostKeyVerificationStrategy
$class: 'KnownHostsFileKeyVerificationStrategy'
Checks the known_hosts file (~/.ssh/known_hosts) for the user Jenkins is executing under, to see if an entry exists that matches the current connection.
This method does not make any updates to the Known Hosts file, instead using the file as a read-only source and expecting someone with suitable access to the appropriate user account on the Jenkins controller to update the file as required, potentially using the ssh hostname
command to initiate a connection and update the file appropriately.
$class: 'ManuallyProvidedKeyVerificationStrategy'
Checks the key provided by the remote host matches the key set by the user who configured this connection.
key : String
The SSH key expected for this connection. This key should be in the form `algorithm value` where algorithm is one of ssh-rsa or ssh-dss, and value is the Base 64 encoded content of the key.
$class: 'ManuallyTrustedKeyVerificationStrategy'
Checks the remote key matches the key currently marked as trusted for this host.
Depending on configuration, the key will be automatically trusted for the first connection, or an authorised user will be asked to approve the key. An authorised user will be required to approve any new key that gets presented by the remote host.
requireInitialManualTrust : boolean
Require a user with Computer.CONFIGURE permission to authorise the key presented during the first connection to this host before the connection will be allowed to be established.
If this option is not enabled then the key presented on first connection for this host will be automatically trusted and allowed for all subsequent connections without any manual intervention.
$class: 'NonVerifyingKeyVerificationStrategy'
Does not perform any verification of the SSH key presented by the remote host, allowing all connections regardless of the key they present.
javaPath : String
(optional)
jvmOptions : String
(optional)
launchTimeoutSeconds : int
(optional)
maxNumRetries : int
(optional)
Note: That this field applies first to checks that the SSH port is open for new TCP connections, and secondly to checks that the SSH service that owns the TCP port is accepting SSH connections.
e.g. a value of 3 would mean that (up to) 4 attempts (1 initial attempt plus 3 retries) would be made to check the availability of the TCP port, followed by (up to) 4 attempts (1 initial attempt plus 3 retries) to check the availability of the SSH service itself.
port : int
(optional)
prefixStartSlaveCmd : String
(optional)
retryWaitTime : int
(optional)
suffixStartSlaveCmd : String
(optional)
labelString : String
instanceCapStr : String
The maximum number of containers, based on this template, that this provider is allowed to run in total. A negative value, or zero, or 2147483647 all mean "no limit" is imposed on the this template, although the overall cloud instance limit (if any) will still apply.
Note that containers which have not been created by Jenkins are not included in this total.
As an alternative, some Docker setups can also determine the maximum number of containers automatically using memory/cpu constraints.
disabled
(optional)
disabledByChoice : boolean
(optional)
enabledByChoice : boolean
(optional)
Note: If problems are encountered then this functionality may be disabled automatically. If that happens then it will be shown here. In this situation, the disabled state is transient and will automatically clear after the stated period has elapsed.
mode
(optional)
NORMAL
, EXCLUSIVE
name : String
(optional)
If blank or just whitespace, a default of "docker" will be used.
nodeProperties
(optional)
? extends hudson.slaves.NodeProperty<?>
pullStrategy
(optional)
PULL_ALWAYS
, PULL_LATEST
, PULL_NEVER
pullTimeout : int
(optional)
Note: This overrides the read timeout specified for the cloud, but only for the docker pull operation (as this operation is expected to take longer than most docker operations).
remoteFs : String
(optional)
removeVolumes : boolean
(optional)
retentionStrategy
(optional)
Specify the strategy when docker containers shall be started and stopped:
idleMinutes : int
numberOfTasksInProgress : int
(optional)
terminateOnceDone : boolean
(optional)
stopTimeout : int
(optional)
$class: 'DryRunJobProperty'
durabilityHint
This setting allows users to change the default durability mode for running Pipelines. In most cases this is a trade-off between performance and the ability for running pipelines to resume after unplanned Jenkins outages.
What does this do?
http://[jenkins-server]/exit
kill -9
to terminate the Jenkins process, may prevent incomplete pipelines from persisting dataNote: defaults also be set globally under Manage Jenkins > Configure System.
hint
PERFORMANCE_OPTIMIZED
, SURVIVABLE_NONATOMIC
, MAX_SURVIVABILITY
$class: 'EasyQAPluginProperties'
siteName : String
pluginEnabled : boolean
failureMode
NONE
, UNSTABLE
, FAILURE
eiffelActivity
categories : Array / List of String
(optional)
enforceBuildSchedule
branches : Array / List of String
(optional)
$class: 'EnvInjectJobProperty'
info
propertiesFilePath : String
Gives a file path of a properties file. The file format must be the standard Java property file format.
The file path can be absolute or relative to the workspace (the process is executed after a SCM checkout). All the properties name will be accessible as environment variables by their names.
propertiesContent : String
Give a set of key/value (one variable per line): KEY=VALUE
.
All the properties name will be accessible as environment variables by their names. You can use or override the properties specified in the above properties file.
scriptFilePath : String
Execute a script file aimed at setting an environment such as creating folders, copying files, and so on.
Give the script file path.
The file path can be absolute path or relative to the workspace (the process is executed after a SCM checkout).
You can use the above properties as variables.
However, adding or overriding environment variables in the script has no impact in the build job.
scriptContent : String
Execute a script file aimed at setting an environment such as creating folders, copying files, and so on.
Give the script file content.
You can use the above properties as variables.
However, adding or overriding environment variables in the script doesn't have any impacts in the build job.
loadFilesFromMaster : boolean
If enabled, load files (properties or scripts) from controller. Without this option, Jenkins loads the files from the target node (agent or controller). Loading the files from the controller may avoid conflicts between environment variables, such as the problematic PATH
variable used on both Windows and Linux.
As of EnvInject 2.0, global configuration can disable this option. When the option has been disabled by global configuration, you will see a warning in order to flag that the option was configured by the job but is now disabled. Once the option has been turned off - to acknowledge the job has been reconfigured - the option will disappear from the UI.
It is not recommended to use this option in new jobs even if it is enabled.
secureGroovyScript
Evaluates a Groovy script and injects the results into the environment. This script is powered by the Script Security Plugin; both Approved Script and Groovy Sandbox modes are available. For the new scripts it is recommended to use the Sandbox mode.
The groovy script must return a Map<String,String>
Java object. You can access parameters and other environment variables through variables in the Groovy script. In the scripts you can also use the following variables.
currentListener
instead of this variable when possible.
All listed variables can be used in both script modes. In the Sandbox mode the access to particular fields and methods may require an additional approval.
For example, the Groovy can compute environment variables from user input parameters. The script below injects the COMPUTE_VAR
environment variable according the CASE parameter value.
def stringValue="StRinG";
if ("upper".equals(CASE)){
def map = ["COMPUTE_VAR": stringValue.toUpperCase()]
return map
} else if ("lower".equals(CASE)){
def map = ["COMPUTE_VAR": stringValue.toLowerCase()]
return map
} else {
return null;
}
script : String
sandbox : boolean
classpath
path : String
oldPath : String
(optional)
shouldBeApproved : boolean
(optional)
oldScript : String
(optional)
contributors
(optional)
$class: 'OntrackDSLEnvInjectJobPropertyContributor'
scriptText : String
ontrackLog : boolean
$class: 'SharedObjectJobProperty'
populateSharedObjects : boolean
Populate as environment variables the shared objects (configured in the 'Manage Section > Shared Objects' section).
With this option, you can dynamically inject environment variables in the build from objects in your environment.
profiles : String
Restrict shared objects propagation to a list of profiles.
Give all the profiles selected.
Each profile will be separated by a semicolon (;).
$class: 'ToolInstallationJobProperty'
populateToolInstallation : boolean
Populate as environment variables the locations of installed tools (configured in the 'Manage Jenkins > Configure System' section ).
Tool names are exposed as an environment variables. Tool Paths are the environment variable values.
Space ( ), Dash (-) and dot (.) are replaced by an underscore (_) for tool names.
keepBuildVariables : boolean
(optional)
Inject Jenkins build variables such as EXECUTOR_NUMBER
, BUILD_ID
, BUILD_TAG
, JOB_NAME
and so on.
Inject also environment contributors and build variable contributors provided by other plugins.
keepJenkinsSystemVariables : boolean
(optional)
Inject Jenkins system variables such as JENKINS_HOME
, JENKINS_URL
, NODE_NAME
and so on.
Inject also environment variables defined as global properties and as node properties.
on : boolean
(optional)
overrideBuildParameters : boolean
(optional)
$class: 'FailedJobDeactivator'
optionalBlock
active : boolean
lastManuallyTriggered : int
lastSuccessfulBuild : int
userNotification : String
$class: 'FeatureBranchProperty'
upstream : String
$class: 'GameJobProperty'
job
$class: 'JobGenerator'
parent
name : String
linkJob
parent
name : String
activated : boolean
(optional)
showLeaderboard : boolean
(optional)
showStatistics : boolean
(optional)
currentChallengesCount : int
(optional)
currentQuestsCount : int
(optional)
currentStoredChallengesCount : int
(optional)
$class: 'GitBucketProjectProperty'
url : String
linkEnabled : boolean
gitLabConnection
gitLabConnection : String
jobCredentialId : String
(optional)
useAlternativeCredential : boolean
(optional)
giteeConnection
giteeConnection : String
githubProjectProperty
projectUrlStr : String
Enter the URL for the GitHub hosted project (without the tree/master or tree/branch part).
For example: https://github.com/rails/rails
for the Rails project.
displayName : String
(optional)
This value will be used as context name for commit status if status builder or status publisher is defined for this project. It should be small and clear.
If you leave it empty, job name will be used for builder and publisher.
$class: 'GitlabLogoProperty'
repositoryName : String
$class: 'GogsProjectProperty'
gogsSecret
class hudson.util.Secret
gogsUsePayload : boolean
gogsBranchFilter : String
$class: 'GraphsByBuildDates'
checked : boolean
$class: 'GroovyLabelAssignmentProperty'
secureGroovyScript
script : String
sandbox : boolean
classpath
path : String
oldPath : String
(optional)
shouldBeApproved : boolean
(optional)
oldScript : String
(optional)
$class: 'HeavyJobProperty'
weight : int
Specifying 0 here is the same as specifying 1.
$class: 'HipChatJobProperty'
room : String
startNotification : boolean
notifyAborted : boolean
notifyFailure : boolean
notifyNotBuilt : boolean
notifySuccess : boolean
notifyUnstable : boolean
notifyBackToNormal : boolean
$class: 'HubotJobProperty'
siteNames : String
enableNotifications : boolean
$class: 'IceScrumProjectProperty'
url : String
For example, projects hosted on icescrum.com Cloud platform : https://cloud.icescrum.com/p/TESTPROJ
for the TESTPROJ project hosted on icescrum.com
username : String
Set the username of the selected iceScrum user you choose. This user must have access to the selected iceScrum project with team member role.
password
Set the password of your iceScrum user
class hudson.util.Secret
accessToken : String
authType : String
$class: 'JiraProjectProperty'
siteName : String
$class: 'JobInclusionJobProperty'
useJobGroup : boolean
jobGroupName : String
$class: 'JobOwnerJobProperty'
ownershipDescription
class com.synopsys.arc.jenkins.plugins.ownership.OwnershipDescription
security
permissionsMatrix
entries
group
name : String
permissions : Array / List of String
user
name : String
permissions : Array / List of String
userOrGroup
name : String
permissions : Array / List of String
inheritanceStrategy
(optional)
inheritingGlobal
inheriting
nonInheriting
$class: 'JobPrerequisites'
script : String
interpreter : String
$class: 'JobRestrictionProperty'
$class: 'JobTagPublisher'
tags
(optional)
value : String
(optional)
branchTearDownExecutor
jobName : String
$class: 'LeastLoadDisabledProperty'
leastLoadDisabled : boolean
$class: 'LoggingJobProperty'
pollLogging : boolean
pruneDays : int
$class: 'LogstashJobProperty'
$class: 'MantisProjectProperty'
siteName : String
projectId : int
category : String
pattern : String
regex : String
linkEnabled : boolean
$class: 'MavenInfoJobConfig'
mainModulePattern : String
dependenciesPattern : String
assignName : boolean
nameTemplate : String
assignDescription : boolean
descriptionTemplate : String
$class: 'MavenRepoCleanerProperty'
notOnThisProject : boolean
$class: 'MetadataJobProperty'
values
$class: 'DateMetadataValue'
name : String
description : String
year : int
month : int
day : int
details
hour : int
minute : int
second : int
exposedToEnvironment : boolean
$class: 'NumberMetadataValue'
name : String
description : String
value : long
exposedToEnvironment : boolean
$class: 'StringMetadataValue'
name : String
description : String
value : String
exposedToEnvironment : boolean
$class: 'TreeNodeMetadataValue'
name : String
description : String
children
$class: 'DateMetadataValue'
name : String
description : String
year : int
month : int
day : int
details
hour : int
minute : int
second : int
exposedToEnvironment : boolean
$class: 'NumberMetadataValue'
name : String
description : String
value : long
exposedToEnvironment : boolean
$class: 'StringMetadataValue'
name : String
description : String
value : String
exposedToEnvironment : boolean
$class: 'TreeNodeMetadataValue'
exposedToEnvironment : boolean
$class: 'NaginatorOptOutProperty'
optOut : boolean
overrideIndexTriggers
Allows overriding default treatment of branch indexing triggers.
If branch indexing triggers are disabled at the multibranch or organization label, selecting this will enable them for this job only.
Otherwise, leaving the checkbox unselected will disable branch indexing triggers for this job only.
enableTriggers : boolean
parameters
Each parameter has a Name and some sort of Value , depending on the parameter type. These name-value pairs will be exported as environment variables when the build starts, allowing subsequent parts of the build configuration (such as build steps) to access those values, e.g. by using the ${PARAMETER_NAME}
syntax (or %PARAMETER_NAME%
on Windows).
This also implies that each parameter defined here should have a unique Name .
When a project is parameterized, the usual Build Now link will be replaced with a Build with Parameters link, where users will be prompted to specify values for each of the defined parameters. If they choose not to enter anything, the build will start with the default value for each parameter.
If a build is started automatically, for example if started by an SCM trigger, the default values for each parameter will be used.
When a parameterized build is in the queue, attempting to start another build of the same project will only succeed if the parameter values are different, or if the Execute concurrent builds if necessary option is enabled.
See the Parameterized Builds documentation for more information about this feature.
parameterDefinitions
agentParameter
name : String
defaultValue : String
(optional)
description : String
(optional)
$class: 'AppDetectorParamaterDefinition'
name : String
appName : String
defaultValue : String
description : String
(optional)
$class: 'ArtifactRepoParamDefinition'
name : String
serverType : String
serverUrl : String
Define the URL of the repository instance.
Example URLshttp://localhost:8082/artifactory/
https://tenant.jfrog.io/artifactory/
http://localhost:8081/
credentialsId : String
Select the credentials to use to connect to the artifact repository instance.
Please be aware that currently only username/password credentials are supported.
ignoreCertificate : boolean
When checked the HTTP connection will ignore invalid certificates while trying to connect to the repository instance. This is useful when using an internal service with self-signed certificates.
Use this feature with caution as it can introduce potential security risks.
proxy
When checked it allows to define an HTTP proxy to be used for the outgoing connections.
Please note that when this option is unchecked but a global proxy is defined the connection will make use of the global proxy settings. If both the local and global proxy settings are set the local proxy settings take precedence.proxyProtocol : String
proxyHost : String
proxyPort : String
proxyCredentialsId : String
paramType : String
Select the type of information to display as a build parameter.
Artifact Path displays the name of deployed artifacts and makes the full path available.artifactName : String
Unfortunately the REST APIs do not allow for more powerful filter possibilities in regards to the artifact name. If more advanced filter possibilities are required please refer to the Filter Regex
option within the Display Options
section below.
repoName : String
The REST API of Nexus only allows to define a single repository. To harmonize the UI it was decided to limit the possibility to define repositories for Artifactory to a single entry as well.
versionRegex : String
This field allows to define a Java capturing groups to extract version information from the full artifact path. In a nutshell define a regex and define a part of a string as a group by surrounding it with ( ) brackets to define a group. The first outer group found is used to extract the version information. Following is an example for a Maven artifact with the regex .+/(\d+\.\d+(\.\d+((-CANDIDATE)?-SNAPSHOT)?)?)/.+
.
Path | Version |
---|---|
http://localhost:8081/maven-releases/org/example/test/1.0/test-1.0.jar | 1.0 |
http://localhost:8081/maven-releases/org/example/test/1.0.5/test-1.0.5.jar | 1.0.5 |
http://localhost:8081/maven-releases/org/example/test/1.0.5-CANDIDATE-SNAPSHOT/test-1.0.5-CANDIDATE-SNAPSHOT.jar | 1.0.5-CANDIDATE-SNAPSHOT |
repoType : Array / List of String
formatType : Array / List of String
multiSelection : boolean
resultsCount : String
filterRegex : String
This allows to filter the results returned from the repository before displaying it to the user for selection. Any entry matching the regular expression will be displayed.
To display all entries either leave the field empty or use the regular expression .+
.
A typical regex for Maven-based artifacts would for example look like .+/(\d+\.\d+(\.\d+(-SNAPSHOT)?)?)/.+
sortOrder : String
selectEntry : String
selectRegex : String
Please note that when a regex matches multiple entries but the display style is set to either radio button or dropdown then only the first match wins as those types do not allow for multiple entries to be selected. Furthermore, the regex is always checked against the full path and not just the displayed value.
Example:
Displayed Value: artifact-1.0.0-SNAPSHOT.jar
Full Path: http://localhost:8081/foo/bar/com.example.group/artifact/artifact-1.0.0-SNAPSHOT.jar
submitValue : String
By default the plugin will not only submit the label but also some hidden value containing the path of the item represented by the label. Sometimes however one only wants to get the value visible in the label. This option will allow you to choose what information will get passed along to the build script.
Label + Path = commons-lang3-3.12.0.jar;http://localhost:8082/repository/.../commons/commons-lang3/3.12.0/commons-lang3-3.12.0.jar Label Only = commons-lang3-3.12.0.jar Path Only = http://localhost:8082/repository/.../commons/commons-lang3/3.12.0/commons-lang3-3.12.0.jar
description : String
(optional)
base64File
Simple file parameter compatible with Pipeline. Transmits file contents as an environment variable in Base64 encoding, so it is best used with fairly small files. Example usage from Declarative Pipeline:
pipeline { agent any parameters { base64File 'FILE' } stages { stage('Example') { steps { sh 'echo $FILE | base64 -d > config.yaml' } } } }
name : String
The name of the parameter. Depending on the type of parameter, this may or may not be bound as an environment variable during the build.
If a local filename was given, an environment variable paramname_FILENAME
will also be set. If the build is triggered via the CLI, the variable will not be set.
description : String
(optional)
booleanParam
name : String
defaultValue : boolean
(optional)
description : String
(optional)
buildMasterRelease
Defines a parameter where users can pick an active release from a BuildMaster application. The following environment variables will be injected into the build job:
When used within pipeline script the applicationId parameter can contain either the id or name of a BuildMaster application.
parameters { buildMasterRelease applicationId: 'TestApplication', description: '', name: 'BuildMaster Release' }
name : String
The name of the parameter.
This value is used for display purposes only - it is not exposed as an environment variable.
applicationId : String
showApplicationId : boolean
Triggering a build from an external source
As the two fields are still presented to Jenkins as a single parameter, a slightly different approach is required to to pass in both the application id and release number from other jobs or via a build api request. This is supported by separating the two values using the pipe character '|'. The applicationId is optional, can contain either an Id or applicaton name, and is only supported if this field is checked.
description : String
(optional)
buildSelector
Defines a parameter that specifies how a Copy Artifact build step should select which build to copy from. Note that this parameter type is easier to use when starting the build from a browser; to specify a value via direct HTTP POST or the CLI, valid XML must be given.
Be aware that this string value is encoded selector configuration, and not compatible with different plugin versions.
name : String
defaultSelector
downstream
upstreamProjectName : String
Copy artifacts from a build that is a downstream of a build of the specified project. You can use variable expressions.
Downstream builds are found using fingerprints of files. That is, a build that is triggered from a build isn't always considered downstream, but you need to fingerprint files used in builds to let Jenkins track them.
Note: "Downstream build of" is applicable only to AbstractProject based projects (both upstream and downstream projects).
upstreamBuildNumber : String
lastWithArtifacts
lastCompleted
$class: 'MultiJobBuildSelector'
buildParameter
parameterName : String
You can pass not only the parameter name, but also the parameter value itself. This is useful especially used with workflow-plugin.
permalink
id : String
$class: 'PromotedBuildSelector'
level : int
latestSavedBuild
specific
buildNumber : String
lastSuccessful
stable : boolean
(optional)
upstream
allowUpstreamDependencies : boolean
(optional)
fallbackToLastSuccessful : boolean
(optional)
upstreamFilterStrategy
(optional)
UseGlobalSetting
, UseOldest
, UseNewest
workspace
description : String
(optional)
reactiveChoice
name : String
randomName : String
script
groovyScript
Use a Groovy script to define the parameter.
The Script will be evaluated first, and if it fails (e.g. throws an exception), the Fallback Script will be used as a fallback.
This script integrates with Script Security plugin to allow regular Jenkins users to configure this parameter, while limiting what they can do for security.
If this script is used for any of the HTML choice types of an Active Choices Reactive Reference Parameter, the resulting HTML output will be sanitized to remove everything but basic formatting, like script
tags, unless the script runs outside the sandbox. This mode requires approval from a Jenkins administrator to prevent cross-site scripting (HTML) and arbitrary code execution (Groovy).
script
script : String
sandbox : boolean
classpath
path : String
oldPath : String
(optional)
shouldBeApproved : boolean
(optional)
oldScript : String
(optional)
fallbackScript
script : String
sandbox : boolean
classpath
path : String
oldPath : String
(optional)
shouldBeApproved : boolean
(optional)
oldScript : String
(optional)
scriptlerScript
scriptlerBuilder
The parameters can be passed via job params or by creating these in this builder config.
builderId : String
scriptId : String
propagateParams : boolean
parameters
name : String
value : String
isSandboxed : boolean
parameters
(optional)
java.util.Map<java.lang.String, java.lang.String>
scriptlerScriptId : String
(optional)
choiceType : String
referencedParameters : String
filterable : boolean
filterLength : int
description : String
(optional)
checkboxParameter
name : String
pipelineSubmitContent : String
description : String
(optional)
protocol
(optional)
HTTP_HTTPS
, FILE_PATH
format
(optional)
YAML
, JSON
, Empty
uri : String
(optional)
displayNodePath : String
(optional)
valueNodePath : String
(optional)
useInput : boolean
(optional)
submitContent : String
(optional)
activeChoice
name : String
randomName : String
script
groovyScript
Use a Groovy script to define the parameter.
The Script will be evaluated first, and if it fails (e.g. throws an exception), the Fallback Script will be used as a fallback.
This script integrates with Script Security plugin to allow regular Jenkins users to configure this parameter, while limiting what they can do for security.
If this script is used for any of the HTML choice types of an Active Choices Reactive Reference Parameter, the resulting HTML output will be sanitized to remove everything but basic formatting, like script
tags, unless the script runs outside the sandbox. This mode requires approval from a Jenkins administrator to prevent cross-site scripting (HTML) and arbitrary code execution (Groovy).
script
script : String
sandbox : boolean
classpath
path : String
oldPath : String
(optional)
shouldBeApproved : boolean
(optional)
oldScript : String
(optional)
fallbackScript
script : String
sandbox : boolean
classpath
path : String
oldPath : String
(optional)
shouldBeApproved : boolean
(optional)
oldScript : String
(optional)
scriptlerScript
scriptlerBuilder
The parameters can be passed via job params or by creating these in this builder config.
builderId : String
scriptId : String
propagateParams : boolean
parameters
name : String
value : String
isSandboxed : boolean
parameters
(optional)
java.util.Map<java.lang.String, java.lang.String>
scriptlerScriptId : String
(optional)
choiceType : String
filterable : boolean
filterLength : int
description : String
(optional)
choice
name : String
description : String
(optional)
choices : Object
(optional)
$class: 'ClearCaseUcmBaselineParameterDefinition'
CLEARCASE_BASELINE
environment variable.
pvob : String
component : String
promotionLevel : String
stream : String
restrictions : String
05_impl/0_src
which is in the fa4_web
component of the fa4
VOB, set the value to /fa/fa4_web/05_impl/0_src
.
viewName : String
CLEARCASE_BASELINE
, which is replaced with the name of the ClearCase UCM baseline which is selected at build-time;JOB_NAME
, which is replaced with the name of the job;USER_NAME
, which is replaced with the name of the user running Hudson.CLEARCASE_VIEWNAME
;CLEARCASE_VIEWPATH
.mkviewOptionalParam : String
cleartool
arguments when creating a view using mkview
, specify them here.
-snapshot
—if applicable— and -tag ${CLEARCASE_VIEWNAME}
will be appended before these additional arguments.
mkview
command, take a look at the ClearCase 7.0 Information Center.
snapshotView : boolean
useUpdate : boolean
forceRmview : boolean
excludeElementCheckedout : boolean
element * CHECKEDOUT
rule from the config spec.
element * CHECKEDOUT
rule is mandatory when using snapshot views.
moreRecentThan : String
1 year
, 6 months
, 1 week
, 10 days
uuid : String
description : String
(optional)
$class: 'CloudSelectorParameter'
description : String
(optional)
credentials
For security reasons, the credential is NOT directly exposed, the ID of the credential is exposed.
However, the selected credential is available through variable substitution in some other parts of the configuration. The string value will be the ID of the credential. A supporting plugin can thus use the ID to retrieve the selected credential and expose it to the build in an appropriate way.name : String
defaultValue : String
credentialType : String
required : boolean
description : String
(optional)
$class: 'CvsTagsParamDefinition'
name : String
cvsRoot : String
passwordRequired : boolean
password : String
moduleName : String
description : String
(optional)
$class: 'DateParameterDefinition'
name : String
dateFormat : String
defaultValue : String
1. Java LocalDate or LocalDateTime code style
2. LocalDate String (This case should match the format of 'dateFormat')
description : String
(optional)
$class: 'DeployMetaDataParameterDefinition'
name : String
environmentKey : String
buildVersion : String
applicationName : String
description : String
(optional)
activeChoiceHtml
name : String
randomName : String
script
groovyScript
Use a Groovy script to define the parameter.
The Script will be evaluated first, and if it fails (e.g. throws an exception), the Fallback Script will be used as a fallback.
This script integrates with Script Security plugin to allow regular Jenkins users to configure this parameter, while limiting what they can do for security.
If this script is used for any of the HTML choice types of an Active Choices Reactive Reference Parameter, the resulting HTML output will be sanitized to remove everything but basic formatting, like script
tags, unless the script runs outside the sandbox. This mode requires approval from a Jenkins administrator to prevent cross-site scripting (HTML) and arbitrary code execution (Groovy).
script
script : String
sandbox : boolean
classpath
path : String
oldPath : String
(optional)
shouldBeApproved : boolean
(optional)
oldScript : String
(optional)
fallbackScript
script : String
sandbox : boolean
classpath
path : String
oldPath : String
(optional)
shouldBeApproved : boolean
(optional)
oldScript : String
(optional)
scriptlerScript
scriptlerBuilder
The parameters can be passed via job params or by creating these in this builder config.
builderId : String
scriptId : String
propagateParams : boolean
parameters
name : String
value : String
isSandboxed : boolean
parameters
(optional)
java.util.Map<java.lang.String, java.lang.String>
scriptlerScriptId : String
(optional)
choiceType : String
referencedParameters : String
omitValueField : boolean
description : String
(optional)
editableChoice
Display choices but allows inputting any values even not in choices. Works just like suggestion.
To use in pipeline:
editableChoice(
name: 'PARAM1',
choices: ['Apple', 'Grape', 'Orange'],
// belows are optional paramters
defaultValue: 'Grape',
restrict: true,
filterConfig: filterConfig(
prefix: true,
caseInsensitive: true,
),
)
name : String
choices : Array / List of String
(optional)
choicesWithText : String
(optional)
choice1 choice2 choice3
defaultValue : String
(optional)
description : String
(optional)
filterConfig
(optional)
caseInsensitive : boolean
(optional)
prefix : boolean
(optional)
Display values when their prefix matches the input. Otherwise, display values when they contains the input.
Example:
apple
orange
grape
apple
apple
grape
restrict : boolean
(optional)
withDefaultValue
(optional)
defaultValue : String
$class: 'ExtensibleChoiceParameterDefinition'
file
name : String
description : String
(optional)
fileSystemList
ALL, DIRECTORY, FILE, SYMLINK
. The order of the list can be reversed.
name : String
nodeName : String
path : String
defaultValue : String
selectedType : String
ALL, DIRECTORY, FILE, SYMLINK
.
formSelectType : String
regexIncludePattern : String
regexExcludePattern : String
sortByLastModified : boolean
sortReverseOrder : boolean
includePathInValue : boolean
description : String
(optional)
$class: 'GeneratorChoiceParameterDefinition'
name : String
choices : String
description : String
(optional)
$class: 'GeneratorKeyValueParameterDefinition'
name : String
defaultValue : String
(optional)
description : String
(optional)
trim : boolean
(optional)
gitParameter
When used, this parameter will present at build-time a choice to select a Git tag (or revision number) which set a parameter for parametrized build.
Be aware that git does not allow us get additional information (like author/commmit date) from a remote URL this plugin will silently clone the project when your workspace is empty. This may take a long time when we have a slow connection and/or the checkout is big.
Often the parameter defined in the "Name" field is used to specify the branch of the git checkout.
name : String
type : String
defaultValue : String
branch : String
branchFilter : String
tagFilter : String
sortMode
NONE
, ASCENDING_SMART
, DESCENDING_SMART
, ASCENDING
, DESCENDING
selectedValue
NONE
, TOP
, DEFAULT
useRepository : String
quickFilterEnabled : boolean
description : String
(optional)
listSize : String
(optional)
requiredParameter : boolean
(optional)
$class: 'GlobalVariableStringParameterDefinition'
name : String
defaultValue : String
(optional)
description : String
(optional)
trim : boolean
(optional)
imageTag
name : String
image : String
filter : String
registry : String
credentialId : String
description : String
(optional)
defaultTag : String
(optional)
tagOrder
(optional)
NATURAL
, REV_NATURAL
, DSC_VERSION
, ASC_VERSION
verifySsl : boolean
(optional)
$class: 'InheritableStringParameterDefinition'
name : String
inheritanceMode : String
The mode that you select here will influence the final value of the parameter, when you build the child:
mustHaveDefaultValue : boolean
mustBeAssigned : boolean
whitespaceMode : String
Do note that, if trimming is selected, this has an effect on both the default value used for automatically started builds, as well as user-initiated builds where the user had a chance to alter the parameter value.
isHidden : boolean
defaultValue : String
(optional)
description : String
(optional)
trim : boolean
(optional)
$class: 'InheritableStringParameterReferenceDefinition'
name : String
defaultValue : String
(optional)
description : String
(optional)
trim : boolean
(optional)
$class: 'JFrogPipelinesParameter'
name : String
defaultValue : String
(optional)
description : String
(optional)
trim : boolean
(optional)
$class: 'JavaParameterDefinition'
name : String
defaultJDK : String
allowedJDKs : Array / List of String
description : String
(optional)
$class: 'JiraIssueParameterDefinition'
name : String
jiraIssueFilter : String
description : String
(optional)
altSummaryFields : String
(optional)
Optionally, specify a comma-delimited list of fields to use instead of the issue summary as the title in the dropdown. Fields will be concatenated with spaces.
Example:
Field1,Field2$class: 'JiraVersionParameterDefinition'
name : String
jiraProjectKey : String
Specify the project key. A project key is the all capitals part before the issue number in Jira.
(EXAMPLE-100)
jiraReleasePattern : String
Specify a regular expression which release names have to match to be listed. Leave this blank to match all issues.
Example:
v[0-9]+([.][0-9]+)+ will match v1.0.1, v123, v12.0.1jiraShowReleased : String
jiraShowArchived : String
description : String
(optional)
jsonEditor
name : String
description : String
(optional)
options : String
(optional)
schema : String
(optional)
startval : String
(optional)
$class: 'LabelParameterDefinition'
name : String
defaultValue : String
allNodesMatchingLabel : boolean
nodeEligibility
$class: 'AllNodeEligibility'
$class: 'IgnoreOfflineNodeEligibility'
$class: 'IgnoreTempOfflineNodeEligibility'
triggerIfResult : String
description : String
(optional)
listGitBranches
When used, this parameter will display a field at build-time so that user is able to select a git branch or tag as a parameter for parametrized build..
Note that this plugin is specifically designed for pipeline jobs that do not configure SCM but still want to see remote repository branches or tags before build begins.
The plugin is highly motivated by Git Parameter Plugin.
But unlike Git Parameter Plugin, this plugin will not change working space at all at build-time
name : String
remoteURL : String
credentialsId : String
defaultValue : String
sortMode
NONE
, ASCENDING_SMART
, DESCENDING_SMART
, ASCENDING
, DESCENDING
selectedValue
NONE
, TOP
, DEFAULT
quickFilterEnabled : boolean
type : String
tagFilter : String
branchFilter : String
listSize : String
description : String
(optional)
$class: 'ListSubversionTagsParameterDefinition'
Once the two fields Name and Repository URL are set, you must
SVN_TAG
and Repository URL is set to https://svn.jenkins-ci.org/tags
, then Subversion's Repository URL must be set to https://svn.jenkins-ci.org/tags/$SVN_TAG
.
Notice that you can set the Repository URL field to a Subversion repository root rather than just pointing to a tags
dir (ie, you can set it to https://svn.jenkins-ci.org
rather than https://svn.jenkins-ci.org/tags
). In that case, if this repository root contains the trunk
, branches
and tags
folders, then the dropdown will allow the user to pick the trunk, or a branch, or a tag.
name : String
tagsDir : String
You can also specify the root of a Subversion repository: If this root contains the trunk
, branches
and tags
folders, then the dropdown will display trunk
, all the branches and all the tags. If the root does not contain these three folders, then all its subfolders are listed in the dropdown.
When you enter the URL, Jenkins automatically checks if it can connect to it. If access requires authentication, you'll be prompted for the necessary credential. If you already have a working credential but would like to change it for some other reasons, you can manage credentials and specify a different credential.
credentialsId : String
tagsFilter : String
defaultValue : String
maxTags : String
reverseByDate : boolean
If this option is checked, the Sort Z to A one won't be taken into account.
reverseByName : boolean
Notice that if Sort newest first is checked, this option won't be taken into account.
description : String
(optional)
$class: 'MatrixCombinationsParameterDefinition'
name : String
defaultCombinationFilter : String
A Groovy expression to specify which combinations are checked by default. They are also combinations which is built in a scheduled build. If not specified, the combination filter of this multi-configuration project is used. Also see help of the combination filter.
Note that you cannot enable combinations which disabled by the combination filter of the project.
shortcutList
$class: 'All'
$class: 'CombinationFilterShortcut'
name : String
combinationFilter : String
$class: 'None'
$class: 'PreviousShortcut'
$class: 'ResultShortcut'
name : String
exact : boolean
resultsToCheck : Array / List of String
description : String
(optional)
mavenMetadataVersions
name : String
repoBaseUrl : String
groupId : String
artifactId : String
packaging : String
classifier : String
versionFilter : String
sortOrder : String
defaultValue : String
maxVersions : String
currentArtifactInfoUrl : String
currentArtifactInfoLabel : String
currentArtifactInfoPattern : String
credentialsId : String
description : String
(optional)
multiselect
name : String
description : String
(optional)
decisionTree
(optional)
itemList
(optional)
label : String
(optional)
value : String
(optional)
children
(optional)
variableDescriptions
(optional)
label : String
(optional)
variableName : String
(optional)
format
(optional)
CSV
$class: 'NetstormTestParameterDefinition'
name : String
keyword : String
description : String
(optional)
$class: 'NodeParameterDefinition'
name : String
defaultSlaves : Array / List of String
allowedSlaves : Array / List of String
triggerIfResult : String
nodeEligibility
$class: 'AllNodeEligibility'
$class: 'IgnoreOfflineNodeEligibility'
$class: 'IgnoreTempOfflineNodeEligibility'
description : String
(optional)
ontrackChoiceParam
Gets a list of parameter value to choose from, using the execution of a Ontrack DSL script.
The script is expected to return a list of objects (a single object will be converted into a singleton list) and the parameter value of each item will be extracted from this object using the property defined in the Value property field.
name : String
dsl : String
sandbox : boolean
valueProperty : String
injectProperties : String
description : String
(optional)
ontrackMultiChoiceParam
Gets a list of parameter value to choose from, using the execution of a Ontrack DSL script.
The script is expected to return a list of objects (a single object will be converted into a singleton list) and the parameter value of each item will be extracted from this object using the property defined in the Value property field.
name : String
dsl : String
sandbox : boolean
valueProperty : String
injectProperties : String
description : String
(optional)
ontrackSingleParam
Gets a parameter value from the execution of a Ontrack DSL script.
The script is expected to return a single object and the value of the parameter will be extracted from this object using the property defined in the Value property field.
name : String
dsl : String
sandbox : boolean
valueProperty : String
injectProperties : String
description : String
(optional)
$class: 'PackageChoiceParameterDefinition'
name : String
baseUrl : String
username[:password]@
between the scheme and the hostname.
credentialsId : String
/$username/keys/$fingerprint
.
requestTimeout : long
serviceTimeout : long
multiselect : boolean
excludeNotInstalled : boolean
excludeModified : boolean
visibleItemCount : long
query : String
packageIdFilter : String
value : String
description : String
(optional)
$class: 'PackageParameterDefinition'
name : String
rep : String
pkg : String
description : String
(optional)
separator
name : String
separatorStyle : String
sectionHeader : String
sectionHeaderStyle : String
description : String
(optional)
$class: 'PatchParameterDefinition'
description : String
(optional)
persistentBoolean
name : String
defaultValue : boolean
successfulOnly : boolean
description : String
(optional)
persistentChoice
name : String
description : String
(optional)
choices : Object
(optional)
successfulOnly : boolean
(optional)
$class: 'PersistentPackageParameterDefinition'
name : String
useAwsKeys : boolean
If you need to access the repository outside of the repository, you will need grant access to the S3 bucket.
When accessing it from within AWS, it's probable that the server itself provides the necessary access rights.
When accessing it from outside, you need to provide a key pair. These are set up in the AWS admin console. If you don't have access, please ask operations to create a new key pair with access to the specified bucket.
awsAccessKeyId : String
This is the AWS secret key setup in the AWS console. It will resemble the form: ‘AAAAAAAAAA2AAA2AAAAA’
If you don't have access to the AWS console, and you need an access key pair, please contact someone in operations.
awsSecretAccessKey : String
This is the AWS secret key setup in the AWS console. It will resemble the form: ‘XxXXXxx/1ZZz1zZZZ11zzZ1zz/YyYyYyyYyyyyYY’
If you don't have access to the AWS console, and you need an access key pair, please contact someone in operations.
bucketName : String
This should be set to a valid bucket name that you can access using the key value pair, or if within AWS, that the server has access to.
Ensure that the bucket specified contains the repo. It might sound obvious, but I just wanted to point that out.
repoPath : String
This is the path to the actual repo containing the artifacts, relative to the AWS S3 bucket.
For example, given the S3 bucket ‘vhols-common-test-yumrepo’, the path to the locations-public-api repo is repos/locations-public-api
repositoryType : String
description : String
(optional)
persistentString
name : String
defaultValue : String
successfulOnly : boolean
trim : boolean
description : String
(optional)
persistentText
name : String
defaultValue : String
successfulOnly : boolean
description : String
(optional)
$class: 'PersistentYumParameterDefinition'
name : String
useAwsKeys : boolean
If you need to access the repository outside of the repository, you will need grant access to the S3 bucket.
When accessing it from within AWS, it's probable that the server itself provides the necessary access rights.
When accessing it from outside, you need to provide a key pair. These are set up in the AWS admin console. If you don't have access, please ask operations to create a new key pair with access to the specified bucket.
awsAccessKeyId : String
This is the AWS secret key setup in the AWS console. It will resemble the form: ‘AAAAAAAAAA2AAA2AAAAA’
If you don't have access to the AWS console, and you need an access key pair, please contact someone in operations.
awsSecretAccessKey : String
This is the AWS secret key setup in the AWS console. It will resemble the form: ‘XxXXXxx/1ZZz1zZZZ11zzZ1zz/YyYyYyyYyyyyYY’
If you don't have access to the AWS console, and you need an access key pair, please contact someone in operations.
bucketName : String
This should be set to a valid bucket name that you can access using the key value pair, or if within AWS, that the server has access to.
Ensure that the bucket specified contains the repo. It might sound obvious, but I just wanted to point that out.
repoPath : String
This is the path to the actual repo containing the artifacts, relative to the AWS S3 bucket.
For example, given the S3 bucket ‘vhols-common-test-yumrepo’, the path to the locations-public-api repo is repos/locations-public-api
description : String
(optional)
$class: 'PromotedBuildParameterDefinition'
name : String
jobName : String
process : String
description : String
(optional)
$class: 'PromotionLevelParameter'
name : String
defaultLevel : int
description : String
(optional)
$class: 'RandomStringParameterDefinition'
name : String
failedValidationMessage : String
description : String
(optional)
RESTList
name : String
restEndpoint : String
credentialId : String
mimeType
APPLICATION_JSON
, APPLICATION_XML
valueExpression : String
description : String
(optional)
displayExpression : String
(optional)
cacheTime : int
(optional)
defaultValue : String
(optional)
filter : String
(optional)
valueOrder
(optional)
NONE
, ASC
, DSC
, REV
$class: 'ReviewboardParameterDefinition'
defaultValue : String
(optional)
description : String
(optional)
trim : boolean
(optional)
$class: 'RunFilterParameter'
run
name : String
projectName : String
filter
ALL
, STABLE
, SUCCESSFUL
, COMPLETED
description : String
(optional)
$class: 'RunSelectorParameter'
$class: 'SauceParameterDefinition'
description : String
(optional)
$class: 'ScriptSelectionTaskDefinition'
name : String
path : String
arrayCheckBox
name : String
variableName : String
check : boolean
type : String
parent : String
testDelimSymbol : String
nodeDelimSymbol : String
countDelimiterSymbol : int
delimiter : String
defaultValue : String
description : String
(optional)
snParam
credentialsForPublishedApp : String
instanceForPublishedAppUrl : String
credentialsForInstalledApp : String
instanceForInstalledAppUrl : String
sysId : String
application scope
is not specified. The system id of the application for which to apply the changes. You can locate this value in the Sys ID field in the Custom Application [sys_app] table.
appScope : String
application system ID
is not specified. The scope name of the application for which to apply the changes, such as x_aah_custom_app. You can locate this value in the scope field in the Custom Application [sys_app] table.
publishedAppVersion : String
rollbackAppVersion : String
batchRollbackId : String
progressCheckInterval : int
description : String
(optional)
$class: 'SpringBootLibrariesListParameterDefinition'
springBootVersion : String
defaultValue : String
(optional)
description : String
(optional)
trim : boolean
(optional)
$class: 'StashBranchParameterDefinition'
name : String
repository : String
defaultValue : String
description : String
(optional)
branchNameRegex : String
(optional)
tagNameRegex : String
(optional)
stashedFile
File parameter compatible with Pipeline but using the stash system, better suited to large files. The file will be saved to a stash named like the parameter containing one entry, also named like the parameter. Example usage from Declarative Pipeline:
pipeline { agent any parameters { stashedFile 'assets.zip' } stages { stage('Example') { steps { unstash 'assets.zip' sh 'unzip assets.zip' } } } }
name : String
The name of the parameter. Depending on the type of parameter, this may or may not be bound as an environment variable during the build.
If a local filename was given, an environment variable paramname_FILENAME
will also be set. If the build is triggered via the CLI, the variable will not be set.
description : String
(optional)
string
name : String
defaultValue : String
(optional)
description : String
(optional)
trim : boolean
(optional)
$class: 'TestExecuter'
name : String
propertiesFilePath : String
enableField
text : String
groupBy
text : String
fieldSeparator
text : String
showFields
text : String
multiplicityField
text : String
description : String
(optional)
text
name : String
defaultValue : String
(optional)
description : String
(optional)
trim : boolean
(optional)
$class: 'ToolVersionParameterDefinition'
toolName : String
description : String
(optional)
$class: 'VBoxParameterDefinition'
name : String
nodeDelimiter : String
description : String
(optional)
email
name : String
defaultValue : String
domain : String
externalEmail : boolean
description : String
(optional)
validatingString
name : String
These parameters are exposed to build as environment variables.
defaultValue : String
regex : String
Standard Java regular expression that will be used to validate the entered string parameter value.
failedValidationMessage : String
This message is displayed to the user if they enter a value that does not match the configured regular expression.
description : String
(optional)
validatingYamlParameter
name : String
defaultValue : String
failedValidationMessage : String
This message is displayed to the user if they enter a value that is not a syntactical correct YAML
description : String
(optional)
$class: 'VersionParameterDefinition'
name : String
groupId : String
artifactId : String
description : String
(optional)
includeReleases : boolean
(optional)
includeSnapshots : boolean
(optional)
limit : String
(optional)
oldestFirst : boolean
(optional)
repositoryId : String
(optional)
useLatest : boolean
(optional)
useRelease : boolean
(optional)
hidden
name : String
defaultValue : String
description : String
(optional)
$class: 'WReadonlyStringParameterDefinition'
name : String
defaultValue : String
description : String
(optional)
$class: 'WReadonlyTextParameterDefinition'
name : String
defaultValue : String
description : String
(optional)
extendedChoice
This parameter adds various types of choice fields to the Pipeline Input Step.
name : String
type : String
Country City United States San Francisco United States Chicago Mexico Mexico City Mexico CancunThis would result in a first drop down with the options "Select a country...", "United States", and "Mexico" (the initial selection is "Select a country...", which serves as a label for the drop down). After the user selects a country, a "City" drop down would appear. If United States was chosen first, then San Francisco and Chicago would be options, but if Mexico was selected then instead Mexico City and Cancun would be options.
value : String
projectName : String
propertyFile : String
prop1=a,b,c,d,eThe properties file can be placed anywhere on the file-system that Jenkins can access.
prop2=${prop1},f,g,h
groovyScript : String
groovyScriptFile : String
bindings : String
groovyClasspath : String
propertyKey : String
prop1=a,b,c,d,eThen you could specify the property as either prop1 or prop2.
prop2=1,2,3,4
defaultValue : String
defaultPropertyFile : String
defaultGroovyScript : String
defaultGroovyScriptFile : String
defaultBindings : String
defaultGroovyClasspath : String
defaultPropertyKey : String
descriptionPropertyValue : String
descriptionPropertyFile : String
descriptionGroovyScript : String
descriptionGroovyScriptFile : String
descriptionBindings : String
descriptionGroovyClasspath : String
descriptionPropertyKey : String
javascriptFile : String
javascript : String
saveJSONParameterToFile : boolean
quoteValue : boolean
visibleItemCount : int
multiSelectDelimiter : String
Inserts this value between selections when the parameter is a multi-select.
The default when empty is ','
description : String
(optional)
$class: 'com.michelin.cio.hudson.plugins.passwordparam.PasswordParameterDefinition'
name : String
description : String
(optional)
$class: 'com.moded.extendedchoiceparameter.ExtendedChoiceParameterDefinition'
name : String
type : String
Country City United States San Francisco United States Chicago Mexico Mexico City Mexico CancunThis would result in a first drop down with the options "Select a country...", "United States", and "Mexico" (the initial selection is "Select a country...", which serves as a label for the drop down). After the user selects a country, a "City" drop down would appear. If United States was chosen first, then San Francisco and Chicago would be options, but if Mexico was selected then instead Mexico City and Cancun would be options.
value : String
propertyFile : String
prop1=a,b,c,d,eThe properties file can be placed anywhere on the file-system that Jenkins can access.
prop2=${prop1},f,g,h
propertyKey : String
prop1=a,b,c,d,eThen you could specify the property as either prop1 or prop2.
prop2=1,2,3,4
defaultValue : String
defaultPropertyFile : String
defaultPropertyKey : String
quoteValue : boolean
visibleItemCount : int
multiSelectDelimiter : String
Inserts this value between selections when the parameter is a multi-select.
The default when empty is ','
bindFieldName : String
svnPath : boolean
svnUrl : String
svnUserName : String
svnPassword : String
projectName : String
roleBasedFilter : boolean
description : String
(optional)
password
name : String
defaultValueAsSecret
class hudson.util.Secret
description : String
(optional)
realTimeJUnitReports
$class: 'PermalinkStorage'
$class: 'PipelineConfigProjectProperty'
namespace : String
name : String
uid : String
resourceVersion : String
contextAnnotation : String
$class: 'PipelineProperty'
Configure a task name and which stage the project should be grouped by in the delivery pipeline view.
taskName : String
stageName : String
descriptionTemplate : String
pipelineTriggers
$class: 'PipelineYAMLJobProperty'
yamlConfiguration : String
preserveStashes
stash
es from the most recent completed builds of this project. This allows a restarted Declarative Pipeline to reuse a stash
from the build it was restarted from.
buildCount : int
(optional)
$class: 'PriorityJobProperty'
useJobPriority : boolean
priority : int
$class: 'ProjectIdentity'
projectRole : String
familyID : String
projectID : String
sidebarLinks
links
urlName : String
displayName : String
iconFileName : String
$class: 'RebuildSettings'
autoRebuild : boolean
rebuildDisabled : boolean
$class: 'RedmineProjectProperty'
redmineWebsiteName : String
projectName : String
$class: 'RedpenJobProperty'
credentialId : String
logFileLocation : String
unitTestFrameWork : String
Select the unit test framework to inform Redpen plugin to pick and send the log files generated by the selected framework.
Redpen plugin will search for the logs from the default/standard path of the selected framework.
If the log files are stored other than the default/standard path, then click on the 'Custom Path' button and provide a custom path.
e2eTestFrameWork : String
Select the e2e test framework to inform Redpen plugin to pick and send the log files generated by the selected framework.
Redpen plugin will search for the logs from the default/standard path of the selected framework.
If the log files are stored other than the default/standard path, then click on the 'Custom Path' button and provide a custom path.
coverageFrameWork : String
Select the code coverage framework to inform Redpen plugin to pick and send the log files generated by the selected framework.
Redpen plugin will search for the logs from the default/standard path of the selected framework.
If the log files are stored other than the default/standard path, then click on the 'Custom Path' button and provide a custom path.
unitTestFrameWorkPath : String
e2eTestFrameWorkPath : String
coverageFrameWorkPath : String
userEmail : String
userPassword
class hudson.util.Secret
$class: 'RequeueJobProperty'
requeueJob : boolean
$class: 'RequiredResourcesProperty'
resourceNames : String
When a build is scheduled, it will attempt to lock the specified resources. If some (or all) the resources are already locked by another build, the build will be queued until they are released. It is possible to specify an amount for requested resources below.
resourceNamesVar : String
Name for the Jenkins variable to store the reserved resources in. Leave empty to disable.
resourceNumber : String
Number of resources to request, empty value or 0 means all.
This is useful, if you have a pool of similar resources, from which you want one or more to be reserved.
labelName : String
If you have created a pool of resources, i.e. a label, you can take it into use here. The build will select the resource(s) from the pool that includes all resources sharing the given label. Only one of Label, Groovy Expression or Resources fields may be specified.
resourceMatchScript
You can specify a groovy expression to be evaluated each time a resource is checked to be appropriate for a build. The expression must result into a boolean value. The following variables are available, in addition to optional arguments of the currently evaluated build:
java.util.List<String>
of labels as per resource configuration
For matrix jobs, axis names and axis values can be referenced as well. Examples:
resourceLabels.contains("hardcoded")
resourceLabels.contains(axisName)
resourceName == axisName
The script's contents need to pass approval by the Script Security Plugin.
script : String
sandbox : boolean
classpath
path : String
oldPath : String
(optional)
shouldBeApproved : boolean
(optional)
oldScript : String
(optional)
requireResources
resources : Array / List of String
$class: 'ScannerJobProperty'
doNotScan : boolean
$class: 'SharedWorkspace'
name : String
url : String
splunkinsJobOption
Enable sending pipeline execution diagram by default
enableDiagram : boolean
(optional)
$class: 'SpringProfilesJobProperty'
springProfiles : String
(optional)
$class: 'TemplateImplementationProperty'
templateJobName : String
exclusions : Array / List of String
syncDescription : boolean
syncDisabled : boolean
syncMatrixAxis : boolean
syncBuildTriggers : boolean
syncSecurity : boolean
syncScm : boolean
syncOwnership : boolean
syncAssignedLabel : boolean
$class: 'TemplateProperty'
$class: 'TemplateWorkflowInstances'
instances
java.util.Map<java.lang.String, org.jenkins.plugin.templateWorkflows.TemplateWorkflowInstance>
$class: 'TemplateWorkflowProperty'
templateName : String
isStartingWorkflowJob : boolean
throttleJobProperty
Note that the Throttle Concurrent Builds configuration here does not work for Pipeline jobs.
For that, use the throttle
step.
maxConcurrentPerNode : int
The maximum number of concurrent builds of this project (or category) to be allowed to run per node.
maxConcurrentTotal : int
The maximum number of concurrent builds of this project (or category) to be allowed to run at any one time, across all nodes.
categories : Array / List of String
Categories can be used to throttle multiple projects.
Categories can be optionally configured with pairs of throttled Jenkins node labels.
Pairs can make each maximum applicable to nodes with matching labels only.
That is achieved by adding such Maximum Per Labeled Node pair(s) to any category.
Category's Maximum Concurrent Builds Per Node is superseded by matching-pair's maximum.
throttleEnabled : boolean
throttleOption : String
limitOneJobWithMatchingParams : boolean
If this box is checked, only one instance of the job with matching parameter values will be allowed to run at a given time. Other instances of this job with different parameter values will be allowed to run concurrently.
Optionally, provide a comma- or whitespace-separated list of parameters to use when comparing jobs. If blank, all parameters must match for a job to be limited to one running instance.
paramsToUseForLimit : String
matrixOptions
throttleMatrixBuilds : boolean
throttleMatrixConfigurations : boolean
$class: 'TracProjectProperty'
tracWebsite : String
$class: 'TrackingGitProperty'
If enabled, the Git revisions that are checked out for this project will track the revisions in another project.
The Git configuration must still be entered.
When building, the TRACKING_GIT_BUILD environment variable will contain the URL of the tracked build.
It is generally useless to use SCM polling if Git tracking is enabled. Instead, trigger this project from the tracked project.
sourceProject : String
toTrack
LAST_STABLE
, LAST_SUCCESSFUL
, LAST_BUILD
, LAST_FAILED_BUILD
$class: 'TrackingSVNProperty'
If enabled, the Subversion revisions that are checked out for this project will track the revisions in another project.
The Subversion configuration must still be entered. More than one module may be used, and the revision tracking will happen for any URL in this project that exactly matches the tracked project. For all other modules, the latest revision will be used.
When building, the TRACKING_SVN_BUILD environment variable will contain the URL of the tracked build.
It is generally useless to use SCM polling if SVN tracking is enabled. Instead, trigger this project from the tracked project.
sourceProject : String
toTrack
LAST_STABLE
, LAST_SUCCESSFUL
, LAST_BUILD
, LAST_FAILED_BUILD
ignoredURLs : String
$class: 'TransifexProjectProperty'
projectUrl : String
$class: 'UpdateTransientProperty'
$class: 'UrlProperty'
url : String
The live branch url has the following format: https://www.gitcolony.com/event/number/branch/token.
Note: you can use build parameters in any of the components by using the $var syntax.
For example: "https://www.gitcolony.com/event/1234/$branch/111111" would expand the branch name from the branch build parameter.
For more information visit www.gitcolony.com.
$class: 'WallDisplayJobProperty'
wallDisplayName : String
wallDisplayBgPicture : String
wallDisplayOrder : String
$class: 'WatcherJobProperty'
watcherAddresses : String
$class: 'WavefrontJobProperty'
enableSendingJacocoReportData : boolean
(optional)
enableSendingJobParameters : boolean
(optional)
enableSendingJunitReportData : boolean
(optional)
jobParameters : String
(optional)
$class: 'WorkflowJobProperty'
namespace : String
name : String
uid : String
resourceVersion : String
contextAnnotation : String
$class: 'YouTrackProjectProperty'
$class: 'ZanataWebhookProjectProperty'
zanataWebhookSecret
class hudson.util.Secret
URLForWebhook : String
$class: 'ZenTimestampJobProperty'
changeBUILDID : boolean
The Jenkins BUILD_TIMESTAMP variable uses by default the date and time 'YYYY-MM-DD_hh-mm-ss' of the international standard.
You can change this format by providing your own pattern.
pattern : String
You must specify a java.text.SimpleDateFormat pattern. For example give the following value: yyyyMMddHHmmss.
authorizationMatrixFork
entries
group
name : String
permissions : Array / List of String
user
name : String
permissions : Array / List of String
userOrGroup
name : String
permissions : Array / List of String
inheritanceStrategy
(optional)
inheritingGlobal
inheriting
nonInheriting
$class: 'com.tikal.hudson.plugins.notification.HudsonNotificationProperty'
endpoints
urlInfo
urlType
SECRET
, PUBLIC
urlOrId : String
branch : String
(optional)
buildNotes : String
(optional)
event : String
(optional)
format
(optional)
XML
, JSON
loglines : int
(optional)
protocol
(optional)
UDP
, TCP
, HTTP
retries : int
(optional)
timeout : int
(optional)
$class: 'hudson.plugins.jobConfigHistory.JobLocalConfiguration'
changeReasonComment : String
$class: 'hudson.plugins.svn_partial_release_mgr.ui.JobPropertyImpl'
authorizationMatrix
entries
group
name : String
permissions : Array / List of String
user
name : String
permissions : Array / List of String
userOrGroup
name : String
permissions : Array / List of String
inheritanceStrategy
(optional)
inheritingGlobal
inheriting
nonInheriting
$class: 'it.dockins.dockerslaves.spec.ContainerSetDefinition'
rateLimitBuilds
throttle
count : int
durationName : String
userBoost : boolean
$class: 'jenkins.plugins.elanceodesk.workplace.notifier.WebhookJobProperty'
webhooks
url : String
startNotification : boolean
notifySuccess : boolean
notifyAborted : boolean
notifyNotBuilt : boolean
notifyUnstable : boolean
notifyFailure : boolean
notifyBackToNormal : boolean
timeout : int
$class: 'jenkins.plugins.mdtdeploy.JobPropertyImpl'
office365ConnectorWebhooks
webhooks
url : String
factDefinitions
(optional)
name : String
(optional)
template : String
(optional)
macros
(optional)
template : String
value : String
name : String
(optional)
notifyAborted : boolean
(optional)
notifyBackToNormal : boolean
(optional)
notifyFailure : boolean
(optional)
notifyNotBuilt : boolean
(optional)
notifyRepeatedFailure : boolean
(optional)
notifySuccess : boolean
(optional)
notifyUnstable : boolean
(optional)
startNotification : boolean
(optional)
timeout : int
(optional)
$class: 'org.jenkins.ci.plugins.html5_notifier.JobPropertyImpl'
skip : boolean
$class: 'org.jenkinsci.plugins.ZMQEventPublisher.HudsonNotificationProperty'
enabled : boolean
$class: 'org.jenkinsci.plugins.periodicreincarnation.JobLocalConfiguration'
optionalBlock
isEnabled : boolean
maxDepth : int
isLocallyDeactivated : boolean
$class: 'sh.hyper.hyperslaves.spec.ContainerSetDefinition'
buildHostImage
$class: 'ImageIdContainerDefinition'
image : String
size : String
forcePull : boolean
latest
image. Will slow down the build, but ensure you always run the up-to-date image.readTrusted
: Read trusted file from SCMreadFile
step, no workspace is required. If the associated branch is not trusted, yet the file has been modified from its trusted version, an error is thrown. Thus this step is useful for loading scripts or other files which might otherwise be used to run malicious commands. Like checkout scm
, as a convenience it may also be used from a standalone project configured with Pipeline from SCM, in which case there is no security aspect.
path : String
readTrusted 'subdir/file'
is similar to node {checkout scm; readFile 'subdir/file'}
.
resolveScm
: Resolves an SCM from an SCM Source and a list of candidate target branch namesThis step lets you create a branch in the primary repository and then when you need downstream / upstream changes in the sibling repository you can just create a matching branch and it will be resolved automatically. For example:
// checkout the main source dir('main'){ // this will checkout the source repository that is driving the multi-branch pipeline checkout scm } // now checkout the tests dir('tests'){ // this will check if there is a branch with the same name as the current branch in // https://example.com/example.git and use that for the checkout, but if there is no // branch with the same name it will fall back to the master branch checkout resolveScm(source: git('https://example.com/example.git'), targets: [BRANCH_NAME,'master'] } // rest of pipeline
The return value is the resolved SCM instance (or null
if ignoring errors). Where the SCM implementation supports it, the SCM instance will be pinned to the current head revision of the resolved branch. This can be useful if, for example, you want to check out the resolved branch on multiple nodes because all the nodes will get the same revision.
source
$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
$class: 'Stash'
repoUrl : String
teamFoundation
repoUrl : String
If TFS is also used as the repository server, this can usually be left blank.
$class: 'TracGitRepositoryBrowser'
$class: 'TuleapBrowser'
repositoryUrl : String
viewgit
repoUrl : String
projectName : String
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'
lfs
$class: 'GitSCMChecksExtension'
verboseConsoleLog : boolean
(optional)
$class: 'GitSCMStatusChecksExtension'
name : String
(optional)
skip : boolean
(optional)
skipProgressUpdates : boolean
(optional)
suppressLogs : boolean
(optional)
unstableBuildNeutral : boolean
(optional)
$class: 'GitTagMessageExtension'
useMostRecentTag : boolean
(optional)
$class: 'IgnoreNotifyCommit'
localBranch
If selected, and its value is an empty string or "**", then the branch name is computed from the remote branch without the origin. In that case, a remote branch origin/master will be checked out to a local branch named master, and a remote branch origin/develop/new-feature will be checked out to a local branch named develop/newfeature.
Please note that this has not been tested with submodules.
localBranch : String
$class: 'MessageExclusion'
excludedMessage : String
.*\[maven-release-plugin\].*The example above illustrates that if only revisions with "[maven-release-plugin]" message in first comment line have been committed to the SCM a build will not occur. You can create more complex patterns using embedded flag expressions.
(?s).*FOO.*This example will search FOO message in all comment lines.
$class: 'PathRestriction'
includedRegions : String
myapp/src/main/web/.*\.html myapp/src/main/web/.*\.jpeg myapp/src/main/web/.*\.gifThe example above illustrates that a build will only occur, if html/jpeg/gif files have been committed to the SCM. Exclusions take precedence over inclusions, if there is an overlap between included and excluded regions.
excludedRegions : String
myapp/src/main/web/.*\.html myapp/src/main/web/.*\.jpeg myapp/src/main/web/.*\.gifThe example above illustrates that if only html/jpeg/gif files have been committed to the SCM a build will not occur.
perBuildTag
$class: 'PreBuildMerge'
options
mergeTarget : String
master
.
fastForwardMode
(optional)
FF
, FF_ONLY
, NO_FF
mergeRemote : String
(optional)
origin
, that contains the branch you specify below. If left blank, it'll default to the name of the first repository configured above.
mergeStrategy
(optional)
DEFAULT
, RESOLVE
, RECURSIVE
, OCTOPUS
, OURS
, SUBTREE
, RECURSIVE_THEIRS
pretestedIntegration
gitIntegrationStrategy
accumulated
shortCommitMessage : boolean
(optional)
ffonly
shortCommitMessage : boolean
(optional)
squash
integrationBranch : String
The branch name must match your integration branch name. No trailing slash.
git checkout -B <Branch name> <Repository name>/<Branch name> git merge --squash <Branch matched by git> git commit -C <Branch matched by git>
git checkout -B <Branch name> <Repository name>/<Branch name> git merge -m <commitMsg> <Branch matched by git> --no-ff
Changes are only ever pushed when the build results is SUCCESS
git push <Repository name> <Branch name>
repoName : String
The repository name. In git the repository is always the name of the remote. So if you have specified a repository name in your Git configuration. You need to specify the exact same name here, otherwise no integration will be performed. We do the merge based on this.
No trailing slash on repository name.
Remember to specify this when working with NAMED repositories in Git
pruneStaleBranch
pruneTags
pruneTags : boolean
$class: 'RelativeTargetDirectory'
relativeTargetDir : String
This extension should not be used in Jenkins Pipeline (either declarative or scripted). Jenkins Pipeline already provides standard techniques for checkout to a subdirectory. Use ws and dir in Jenkins Pipeline rather than this extension.
$class: 'ScmName'
Unique name for this SCM. Needed when using Git within the Multi SCM plugin.
name : String
$class: 'SparseCheckoutPaths'
Specify the paths that you'd like to sparse checkout. This may be used for saving space (Think about a reference repository). Be sure to use a recent version of Git, at least above 1.7.10
sparseCheckoutPaths
path : String
submodule
depth : int
(optional)
disableSubmodules : boolean
(optional)
parentCredentials : boolean
(optional)
recursiveSubmodules : boolean
(optional)
reference : String
(optional)
git init --bare git remote add SubProject1 https://gitrepo.com/subproject1 git remote add SubProject2 https://gitrepo.com/subproject2 git fetch --all
shallow : boolean
(optional)
threads : int
(optional)
timeout : int
(optional)
trackingSubmodules : boolean
(optional)
$class: 'UserExclusion'
excludedUsers : String
auto_build_userThe example above illustrates that if only revisions by "auto_build_user" have been committed to the SCM a build will not occur.
$class: 'UserIdentity'
name : String
If given, "GIT_COMMITTER_NAME=[this]" and "GIT_AUTHOR_NAME=[this]" are set for builds. This overrides whatever is in the global settings.
email : String
If given, "GIT_COMMITTER_EMAIL=[this]" and "GIT_AUTHOR_EMAIL=[this]" are set for builds. This overrides whatever is in the global settings.
$class: 'WipeWorkspace'
gitTool : String
(optional)
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
$class: 'Stash'
repoUrl : String
teamFoundation
repoUrl : String
If TFS is also used as the repository server, this can usually be left blank.
$class: 'TracGitRepositoryBrowser'
$class: 'TuleapBrowser'
repositoryUrl : String
viewgit
repoUrl : String
projectName : String
$class: 'BitbucketJiraValidatorTrait'
jiraServerIdx : int
$class: 'BitbucketPullRequestDiscoveryTrait'
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
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
$class: 'Stash'
repoUrl : String
teamFoundation
repoUrl : String
If TFS is also used as the repository server, this can usually be left blank.
$class: 'TracGitRepositoryBrowser'
$class: 'TuleapBrowser'
repositoryUrl : String
viewgit
repoUrl : String
projectName : String
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
$class: 'Stash'
repoUrl : String
teamFoundation
repoUrl : String
If TFS is also used as the repository server, this can usually be left blank.
$class: 'TracGitRepositoryBrowser'
$class: 'TuleapBrowser'
repositoryUrl : String
viewgit
repoUrl : String
projectName : String
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'
lfs
$class: 'GitSCMChecksExtension'
verboseConsoleLog : boolean
(optional)
$class: 'GitSCMStatusChecksExtension'
name : String
(optional)
skip : boolean
(optional)
skipProgressUpdates : boolean
(optional)
suppressLogs : boolean
(optional)
unstableBuildNeutral : boolean
(optional)
$class: 'GitTagMessageExtension'
useMostRecentTag : boolean
(optional)
$class: 'IgnoreNotifyCommit'
localBranch
If selected, and its value is an empty string or "**", then the branch name is computed from the remote branch without the origin. In that case, a remote branch origin/master will be checked out to a local branch named master, and a remote branch origin/develop/new-feature will be checked out to a local branch named develop/newfeature.
Please note that this has not been tested with submodules.
localBranch : String
$class: 'MessageExclusion'
excludedMessage : String
.*\[maven-release-plugin\].*The example above illustrates that if only revisions with "[maven-release-plugin]" message in first comment line have been committed to the SCM a build will not occur. You can create more complex patterns using embedded flag expressions.
(?s).*FOO.*This example will search FOO message in all comment lines.
$class: 'PathRestriction'
includedRegions : String
myapp/src/main/web/.*\.html myapp/src/main/web/.*\.jpeg myapp/src/main/web/.*\.gifThe example above illustrates that a build will only occur, if html/jpeg/gif files have been committed to the SCM. Exclusions take precedence over inclusions, if there is an overlap between included and excluded regions.
excludedRegions : String
myapp/src/main/web/.*\.html myapp/src/main/web/.*\.jpeg myapp/src/main/web/.*\.gifThe example above illustrates that if only html/jpeg/gif files have been committed to the SCM a build will not occur.
perBuildTag
$class: 'PreBuildMerge'
options
mergeTarget : String
master
.
fastForwardMode
(optional)
FF
, FF_ONLY
, NO_FF
mergeRemote : String
(optional)
origin
, that contains the branch you specify below. If left blank, it'll default to the name of the first repository configured above.
mergeStrategy
(optional)
DEFAULT
, RESOLVE
, RECURSIVE
, OCTOPUS
, OURS
, SUBTREE
, RECURSIVE_THEIRS
pretestedIntegration
gitIntegrationStrategy
accumulated
shortCommitMessage : boolean
(optional)
ffonly
shortCommitMessage : boolean
(optional)
squash
integrationBranch : String
The branch name must match your integration branch name. No trailing slash.
git checkout -B <Branch name> <Repository name>/<Branch name> git merge --squash <Branch matched by git> git commit -C <Branch matched by git>
git checkout -B <Branch name> <Repository name>/<Branch name> git merge -m <commitMsg> <Branch matched by git> --no-ff
Changes are only ever pushed when the build results is SUCCESS
git push <Repository name> <Branch name>
repoName : String
The repository name. In git the repository is always the name of the remote. So if you have specified a repository name in your Git configuration. You need to specify the exact same name here, otherwise no integration will be performed. We do the merge based on this.
No trailing slash on repository name.
Remember to specify this when working with NAMED repositories in Git
pruneStaleBranch
pruneTags
pruneTags : boolean
$class: 'RelativeTargetDirectory'
relativeTargetDir : String
This extension should not be used in Jenkins Pipeline (either declarative or scripted). Jenkins Pipeline already provides standard techniques for checkout to a subdirectory. Use ws and dir in Jenkins Pipeline rather than this extension.
$class: 'ScmName'
Unique name for this SCM. Needed when using Git within the Multi SCM plugin.
name : String
$class: 'SparseCheckoutPaths'
Specify the paths that you'd like to sparse checkout. This may be used for saving space (Think about a reference repository). Be sure to use a recent version of Git, at least above 1.7.10
sparseCheckoutPaths
path : String
submodule
depth : int
(optional)
disableSubmodules : boolean
(optional)
parentCredentials : boolean
(optional)
recursiveSubmodules : boolean
(optional)
reference : String
(optional)
git init --bare git remote add SubProject1 https://gitrepo.com/subproject1 git remote add SubProject2 https://gitrepo.com/subproject2 git fetch --all
shallow : boolean
(optional)
threads : int
(optional)
timeout : int
(optional)
trackingSubmodules : boolean
(optional)
$class: 'UserExclusion'
excludedUsers : String
auto_build_userThe example above illustrates that if only revisions by "auto_build_user" have been committed to the SCM a build will not occur.
$class: 'UserIdentity'
name : String
If given, "GIT_COMMITTER_NAME=[this]" and "GIT_AUTHOR_NAME=[this]" are set for builds. This overrides whatever is in the global settings.
email : String
If given, "GIT_COMMITTER_EMAIL=[this]" and "GIT_AUTHOR_EMAIL=[this]" are set for builds. This overrides whatever is in the global settings.
$class: 'WipeWorkspace'
gitTool : String
(optional)
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
$class: 'Stash'
repoUrl : String
teamFoundation
repoUrl : String
If TFS is also used as the repository server, this can usually be left blank.
$class: 'TracGitRepositoryBrowser'
$class: 'TuleapBrowser'
repositoryUrl : String
viewgit
repoUrl : String
projectName : String
$class: 'BitbucketJiraValidatorTrait'
jiraServerIdx : int
$class: 'BitbucketPullRequestDiscoveryTrait'
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
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
$class: 'Stash'
repoUrl : String
teamFoundation
repoUrl : String
If TFS is also used as the repository server, this can usually be left blank.
$class: 'TracGitRepositoryBrowser'
$class: 'TuleapBrowser'
repositoryUrl : String
viewgit
repoUrl : String
projectName : String
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
$class: 'Stash'
repoUrl : String
teamFoundation
repoUrl : String
If TFS is also used as the repository server, this can usually be left blank.
$class: 'TracGitRepositoryBrowser'
$class: 'TuleapBrowser'
repositoryUrl : String
viewgit
repoUrl : String
projectName : String
$class: 'BitbucketJiraValidatorTrait'
jiraServerIdx : int
$class: 'BitbucketPullRequestDiscoveryTrait'
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
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
$class: 'Stash'
repoUrl : String
teamFoundation
repoUrl : String
If TFS is also used as the repository server, this can usually be left blank.
$class: 'TracGitRepositoryBrowser'
$class: 'TuleapBrowser'
repositoryUrl : String
viewgit
repoUrl : String
projectName : String
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
$class: 'Stash'
repoUrl : String
teamFoundation
repoUrl : String
If TFS is also used as the repository server, this can usually be left blank.
$class: 'TracGitRepositoryBrowser'
$class: 'TuleapBrowser'
repositoryUrl : String
viewgit
repoUrl : String
projectName : String
$class: 'BitbucketJiraValidatorTrait'
jiraServerIdx : int
$class: 'BitbucketPullRequestDiscoveryTrait'
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
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
$class: 'Stash'
repoUrl : String
teamFoundation
repoUrl : String
If TFS is also used as the repository server, this can usually be left blank.
$class: 'TracGitRepositoryBrowser'
$class: 'TuleapBrowser'
repositoryUrl : String
viewgit
repoUrl : String
projectName : String
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
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
$class: 'Stash'
repoUrl : String
teamFoundation
repoUrl : String
If TFS is also used as the repository server, this can usually be left blank.
$class: 'TracGitRepositoryBrowser'
$class: 'TuleapBrowser'
repositoryUrl : String
viewgit
repoUrl : String
projectName : String
$class: 'BitbucketJiraValidatorTrait'
jiraServerIdx : int
$class: 'BitbucketPullRequestDiscoveryTrait'
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
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
$class: 'Stash'
repoUrl : String
teamFoundation
repoUrl : String
If TFS is also used as the repository server, this can usually be left blank.
$class: 'TracGitRepositoryBrowser'
$class: 'TuleapBrowser'
repositoryUrl : String
viewgit
repoUrl : String
projectName : String
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
$class: 'Stash'
repoUrl : String
teamFoundation
repoUrl : String
If TFS is also used as the repository server, this can usually be left blank.
$class: 'TracGitRepositoryBrowser'
$class: 'TuleapBrowser'
repositoryUrl : String
viewgit
repoUrl : String
projectName : String
$class: 'BitbucketJiraValidatorTrait'
jiraServerIdx : int
$class: 'BitbucketPullRequestDiscoveryTrait'
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
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
$class: 'Stash'
repoUrl : String
teamFoundation
repoUrl : String
If TFS is also used as the repository server, this can usually be left blank.
$class: 'TracGitRepositoryBrowser'
$class: 'TuleapBrowser'
repositoryUrl : String
viewgit
repoUrl : String
projectName : String
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
$class: 'Stash'
repoUrl : String
teamFoundation
repoUrl : String
If TFS is also used as the repository server, this can usually be left blank.
$class: 'TracGitRepositoryBrowser'
$class: 'TuleapBrowser'
repositoryUrl : String
viewgit
repoUrl : String
projectName : String
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'
lfs
$class: 'GitSCMChecksExtension'
verboseConsoleLog : boolean
(optional)
$class: 'GitSCMStatusChecksExtension'
name : String
(optional)
skip : boolean
(optional)
skipProgressUpdates : boolean
(optional)
suppressLogs : boolean
(optional)
unstableBuildNeutral : boolean
(optional)
$class: 'GitTagMessageExtension'
useMostRecentTag : boolean
(optional)
$class: 'IgnoreNotifyCommit'
localBranch
If selected, and its value is an empty string or "**", then the branch name is computed from the remote branch without the origin. In that case, a remote branch origin/master will be checked out to a local branch named master, and a remote branch origin/develop/new-feature will be checked out to a local branch named develop/newfeature.
Please note that this has not been tested with submodules.
localBranch : String
$class: 'MessageExclusion'
excludedMessage : String
.*\[maven-release-plugin\].*The example above illustrates that if only revisions with "[maven-release-plugin]" message in first comment line have been committed to the SCM a build will not occur. You can create more complex patterns using embedded flag expressions.
(?s).*FOO.*This example will search FOO message in all comment lines.
$class: 'PathRestriction'
includedRegions : String
myapp/src/main/web/.*\.html myapp/src/main/web/.*\.jpeg myapp/src/main/web/.*\.gifThe example above illustrates that a build will only occur, if html/jpeg/gif files have been committed to the SCM. Exclusions take precedence over inclusions, if there is an overlap between included and excluded regions.
excludedRegions : String
myapp/src/main/web/.*\.html myapp/src/main/web/.*\.jpeg myapp/src/main/web/.*\.gifThe example above illustrates that if only html/jpeg/gif files have been committed to the SCM a build will not occur.
perBuildTag
$class: 'PreBuildMerge'
options
mergeTarget : String
master
.
fastForwardMode
(optional)
FF
, FF_ONLY
, NO_FF
mergeRemote : String
(optional)
origin
, that contains the branch you specify below. If left blank, it'll default to the name of the first repository configured above.
mergeStrategy
(optional)
DEFAULT
, RESOLVE
, RECURSIVE
, OCTOPUS
, OURS
, SUBTREE
, RECURSIVE_THEIRS
pretestedIntegration
gitIntegrationStrategy
accumulated
shortCommitMessage : boolean
(optional)
ffonly
shortCommitMessage : boolean
(optional)
squash
integrationBranch : String
The branch name must match your integration branch name. No trailing slash.
git checkout -B <Branch name> <Repository name>/<Branch name> git merge --squash <Branch matched by git> git commit -C <Branch matched by git>
git checkout -B <Branch name> <Repository name>/<Branch name> git merge -m <commitMsg> <Branch matched by git> --no-ff
Changes are only ever pushed when the build results is SUCCESS
git push <Repository name> <Branch name>
repoName : String
The repository name. In git the repository is always the name of the remote. So if you have specified a repository name in your Git configuration. You need to specify the exact same name here, otherwise no integration will be performed. We do the merge based on this.
No trailing slash on repository name.
Remember to specify this when working with NAMED repositories in Git
pruneStaleBranch
pruneTags
pruneTags : boolean
$class: 'RelativeTargetDirectory'
relativeTargetDir : String
This extension should not be used in Jenkins Pipeline (either declarative or scripted). Jenkins Pipeline already provides standard techniques for checkout to a subdirectory. Use ws and dir in Jenkins Pipeline rather than this extension.
$class: 'ScmName'
Unique name for this SCM. Needed when using Git within the Multi SCM plugin.
name : String
$class: 'SparseCheckoutPaths'
Specify the paths that you'd like to sparse checkout. This may be used for saving space (Think about a reference repository). Be sure to use a recent version of Git, at least above 1.7.10
sparseCheckoutPaths
path : String
submodule
depth : int
(optional)
disableSubmodules : boolean
(optional)
parentCredentials : boolean
(optional)
recursiveSubmodules : boolean
(optional)
reference : String
(optional)
git init --bare git remote add SubProject1 https://gitrepo.com/subproject1 git remote add SubProject2 https://gitrepo.com/subproject2 git fetch --all
shallow : boolean
(optional)
threads : int
(optional)
timeout : int
(optional)
trackingSubmodules : boolean
(optional)
$class: 'UserExclusion'
excludedUsers : String
auto_build_userThe example above illustrates that if only revisions by "auto_build_user" have been committed to the SCM a build will not occur.
$class: 'UserIdentity'
name : String
If given, "GIT_COMMITTER_NAME=[this]" and "GIT_AUTHOR_NAME=[this]" are set for builds. This overrides whatever is in the global settings.
email : String
If given, "GIT_COMMITTER_EMAIL=[this]" and "GIT_AUTHOR_EMAIL=[this]" are set for builds. This overrides whatever is in the global settings.
$class: 'WipeWorkspace'
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
$class: 'Stash'
repoUrl : String
teamFoundation
repoUrl : String
If TFS is also used as the repository server, this can usually be left blank.
$class: 'TracGitRepositoryBrowser'
$class: 'TuleapBrowser'
repositoryUrl : String
viewgit
repoUrl : String
projectName : String
$class: 'BitbucketJiraValidatorTrait'
jiraServerIdx : int
$class: 'BitbucketPullRequestDiscoveryTrait'
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
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
$class: 'Stash'
repoUrl : String
teamFoundation
repoUrl : String
If TFS is also used as the repository server, this can usually be left blank.
$class: 'TracGitRepositoryBrowser'
$class: 'TuleapBrowser'
repositoryUrl : String
viewgit
repoUrl : String
projectName : String
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
targets : Array / List of String
ignoreErrors : boolean
(optional)
null
in the event that no matching branch can be resolved.
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.