Details
-
Epic
-
Status: In Progress (View Workflow)
-
Major
-
Resolution: Unresolved
-
-
Declarative - 1.2, Pipeline - December, Pipeline - April 2018
Description
Goals
- We want to have a new implementation for running steps inside a Docker container that is transparent to the Pipeline author
- We want to ensure that as this developed that we start making changes that allow us to swap out the implementation in the future (e.g. docker, k8, etc)
- We want customers to try this new implementation without having to use patched plugins or special builds from a branch
Scope
- Declarative Docker agent directive can be used to run steps for a stage or for the whole pipeline
- The new implementation can be enabled by specifying Pipeline->Options->dockerPipelineVersion = 2
- Must be able to use an off the shelf docker container without modifying it so it works with Jenkins
- Honour the entry point of the container
- Sharing the workspace from the top level agent to a per stage Docker agent (and back again!)
Out of scope
- Declarative Docker agent directive that specifies a Dockerfile
- Scripted docker.inside
- Scripted docker.build
- Building containers
- Linked containers
- Caching directories
Acceptance criteria
The following steps should work using the new implementation (even if modifications are needed to these steps):
- withMaven()
- dir()
- withCredentials
The following functionality should work:
- Tool installers
- Config File Provider
Examples
Per stage
pipeline {
options {
dockerPipelineVersion(2)
}
agent none // Will not reuse workspace
stages {
stage (‘build’) {
agent { docker ‘maven3’ }
steps {
sh ‘mvn clean test’
}
}
}
}
Whole Pipeline
pipeline {
options {
dockerPipelineVersion(2)
}
agent { docker ‘maven3’ } // will reuse workspace for all stages unless specified
stages {
stage (‘build’) {
steps {
sh ‘mvn clean test’
}
}
}
}
Attachments
Issue Links
- is related to
-
JENKINS-48284 pipeline-maven 3.0.3 update issues with certain maven plugins.
-
- Open
-
-
JENKINS-47823 withMaven fails to inject Maven settings files with docker-pipeline 1.14
-
- Closed
-
-
JENKINS-48135 kubernetes-plugin should support multiple containers in declarative templates
-
- Resolved
-
- relates to
-
JENKINS-47805 withMaven doesn't copy settings.xml to Docker container
-
- Closed
-
-
JENKINS-48460 When starting a node with dockerNode(), the error "uri was not specified" is thrown
-
- Open
-
-
JENKINS-40484 Unable to use withMaven() step inside docker container for old versions of Docker
-
- Reopened
-
-
JENKINS-36776 Support Windows Server Containers
-
- Resolved
-
-
JENKINS-58732 Invert pipeline-model-definition → docker-workflow dependency
-
- Resolved
-
- links to
Activity
Field | Original Value | New Value |
---|---|---|
Epic Link | JENKINS-47962 [ 186491 ] |
Description |
*Goal* We want to have a new implementation for running steps inside a Docker container that is transparent to the Pipeline author. _Per stage_ {code} pipeline { options { dockerPipelineVersion: 2 } agent none // Will not reuse workspace stages { stage (‘build’) { agent { docker ‘maven3’ } steps { sh ‘mvn clean test’ } } } } {code} _Whole Pipeline_ {code} pipeline { options { dockerPipelineVersion: 2 } agent { docker ‘maven3’ } // will reuse workspace for all stages unless specified stages { stage (‘build’) { steps { sh ‘mvn clean test’ } } } } {code} *Scope* * Declarative Docker agent directive can be used to run steps for a stage or for the whole pipeline * The new implementation can be enabled by specifying Pipeline->Options->dockerPipelineVersion = 2 * Must be able to use an off the shelf docker container without modifying it so it works with Jenkins. *Out of scope* * Declarative Docker agent directive that specifies a Dockerfile * Scripted {{docker.inside}} * Linked containers *Acceptance criteria* The following steps should work using the new implementation (even if modifications are needed to these steps): * withMaven() * dir() |
*Goal* We want to have a new implementation for running steps inside a Docker container that is transparent to the Pipeline author. _Per stage_ {code} pipeline { options { dockerPipelineVersion: 2 } agent none // Will not reuse workspace stages { stage (‘build’) { agent { docker ‘maven3’ } steps { sh ‘mvn clean test’ } } } } {code} _Whole Pipeline_ {code} pipeline { options { dockerPipelineVersion: 2 } agent { docker ‘maven3’ } // will reuse workspace for all stages unless specified stages { stage (‘build’) { steps { sh ‘mvn clean test’ } } } } {code} *Scope* * Declarative Docker agent directive can be used to run steps for a stage or for the whole pipeline * The new implementation can be enabled by specifying Pipeline->Options->dockerPipelineVersion = 2 * Must be able to use an off the shelf docker container without modifying it so it works with Jenkins * Honour the entry point of the container *Out of scope* * Declarative Docker agent directive that specifies a Dockerfile * Scripted {{docker.inside}} * Linked containers *Acceptance criteria* The following steps should work using the new implementation (even if modifications are needed to these steps): * withMaven() * dir() |
Description |
*Goal* We want to have a new implementation for running steps inside a Docker container that is transparent to the Pipeline author. _Per stage_ {code} pipeline { options { dockerPipelineVersion: 2 } agent none // Will not reuse workspace stages { stage (‘build’) { agent { docker ‘maven3’ } steps { sh ‘mvn clean test’ } } } } {code} _Whole Pipeline_ {code} pipeline { options { dockerPipelineVersion: 2 } agent { docker ‘maven3’ } // will reuse workspace for all stages unless specified stages { stage (‘build’) { steps { sh ‘mvn clean test’ } } } } {code} *Scope* * Declarative Docker agent directive can be used to run steps for a stage or for the whole pipeline * The new implementation can be enabled by specifying Pipeline->Options->dockerPipelineVersion = 2 * Must be able to use an off the shelf docker container without modifying it so it works with Jenkins * Honour the entry point of the container *Out of scope* * Declarative Docker agent directive that specifies a Dockerfile * Scripted {{docker.inside}} * Linked containers *Acceptance criteria* The following steps should work using the new implementation (even if modifications are needed to these steps): * withMaven() * dir() |
*Goal* We want to have a new implementation for running steps inside a Docker container that is transparent to the Pipeline author. We want to ensure that as this developed that we start making changes that allow us to swap out the implementation in the future (e.g. docker, k8, etc) *Scope* * Declarative Docker agent directive can be used to run steps for a stage or for the whole pipeline * The new implementation can be enabled by specifying Pipeline->Options->dockerPipelineVersion = 2 * Must be able to use an off the shelf docker container without modifying it so it works with Jenkins * Honour the entry point of the container *Out of scope* * Declarative Docker agent directive that specifies a Dockerfile * Scripted {{docker.inside}} * Linked containers *Acceptance criteria* The following steps should work using the new implementation (even if modifications are needed to these steps): * withMaven() * dir() *Examples* _Per stage_ {code} pipeline { options { dockerPipelineVersion: 2 } agent none // Will not reuse workspace stages { stage (‘build’) { agent { docker ‘maven3’ } steps { sh ‘mvn clean test’ } } } } {code} _Whole Pipeline_ {code} pipeline { options { dockerPipelineVersion: 2 } agent { docker ‘maven3’ } // will reuse workspace for all stages unless specified stages { stage (‘build’) { steps { sh ‘mvn clean test’ } } } } {code} |
Description |
*Goal* We want to have a new implementation for running steps inside a Docker container that is transparent to the Pipeline author. We want to ensure that as this developed that we start making changes that allow us to swap out the implementation in the future (e.g. docker, k8, etc) *Scope* * Declarative Docker agent directive can be used to run steps for a stage or for the whole pipeline * The new implementation can be enabled by specifying Pipeline->Options->dockerPipelineVersion = 2 * Must be able to use an off the shelf docker container without modifying it so it works with Jenkins * Honour the entry point of the container *Out of scope* * Declarative Docker agent directive that specifies a Dockerfile * Scripted {{docker.inside}} * Linked containers *Acceptance criteria* The following steps should work using the new implementation (even if modifications are needed to these steps): * withMaven() * dir() *Examples* _Per stage_ {code} pipeline { options { dockerPipelineVersion: 2 } agent none // Will not reuse workspace stages { stage (‘build’) { agent { docker ‘maven3’ } steps { sh ‘mvn clean test’ } } } } {code} _Whole Pipeline_ {code} pipeline { options { dockerPipelineVersion: 2 } agent { docker ‘maven3’ } // will reuse workspace for all stages unless specified stages { stage (‘build’) { steps { sh ‘mvn clean test’ } } } } {code} |
*Goal* We want to have a new implementation for running steps inside a Docker container that is transparent to the Pipeline author. We want to ensure that as this developed that we start making changes that allow us to swap out the implementation in the future (e.g. docker, k8, etc) *Scope* * Declarative Docker agent directive can be used to run steps for a stage or for the whole pipeline * The new implementation can be enabled by specifying Pipeline->Options->dockerPipelineVersion = 2 * Must be able to use an off the shelf docker container without modifying it so it works with Jenkins * Honour the entry point of the container *Out of scope* * Declarative Docker agent directive that specifies a {{Dockerfile}} * Scripted {{docker.inside}} * Linked containers *Acceptance criteria* The following steps should work using the new implementation (even if modifications are needed to these steps): * {{withMaven()}} * {{dir()}} *Examples* _Per stage_ {code} pipeline { options { dockerPipelineVersion: 2 } agent none // Will not reuse workspace stages { stage (‘build’) { agent { docker ‘maven3’ } steps { sh ‘mvn clean test’ } } } } {code} _Whole Pipeline_ {code} pipeline { options { dockerPipelineVersion: 2 } agent { docker ‘maven3’ } // will reuse workspace for all stages unless specified stages { stage (‘build’) { steps { sh ‘mvn clean test’ } } } } {code} |
Description |
*Goal* We want to have a new implementation for running steps inside a Docker container that is transparent to the Pipeline author. We want to ensure that as this developed that we start making changes that allow us to swap out the implementation in the future (e.g. docker, k8, etc) *Scope* * Declarative Docker agent directive can be used to run steps for a stage or for the whole pipeline * The new implementation can be enabled by specifying Pipeline->Options->dockerPipelineVersion = 2 * Must be able to use an off the shelf docker container without modifying it so it works with Jenkins * Honour the entry point of the container *Out of scope* * Declarative Docker agent directive that specifies a {{Dockerfile}} * Scripted {{docker.inside}} * Linked containers *Acceptance criteria* The following steps should work using the new implementation (even if modifications are needed to these steps): * {{withMaven()}} * {{dir()}} *Examples* _Per stage_ {code} pipeline { options { dockerPipelineVersion: 2 } agent none // Will not reuse workspace stages { stage (‘build’) { agent { docker ‘maven3’ } steps { sh ‘mvn clean test’ } } } } {code} _Whole Pipeline_ {code} pipeline { options { dockerPipelineVersion: 2 } agent { docker ‘maven3’ } // will reuse workspace for all stages unless specified stages { stage (‘build’) { steps { sh ‘mvn clean test’ } } } } {code} |
*Goal* We want to have a new implementation for running steps inside a Docker container that is transparent to the Pipeline author. We want to ensure that as this developed that we start making changes that allow us to swap out the implementation in the future (e.g. docker, k8, etc) *Scope* * Declarative Docker agent directive can be used to run steps for a stage or for the whole pipeline * The new implementation can be enabled by specifying Pipeline->Options->dockerPipelineVersion = 2 * Must be able to use an off the shelf docker container without modifying it so it works with Jenkins * Honour the entry point of the container *Out of scope* * Declarative Docker agent directive that specifies a {{Dockerfile}} * Scripted {{docker.inside}} * Scripted {{docker.build}} * Building containers * Linked containers *Acceptance criteria* The following steps should work using the new implementation (even if modifications are needed to these steps): * {{withMaven()}} * {{dir()}} *Examples* _Per stage_ {code} pipeline { options { dockerPipelineVersion: 2 } agent none // Will not reuse workspace stages { stage (‘build’) { agent { docker ‘maven3’ } steps { sh ‘mvn clean test’ } } } } {code} _Whole Pipeline_ {code} pipeline { options { dockerPipelineVersion: 2 } agent { docker ‘maven3’ } // will reuse workspace for all stages unless specified stages { stage (‘build’) { steps { sh ‘mvn clean test’ } } } } {code} |
Description |
*Goal* We want to have a new implementation for running steps inside a Docker container that is transparent to the Pipeline author. We want to ensure that as this developed that we start making changes that allow us to swap out the implementation in the future (e.g. docker, k8, etc) *Scope* * Declarative Docker agent directive can be used to run steps for a stage or for the whole pipeline * The new implementation can be enabled by specifying Pipeline->Options->dockerPipelineVersion = 2 * Must be able to use an off the shelf docker container without modifying it so it works with Jenkins * Honour the entry point of the container *Out of scope* * Declarative Docker agent directive that specifies a {{Dockerfile}} * Scripted {{docker.inside}} * Scripted {{docker.build}} * Building containers * Linked containers *Acceptance criteria* The following steps should work using the new implementation (even if modifications are needed to these steps): * {{withMaven()}} * {{dir()}} *Examples* _Per stage_ {code} pipeline { options { dockerPipelineVersion: 2 } agent none // Will not reuse workspace stages { stage (‘build’) { agent { docker ‘maven3’ } steps { sh ‘mvn clean test’ } } } } {code} _Whole Pipeline_ {code} pipeline { options { dockerPipelineVersion: 2 } agent { docker ‘maven3’ } // will reuse workspace for all stages unless specified stages { stage (‘build’) { steps { sh ‘mvn clean test’ } } } } {code} |
*Goals* * We want to have a new implementation for running steps inside a Docker container that is transparent to the Pipeline author * We want to ensure that as this developed that we start making changes that allow us to swap out the implementation in the future (e.g. docker, k8, etc) * We want customers to try this new implementation without having to use patched plugins or special builds from a branch *Scope* * Declarative Docker agent directive can be used to run steps for a stage or for the whole pipeline * The new implementation can be enabled by specifying Pipeline->Options->dockerPipelineVersion = 2 * Must be able to use an off the shelf docker container without modifying it so it works with Jenkins * Honour the entry point of the container *Out of scope* * Declarative Docker agent directive that specifies a {{Dockerfile}} * Scripted {{docker.inside}} * Scripted {{docker.build}} * Building containers * Linked containers *Acceptance criteria* The following steps should work using the new implementation (even if modifications are needed to these steps): * {{withMaven()}} * {{dir()}} *Examples* _Per stage_ {code} pipeline { options { dockerPipelineVersion: 2 } agent none // Will not reuse workspace stages { stage (‘build’) { agent { docker ‘maven3’ } steps { sh ‘mvn clean test’ } } } } {code} _Whole Pipeline_ {code} pipeline { options { dockerPipelineVersion: 2 } agent { docker ‘maven3’ } // will reuse workspace for all stages unless specified stages { stage (‘build’) { steps { sh ‘mvn clean test’ } } } } {code} |
Description |
*Goals* * We want to have a new implementation for running steps inside a Docker container that is transparent to the Pipeline author * We want to ensure that as this developed that we start making changes that allow us to swap out the implementation in the future (e.g. docker, k8, etc) * We want customers to try this new implementation without having to use patched plugins or special builds from a branch *Scope* * Declarative Docker agent directive can be used to run steps for a stage or for the whole pipeline * The new implementation can be enabled by specifying Pipeline->Options->dockerPipelineVersion = 2 * Must be able to use an off the shelf docker container without modifying it so it works with Jenkins * Honour the entry point of the container *Out of scope* * Declarative Docker agent directive that specifies a {{Dockerfile}} * Scripted {{docker.inside}} * Scripted {{docker.build}} * Building containers * Linked containers *Acceptance criteria* The following steps should work using the new implementation (even if modifications are needed to these steps): * {{withMaven()}} * {{dir()}} *Examples* _Per stage_ {code} pipeline { options { dockerPipelineVersion: 2 } agent none // Will not reuse workspace stages { stage (‘build’) { agent { docker ‘maven3’ } steps { sh ‘mvn clean test’ } } } } {code} _Whole Pipeline_ {code} pipeline { options { dockerPipelineVersion: 2 } agent { docker ‘maven3’ } // will reuse workspace for all stages unless specified stages { stage (‘build’) { steps { sh ‘mvn clean test’ } } } } {code} |
*Goals* * We want to have a new implementation for running steps inside a Docker container that is transparent to the Pipeline author * We want to ensure that as this developed that we start making changes that allow us to swap out the implementation in the future (e.g. docker, k8, etc) * We want customers to try this new implementation without having to use patched plugins or special builds from a branch *Scope* * Declarative Docker agent directive can be used to run steps for a stage or for the whole pipeline * The new implementation can be enabled by specifying Pipeline->Options->dockerPipelineVersion = 2 * Must be able to use an off the shelf docker container without modifying it so it works with Jenkins * Honour the entry point of the container *Out of scope* * Declarative Docker agent directive that specifies a {{Dockerfile}} * Scripted {{docker.inside}} * Scripted {{docker.build}} * Building containers * Linked containers *Acceptance criteria* The following steps should work using the new implementation (even if modifications are needed to these steps): * {{withMaven()}} * {{dir()}} *Examples* _Per stage_ {code} pipeline { options { dockerPipelineVersion(2) } agent none // Will not reuse workspace stages { stage (‘build’) { agent { docker ‘maven3’ } steps { sh ‘mvn clean test’ } } } } {code} _Whole Pipeline_ {code} pipeline { options { dockerPipelineVersion(2) } agent { docker ‘maven3’ } // will reuse workspace for all stages unless specified stages { stage (‘build’) { steps { sh ‘mvn clean test’ } } } } {code} |
Component/s | pipeline-model-definition-plugin [ 21706 ] |
Description |
*Goals* * We want to have a new implementation for running steps inside a Docker container that is transparent to the Pipeline author * We want to ensure that as this developed that we start making changes that allow us to swap out the implementation in the future (e.g. docker, k8, etc) * We want customers to try this new implementation without having to use patched plugins or special builds from a branch *Scope* * Declarative Docker agent directive can be used to run steps for a stage or for the whole pipeline * The new implementation can be enabled by specifying Pipeline->Options->dockerPipelineVersion = 2 * Must be able to use an off the shelf docker container without modifying it so it works with Jenkins * Honour the entry point of the container *Out of scope* * Declarative Docker agent directive that specifies a {{Dockerfile}} * Scripted {{docker.inside}} * Scripted {{docker.build}} * Building containers * Linked containers *Acceptance criteria* The following steps should work using the new implementation (even if modifications are needed to these steps): * {{withMaven()}} * {{dir()}} *Examples* _Per stage_ {code} pipeline { options { dockerPipelineVersion(2) } agent none // Will not reuse workspace stages { stage (‘build’) { agent { docker ‘maven3’ } steps { sh ‘mvn clean test’ } } } } {code} _Whole Pipeline_ {code} pipeline { options { dockerPipelineVersion(2) } agent { docker ‘maven3’ } // will reuse workspace for all stages unless specified stages { stage (‘build’) { steps { sh ‘mvn clean test’ } } } } {code} |
*Goals* * We want to have a new implementation for running steps inside a Docker container that is transparent to the Pipeline author * We want to ensure that as this developed that we start making changes that allow us to swap out the implementation in the future (e.g. docker, k8, etc) * We want customers to try this new implementation without having to use patched plugins or special builds from a branch *Scope* * Declarative Docker agent directive can be used to run steps for a stage or for the whole pipeline * The new implementation can be enabled by specifying Pipeline->Options->dockerPipelineVersion = 2 * Must be able to use an off the shelf docker container without modifying it so it works with Jenkins * Honour the entry point of the container * Sharing the workspace from the top level agent to a per stage Docker agent (and back again!) *Out of scope* * Declarative Docker agent directive that specifies a {{Dockerfile}} * Scripted {{docker.inside}} * Scripted {{docker.build}} * Building containers * Linked containers *Acceptance criteria* The following steps should work using the new implementation (even if modifications are needed to these steps): * {{withMaven()}} * {{dir()}} *Examples* _Per stage_ {code} pipeline { options { dockerPipelineVersion(2) } agent none // Will not reuse workspace stages { stage (‘build’) { agent { docker ‘maven3’ } steps { sh ‘mvn clean test’ } } } } {code} _Whole Pipeline_ {code} pipeline { options { dockerPipelineVersion(2) } agent { docker ‘maven3’ } // will reuse workspace for all stages unless specified stages { stage (‘build’) { steps { sh ‘mvn clean test’ } } } } {code} |
Status | Open [ 1 ] | In Progress [ 3 ] |
Description |
*Goals* * We want to have a new implementation for running steps inside a Docker container that is transparent to the Pipeline author * We want to ensure that as this developed that we start making changes that allow us to swap out the implementation in the future (e.g. docker, k8, etc) * We want customers to try this new implementation without having to use patched plugins or special builds from a branch *Scope* * Declarative Docker agent directive can be used to run steps for a stage or for the whole pipeline * The new implementation can be enabled by specifying Pipeline->Options->dockerPipelineVersion = 2 * Must be able to use an off the shelf docker container without modifying it so it works with Jenkins * Honour the entry point of the container * Sharing the workspace from the top level agent to a per stage Docker agent (and back again!) *Out of scope* * Declarative Docker agent directive that specifies a {{Dockerfile}} * Scripted {{docker.inside}} * Scripted {{docker.build}} * Building containers * Linked containers *Acceptance criteria* The following steps should work using the new implementation (even if modifications are needed to these steps): * {{withMaven()}} * {{dir()}} *Examples* _Per stage_ {code} pipeline { options { dockerPipelineVersion(2) } agent none // Will not reuse workspace stages { stage (‘build’) { agent { docker ‘maven3’ } steps { sh ‘mvn clean test’ } } } } {code} _Whole Pipeline_ {code} pipeline { options { dockerPipelineVersion(2) } agent { docker ‘maven3’ } // will reuse workspace for all stages unless specified stages { stage (‘build’) { steps { sh ‘mvn clean test’ } } } } {code} |
*Goals* * We want to have a new implementation for running steps inside a Docker container that is transparent to the Pipeline author * We want to ensure that as this developed that we start making changes that allow us to swap out the implementation in the future (e.g. docker, k8, etc) * We want customers to try this new implementation without having to use patched plugins or special builds from a branch *Scope* * Declarative Docker agent directive can be used to run steps for a stage or for the whole pipeline * The new implementation can be enabled by specifying Pipeline->Options->dockerPipelineVersion = 2 * Must be able to use an off the shelf docker container without modifying it so it works with Jenkins * Honour the entry point of the container * Sharing the workspace from the top level agent to a per stage Docker agent (and back again!) *Out of scope* * Declarative Docker agent directive that specifies a {{Dockerfile}} * Scripted {{docker.inside}} * Scripted {{docker.build}} * Building containers * Linked containers *Acceptance criteria* The following steps should work using the new implementation (even if modifications are needed to these steps): * {{withMaven()}} * {{dir()}} * {{withCredentials}} The following functionality should work: * Tool installers *Examples* _Per stage_ {code} pipeline { options { dockerPipelineVersion(2) } agent none // Will not reuse workspace stages { stage (‘build’) { agent { docker ‘maven3’ } steps { sh ‘mvn clean test’ } } } } {code} _Whole Pipeline_ {code} pipeline { options { dockerPipelineVersion(2) } agent { docker ‘maven3’ } // will reuse workspace for all stages unless specified stages { stage (‘build’) { steps { sh ‘mvn clean test’ } } } } {code} |
Priority | Minor [ 4 ] | Major [ 3 ] |
Description |
*Goals* * We want to have a new implementation for running steps inside a Docker container that is transparent to the Pipeline author * We want to ensure that as this developed that we start making changes that allow us to swap out the implementation in the future (e.g. docker, k8, etc) * We want customers to try this new implementation without having to use patched plugins or special builds from a branch *Scope* * Declarative Docker agent directive can be used to run steps for a stage or for the whole pipeline * The new implementation can be enabled by specifying Pipeline->Options->dockerPipelineVersion = 2 * Must be able to use an off the shelf docker container without modifying it so it works with Jenkins * Honour the entry point of the container * Sharing the workspace from the top level agent to a per stage Docker agent (and back again!) *Out of scope* * Declarative Docker agent directive that specifies a {{Dockerfile}} * Scripted {{docker.inside}} * Scripted {{docker.build}} * Building containers * Linked containers *Acceptance criteria* The following steps should work using the new implementation (even if modifications are needed to these steps): * {{withMaven()}} * {{dir()}} * {{withCredentials}} The following functionality should work: * Tool installers *Examples* _Per stage_ {code} pipeline { options { dockerPipelineVersion(2) } agent none // Will not reuse workspace stages { stage (‘build’) { agent { docker ‘maven3’ } steps { sh ‘mvn clean test’ } } } } {code} _Whole Pipeline_ {code} pipeline { options { dockerPipelineVersion(2) } agent { docker ‘maven3’ } // will reuse workspace for all stages unless specified stages { stage (‘build’) { steps { sh ‘mvn clean test’ } } } } {code} |
*Goals* * We want to have a new implementation for running steps inside a Docker container that is transparent to the Pipeline author * We want to ensure that as this developed that we start making changes that allow us to swap out the implementation in the future (e.g. docker, k8, etc) * We want customers to try this new implementation without having to use patched plugins or special builds from a branch *Scope* * Declarative Docker agent directive can be used to run steps for a stage or for the whole pipeline * The new implementation can be enabled by specifying Pipeline->Options->dockerPipelineVersion = 2 * Must be able to use an off the shelf docker container without modifying it so it works with Jenkins * Honour the entry point of the container * Sharing the workspace from the top level agent to a per stage Docker agent (and back again!) *Out of scope* * Declarative Docker agent directive that specifies a {{Dockerfile}} * Scripted {{docker.inside}} * Scripted {{docker.build}} * Building containers * Linked containers * Caching directories *Acceptance criteria* The following steps should work using the new implementation (even if modifications are needed to these steps): * {{withMaven()}} * {{dir()}} * {{withCredentials}} The following functionality should work: * Tool installers * Config File Provider *Examples* _Per stage_ {code} pipeline { options { dockerPipelineVersion(2) } agent none // Will not reuse workspace stages { stage (‘build’) { agent { docker ‘maven3’ } steps { sh ‘mvn clean test’ } } } } {code} _Whole Pipeline_ {code} pipeline { options { dockerPipelineVersion(2) } agent { docker ‘maven3’ } // will reuse workspace for all stages unless specified stages { stage (‘build’) { steps { sh ‘mvn clean test’ } } } } {code} |
Labels | cloudbees-internal-pipeline |
Sprint | Declarative - 1.2 [ 366 ] | |
Labels | cloudbees-internal-pipeline |
Link | This issue relates to JENKINS-40484 [ JENKINS-40484 ] |
Summary | Replace Declarative Docker agent directive with new impelementation | Replace Declarative Docker agent directive with new implementation |
Link |
This issue blocks |
Sprint | Declarative - 1.2 [ 366 ] | Declarative - 1.2, Pipeline - December [ 366, 446 ] |
Rank | Ranked lower |
Link |
This issue is related to |
Link | This issue is related to JENKINS-48284 [ JENKINS-48284 ] |
Link | This issue relates to JENKINS-48460 [ JENKINS-48460 ] |
Link |
This issue relates to |
Issue Type | Story [ 10002 ] | Epic [ 10001 ] |
Epic Link | JENKINS-47962 [ 186491 ] |
Labels | docker |
Epic Child | JENKINS-49748 [ 188691 ] |
Sprint | Declarative - 1.2, Pipeline - December [ 366, 446 ] | Declarative - 1.2, Pipeline - December, Pipeline - March 2018 [ 366, 446, 506 ] |
Component/s | docker-plugin [ 18724 ] |
Assignee | Nicolas De Loof [ ndeloof ] | Andrew Bayer [ abayer ] |
Link |
This issue blocks |
Link |
This issue is related to |
Remote Link | This issue links to "pipeline-model-definition PR 255 (Web Link)" [ 21348 ] |
Remote Link | This issue links to "Unfiled docker PR: ndeloof:JENKINS-48050 (Web Link)" [ 21350 ] |
Remote Link | This issue links to "docker PR 681 (Web Link)" [ 21352 ] |
Link |
This issue relates to |
Remote Link | This issue links to "PR-255 (Web Link)" [ 23025 ] |
Link |
This issue relates to |
Assignee | Andrew Bayer [ abayer ] |
Component/s | docker-workflow-plugin [ 20625 ] |
A couple more criteria I’d like to suggest:
The scope here also doesn’t address the question of sharing the workspace from the top level agent to a per stage Docker agent (and back again!). I think that’s important and should be retained, but not as important as the lack of additional master configuration.