## none 

When applied at the top-level of the pipeline  block no global agent will be allocated for the entire Pipeline run and each stage  section will need to contain its own agent  section. For example: agent none 

## label 

Execute the Pipeline, or stage, on an agent available in the Jenkins environment with the provided label. For example: agent { label 'my-defined-label' } 

## node 

agent { node { label 'labelName' } }  behaves the same as agent { label 'labelName' } , but node  allows for additional options (such as customWorkspace ). 

## docker 

Execute the Pipeline, or stage, with the given container which will be dynamically provisioned on a node pre-configured to accept Docker-based Pipelines, or on a node matching the optionally defined label  parameter. docker  also optionally accepts an args  parameter which may contain arguments to pass directly to a docker run  invocation, and an alwaysPull  option, which will force a docker pull  even if the image name is already present. For example: agent { docker 'maven:3- alpine' }  or 

agent { docker { image 'maven:3-alpine' label 'my-defined-label' args '-v /tmp:/tmp' } } 

## dockerfile 

Execute the Pipeline, or stage, with a container built from a Dockerfile  contained in the source repository. In order to use this option, the Jenkinsfile  must be loaded from either a Multibranch Pipeline, or a "Pipeline from SCM." Conventionally this is the Dockerfile  in the root of the source repository: agent { dockerfile true } . If building a Dockerfile  in another directory, use the dir option: agent { dockerfile { dir 'someSubDir' } } . You can pass additional arguments to the docker build …  command with the additionalBuildArgs  option, like agent { dockerfile { additionalBuildArgs '--build-arg foo=bar' } } . 

## Common Options 

These are a few options that can be applied two or more agent  implementations. They are not required unless explicitly stated. 

## label 

A string. The label on which to run the Pipeline or individual stage . 

This option is valid for node , docker  and dockerfile , and is required for node . 

