[JIRA] (JENKINS-52439) newContainerPerStage does not provide a clean container

42 views
Skip to first unread message

albertpuente93@gmail.com (JIRA)

unread,
Jul 9, 2018, 12:58:02 PM7/9/18
to jenkinsc...@googlegroups.com
Albert Puente created an issue
 
Jenkins / Improvement JENKINS-52439
newContainerPerStage does not provide a clean container
Issue Type: Improvement Improvement
Assignee: Unassigned
Components: pipeline
Created: 2018-07-09 16:57
Priority: Major Major
Reporter: Albert Puente

When using a declarative pipeline with the option "newContainerPerStage()" (see below), the contents of the workspace get copied to further stages even though the documentation states that this can be used to "ensure that each of your stages run in a fresh container of the same image". __ 

 
pipeline {
  agent {
  }}{{  }}{{docker {
  }}{{  }}{{  }}{{image "ubuntu:16.04"
  }}{{  }}{
  }}{
  }}{{options {
 {{  }}{{ }}{{newContainerPerStage() }}
  }}{
  ...{{}}
}
 
A more sensible approach would be to not copy things between containers. For now, we are currently using "deleteDir()" at the end of every stage as a workaround, which makes it impossible to debug if something goes wrong.

Add Comment Add Comment
 
This message was sent by Atlassian JIRA (v7.10.1#710002-sha1:6efc396)

albertpuente93@gmail.com (JIRA)

unread,
Jul 9, 2018, 12:59:02 PM7/9/18
to jenkinsc...@googlegroups.com
Albert Puente updated an issue
Change By: Albert Puente
When using a declarative pipeline with the option "newContainerPerStage()" (see below), the contents of the workspace get copied to further stages even though the documentation states that this can be used to "_ensure that each of your stages run in a fresh container of the same image_". __ 

 
{{pipeline {}}
{{  agent {}}
{{ 
}}{{     }}{{ }}{{ docker {}}
{{ 
}}{{   }}{{   }}{{ image "ubuntu:16.04"}}
{{ 
}}{{   }} {{ } }}
{{  }}
{{ } }}
{{ 
}}{{ options {}}
{{ 
}}{{   }} {{ }}{{ newContainerPerStage() }}
{{
    } }{{}}}
{{  ...}}
{{}}
{{}}}
 
A more sensible approach would be to not copy things between containers. For now, we are currently using "deleteDir()" at the end of every stage as a workaround, which makes it impossible to debug if something goes wrong.

albertpuente93@gmail.com (JIRA)

unread,
Jul 9, 2018, 1:00:01 PM7/9/18
to jenkinsc...@googlegroups.com

albertpuente93@gmail.com (JIRA)

unread,
Jul 9, 2018, 1:00:02 PM7/9/18
to jenkinsc...@googlegroups.com

albertpuente93@gmail.com (JIRA)

unread,
Jul 9, 2018, 1:01:01 PM7/9/18
to jenkinsc...@googlegroups.com
Albert Puente updated an issue
When using a declarative pipeline with the option "newContainerPerStage()" (see below), the contents of the workspace get copied to further stages even though the documentation states that this can be used to "_ensure that each of your stages run in a fresh container of the same image_". __ 

A more sensible approach would be to not copy things between containers. For now, we are currently using "deleteDir()" at the end of every stage as a workaround, which makes it impossible to debug if something goes wrong.
}}

albertpuente93@gmail.com (JIRA)

unread,
Jul 9, 2018, 1:01:01 PM7/9/18
to jenkinsc...@googlegroups.com
Albert Puente updated an issue
Change By: Albert Puente
Attachment: snippet.Jenkinsfile

andrew.bayer@gmail.com (JIRA)

unread,
Aug 7, 2018, 11:13:02 AM8/7/18
to jenkinsc...@googlegroups.com
Andrew Bayer updated an issue
Change By: Andrew Bayer
Component/s: pipeline-model-definition-plugin
Component/s: pipeline

andrew.bayer@gmail.com (JIRA)

unread,
Aug 7, 2018, 11:13:02 AM8/7/18
to jenkinsc...@googlegroups.com

andrew.bayer@gmail.com (JIRA)

unread,
Aug 7, 2018, 11:13:03 AM8/7/18
to jenkinsc...@googlegroups.com
Andrew Bayer commented on Improvement JENKINS-52439
 
Re: newContainerPerStage does not provide a clean container

So we're not actually copying anything, but we are mounting the workspace from the parent agent into each container. That's normal behavior for Docker in Pipeline.

andrew.bayer@gmail.com (JIRA)

unread,
Nov 7, 2018, 12:43:01 PM11/7/18
to jenkinsc...@googlegroups.com
Andrew Bayer resolved as Not A Defect
 
Change By: Andrew Bayer
Status: Open Resolved
Resolution: Not A Defect
This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d)

bitwiseman@gmail.com (JIRA)

unread,
Oct 22, 2019, 11:24:38 PM10/22/19
to jenkinsc...@googlegroups.com
Liam Newman closed an issue as Not A Defect
 

Bulk closing resolved issues.

Change By: Liam Newman
Status: Resolved Closed
This message was sent by Atlassian Jira (v7.13.6#713006-sha1:cc4451f)
Atlassian logo
Reply all
Reply to author
Forward
0 new messages