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.
dockerNode: Docker Node (⚠️ Experimental)Allocates a new Jenkins agent using a specified Docker image and runs tasks on it. Example:
dockerNode('jenkins/jnlp-agent-maven') {
git 'https://github.com/jglick/simple-maven-project-with-tests'
sh 'mvn -B -Dmaven.test.failure.ignore install'
junit '**/target/surefire-reports/TEST-*.xml'
}
image
Stringconnector (optional)
attachentryPointCmdString (optional)
StringjavaExe (optional)
StringjvmArgsString (optional)
Stringuser (optional)
root") will be used if this is left blank.
StringjnlpjnlpLauncher
jnlptunnel
Stringvmargs
StringwebSocket (optional)
booleanworkDirSettings (optional)
disabled
booleanworkDirPath
StringinternalDir
StringfailIfWorkDirIsMissing
booleanentryPointArgumentsString (optional)
StringjenkinsUrl (optional)
Stringuser (optional)
StringsshsshKeyStrategy
$class: 'InjectSSHKey'user
String$class: 'ManuallyConfiguredSSHKey'credentialsId
StringsshHostKeyVerificationStrategy
$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
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.
String$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
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.
boolean$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 (optional)
StringjvmOptions (optional)
StringlaunchTimeoutSeconds (optional)
intmaxNumRetries (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.
intport (optional)
intprefixStartSlaveCmd (optional)
StringretryWaitTime (optional)
intsuffixStartSlaveCmd (optional)
StringcredentialsId (optional)
StringdockerHost (optional)
StringremoteFs (optional)
workspace subdirectory as well as various control files. If not specified, uses the WORKDIR from the image.
Stringstep([$class: 'DockerBuilderControl']): Start/Stop Docker Containersoption
$class: 'DockerBuilderControlOptionProvisionAndStart'cloudName
StringtemplateId
String$class: 'DockerBuilderControlOptionRun'cloudName
Stringimage
StringpullCredentialsId
StringdnsString
Stringnetwork
StringdockerCommand
StringmountsString
StringvolumesFrom
StringenvironmentsString
Stringhostname
Stringuser
StringextraGroupsString
StringmemoryLimit
intmemorySwap
intcpuPeriod
longcpuQuota
longcpuShares
intshmSize
intbindPorts
StringbindAllPorts
booleanprivileged
booleantty
booleanmacAddress
String$class: 'DockerBuilderControlOptionStart'cloudName
StringcontainerId
String$class: 'DockerBuilderControlOptionStop'cloudName
StringcontainerId
Stringremove
boolean$class: 'DockerBuilderControlOptionStopAll'remove
booleanstep([$class: 'DockerBuilderPublisher']): Build / Publish Docker ImagedockerFileDirectory
StringfromRegistry
url
https://index.docker.io/v1/).
StringcredentialsId
Stringcloud
StringtagsString
StringpushOnSuccess
booleanpushCredentialsId
StringcleanImages
booleancleanupWithJenkinsJobDelete
booleannoCache (optional)
--no-cache which disables caching of layers. See the docker build command for more information.
booleanpull (optional)
--pull to pull the latest version of the base image, instead of using the local one. See the docker build command for more information.
booleanPlease 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.