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.

Docker plugin

step([$class: 'DockerBuilderControl']): Start/Stop Docker Containers

  • option
      Nested Choice of Objects
    • $class: 'DockerBuilderControlOptionProvisionAndStart'
      • cloudName
        • Type: String
      • templateId
        • Type: String
    • $class: 'DockerBuilderControlOptionRun'
      • cloudName
        • Type: String
      • image
        • Type: String
      • pullCredentialsId
        • Type: String
      • dnsString
        • Type: String
      • network
        • Type: String
      • dockerCommand
        • Type: String
      • mountsString
        • Type: String
      • volumesFrom
        • Type: String
      • environmentsString
        • Type: String
      • hostname
        • Type: String
      • user
        • Type: String
      • extraGroupsString
        • Type: String
      • memoryLimit
        • Type: int
      • memorySwap
        • Type: int
      • cpuPeriod
        • Type: long
      • cpuQuota
        • Type: long
      • cpuShares
        • Type: int
      • shmSize
        • Type: int
      • bindPorts
        • Type: String
      • bindAllPorts
        • Type: boolean
      • privileged
        • Type: boolean
      • tty
        • Type: boolean
      • macAddress
        • Type: String
    • $class: 'DockerBuilderControlOptionStart'
      • cloudName
        • Type: String
      • containerId
        • Type: String
    • $class: 'DockerBuilderControlOptionStop'
      • cloudName
        • Type: String
      • containerId
        • Type: String
      • remove
        • Type: boolean
    • $class: 'DockerBuilderControlOptionStopAll'
      • remove
        • Type: boolean

step([$class: 'DockerBuilderPublisher']): Build / Publish Docker Image

Build step that sends a Dockerfile for building to docker host that used for this build run.
  • dockerFileDirectory
    • Type: String
  • fromRegistry
      Nested Object
    • url
      URL to the Docker registry you are using. May be left blank to use the public DockerHub registry (currently https://index.docker.io/v1/).
      • Type: String
    • credentialsId
      • Type: String
  • cloud
    Cloud to do the build on - or, if empty, use the cloud that the build was performed on.
    • Type: String
  • tagsString
    Repository name (and optionally a tag) to be applied to the resulting image in case of success.
    Multiple entries are permitted if separated by newlines.
    Environment variable substitution is performed on the strings so you can use e.g. ${BUILD_NUMBER} as part of each entry.
    Each entry must be of the form IMAGE[:TAG] as per the docker tag command.
    • Type: String
  • pushOnSuccess
    If enabled (and the docker image builds successfully), the resulting docker image will be pushed to the registry (or registries) specified within the "Image" field.
    • Type: boolean
  • pushCredentialsId
    Credentials to push to a private registry.
    • Type: String
  • cleanImages
    • Type: boolean
  • cleanupWithJenkinsJobDelete
    • Type: boolean
  • noCache (optional)
    If set, builds the image with --no-cache which disables caching of layers. See the docker build command for more information.
    • Type: boolean
  • pull (optional)
    If set, builds the image with --pull to pull the latest version of the base image, instead of using the local one. See the docker build command for more information.
    • Type: boolean

Was this page helpful?

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.