[JIRA] (JENKINS-49558) Run stages in separate Docker containers when top level agent declared

2019-10-22 Thread bitwise...@gmail.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Liam Newman closed an issue as Fixed  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
 Bulk closing resolved issues.   
 

  
 
 
 
 

 
 Jenkins /  JENKINS-49558  
 
 
  Run stages in separate Docker containers when top level agent declared   
 

  
 
 
 
 

 
Change By: 
 Liam Newman  
 
 
Status: 
 Resolved Closed  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian Jira (v7.13.6#713006-sha1:cc4451f)  
 
 

 
   
 

  
 

  
 

   





-- 
You received this message because you are subscribed to the Google Groups "Jenkins Issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-issues/JIRA.188466.151863050.17662.1571801068940%40Atlassian.JIRA.


[JIRA] (JENKINS-49558) Run stages in separate Docker containers when top level agent declared

2018-04-05 Thread scm_issue_l...@java.net (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 SCM/JIRA link daemon commented on  JENKINS-49558  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: Run stages in separate Docker containers when top level agent declared   
 

  
 
 
 
 

 
 Code changed in jenkins User: Liam Newman Path: content/doc/book/pipeline/syntax.adoc http://jenkins-ci.org/commit/jenkins.io/75ca4f256a23448a6e94edbe118ace58d76ab07f Log: Merge pull request #1443 from abayer/jenkins-49558 JENKINS-49558 Add doc for newContainerPerStage Declarative option Compare: https://github.com/jenkins-infra/jenkins.io/compare/4e5266831a46...75ca4f256a23  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian JIRA (v7.3.0#73011-sha1:3c73d0e)  
 
 

 
   
 

  
 

  
 

   





-- 
You received this message because you are subscribed to the Google Groups "Jenkins Issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[JIRA] (JENKINS-49558) Run stages in separate Docker containers when top level agent declared

2018-04-05 Thread scm_issue_l...@java.net (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 SCM/JIRA link daemon commented on  JENKINS-49558  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: Run stages in separate Docker containers when top level agent declared   
 

  
 
 
 
 

 
 Code changed in jenkins User: Andrew Bayer Path: content/doc/book/pipeline/syntax.adoc http://jenkins-ci.org/commit/jenkins.io/d5c680bc49fd66e799230a89681ccf4078b3c181 Log: JENKINS-49558 Add doc for newContainerPerStage Declarative option  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian JIRA (v7.3.0#73011-sha1:3c73d0e)  
 
 

 
   
 

  
 

  
 

   





-- 
You received this message because you are subscribed to the Google Groups "Jenkins Issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[JIRA] (JENKINS-49558) Run stages in separate Docker containers when top level agent declared

2018-03-12 Thread andrew.ba...@gmail.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Andrew Bayer updated  JENKINS-49558  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
 Merged - this'll be in the upcoming Declarative 1.2.8.  
 

  
 
 
 
 

 
 Jenkins /  JENKINS-49558  
 
 
  Run stages in separate Docker containers when top level agent declared   
 

  
 
 
 
 

 
Change By: 
 Andrew Bayer  
 
 
Status: 
 In Review Resolved  
 
 
Resolution: 
 Fixed  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian JIRA (v7.3.0#73011-sha1:3c73d0e)  
 
 

 
   
 

  
 

  
 

   





-- 
You received this message because you are subscribed to the Google Groups "Jenkins Issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com.
For more options, visit 

[JIRA] (JENKINS-49558) Run stages in separate Docker containers when top level agent declared

2018-03-12 Thread scm_issue_l...@java.net (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 SCM/JIRA link daemon commented on  JENKINS-49558  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: Run stages in separate Docker containers when top level agent declared   
 

  
 
 
 
 

 
 Code changed in jenkins User: Andrew Bayer Path: pipeline-model-definition/src/main/groovy/org/jenkinsci/plugins/pipeline/modeldefinition/model/Agent.groovy pipeline-model-definition/src/main/java/org/jenkinsci/plugins/pipeline/modeldefinition/agent/AbstractDockerAgent.java pipeline-model-definition/src/main/java/org/jenkinsci/plugins/pipeline/modeldefinition/options/impl/ContainerPerStage.java pipeline-model-definition/src/main/resources/org/jenkinsci/plugins/pipeline/modeldefinition/ModelInterpreter.groovy pipeline-model-definition/src/main/resources/org/jenkinsci/plugins/pipeline/modeldefinition/agent/impl/AbstractDockerPipelineScript.groovy pipeline-model-definition/src/main/resources/org/jenkinsci/plugins/pipeline/modeldefinition/options/impl/ContainerPerStage/help.html pipeline-model-definition/src/test/java/org/jenkinsci/plugins/pipeline/modeldefinition/AgentTest.java pipeline-model-definition/src/test/resources/agentDockerContainerPerStage.groovy pipeline-model-definition/src/test/resources/agentDockerWithoutContainerPerStage.groovy http://jenkins-ci.org/commit/pipeline-model-definition-plugin/773530a1eade1bb1b4b14845cc9b1f0800d7ad29 Log: [FIXED JENKINS-49558] Add containerPerStage option If given with a top-level Docker or Dockerfile agent, the top-level will magically switch to just a label agent, while each stage without an explicit agent specified will end up using the root agent definition with reuseNode enabled. The result will be that each stage gets a new container. Tada. This could theoretically cause problems in resuming builds after upgrade, but not likely, since we actually instantiate the DeclarativeAgent instance just in time, not at the beginning of the build. So the new field AbstractDockerAgent#containerPerStageRoot should get populated correctly.  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian JIRA (v7.3.0#73011-sha1:3c73d0e)  
 
 

   

[JIRA] (JENKINS-49558) Run stages in separate Docker containers when top level agent declared

2018-02-21 Thread awiddersh...@hotmail.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Andrew Widdersheim commented on  JENKINS-49558  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: Run stages in separate Docker containers when top level agent declared   
 

  
 
 
 
 

 
 Andrew Bayer sure, makes sense. Looks good to me! Though not sure it helps with comment-328884 at all. That said, you mentioned that issue is related to something else.  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian JIRA (v7.3.0#73011-sha1:3c73d0e)  
 
 

 
   
 

  
 

  
 

   





-- 
You received this message because you are subscribed to the Google Groups "Jenkins Issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[JIRA] (JENKINS-49558) Run stages in separate Docker containers when top level agent declared

2018-02-20 Thread andrew.ba...@gmail.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Andrew Bayer commented on  JENKINS-49558  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: Run stages in separate Docker containers when top level agent declared   
 

  
 
 
 
 

 
 Oh, and I went with an option instead of a flag on docker and dockerfile - the option is containerPerStage(). I feel like this may be relevant in other agent types down the road, so wanted to decouple the syntax from the Docker/Dockerfile implementations.  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian JIRA (v7.3.0#73011-sha1:3c73d0e)  
 
 

 
   
 

  
 

  
 

   





-- 
You received this message because you are subscribed to the Google Groups "Jenkins Issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[JIRA] (JENKINS-49558) Run stages in separate Docker containers when top level agent declared

2018-02-20 Thread andrew.ba...@gmail.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Andrew Bayer started work on  JENKINS-49558  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
Change By: 
 Andrew Bayer  
 
 
Status: 
 Open In Progress  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian JIRA (v7.3.0#73011-sha1:3c73d0e)  
 
 

 
   
 

  
 

  
 

   





-- 
You received this message because you are subscribed to the Google Groups "Jenkins Issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[JIRA] (JENKINS-49558) Run stages in separate Docker containers when top level agent declared

2018-02-20 Thread andrew.ba...@gmail.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Andrew Bayer commented on  JENKINS-49558  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: Run stages in separate Docker containers when top level agent declared   
 

  
 
 
 
 

 
 PR up adding this at https://github.com/jenkinsci/pipeline-model-definition-plugin/pull/246  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian JIRA (v7.3.0#73011-sha1:3c73d0e)  
 
 

 
   
 

  
 

  
 

   





-- 
You received this message because you are subscribed to the Google Groups "Jenkins Issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[JIRA] (JENKINS-49558) Run stages in separate Docker containers when top level agent declared

2018-02-20 Thread andrew.ba...@gmail.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Andrew Bayer updated  JENKINS-49558  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
 Jenkins /  JENKINS-49558  
 
 
  Run stages in separate Docker containers when top level agent declared   
 

  
 
 
 
 

 
Change By: 
 Andrew Bayer  
 
 
Status: 
 In  Progress  Review  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian JIRA (v7.3.0#73011-sha1:3c73d0e)  
 
 

 
   
 

  
 

  
 

   





-- 
You received this message because you are subscribed to the Google Groups "Jenkins Issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[JIRA] (JENKINS-49558) Run stages in separate Docker containers when top level agent declared

2018-02-15 Thread andrew.ba...@gmail.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Andrew Bayer commented on  JENKINS-49558  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: Run stages in separate Docker containers when top level agent declared   
 

  
 
 
 
 

 
 Yeah, that's the docker-in-docker one - if you have a top-level Docker or Dockerfile agent, you're stuck on that agent for all stages, due to limitations in the Docker Pipeline plugin.  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian JIRA (v7.3.0#73011-sha1:3c73d0e)  
 
 

 
   
 

  
 

  
 

   





-- 
You received this message because you are subscribed to the Google Groups "Jenkins Issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[JIRA] (JENKINS-49558) Run stages in separate Docker containers when top level agent declared

2018-02-15 Thread awiddersh...@hotmail.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Andrew Widdersheim commented on  JENKINS-49558  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: Run stages in separate Docker containers when top level agent declared   
 

  
 
 
 
 

 
 Pretty similar issue JENKINS-46831.  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian JIRA (v7.3.0#73011-sha1:3c73d0e)  
 
 

 
   
 

  
 

  
 

   





-- 
You received this message because you are subscribed to the Google Groups "Jenkins Issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[JIRA] (JENKINS-49558) Run stages in separate Docker containers when top level agent declared

2018-02-15 Thread andrew.ba...@gmail.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Andrew Bayer commented on  JENKINS-49558  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: Run stages in separate Docker containers when top level agent declared   
 

  
 
 
 
 

 
 Andrew Widdersheim - that's a separate thing: JENKINS-40966. Which, regrettably, I don't yet have a solution for. I think JENKINS-46809 will get part of the way there - it'll let you do a set of stages that all use the same agent and workspace, with agent none specified at the top level, but still go without an agent on a separate stage.  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian JIRA (v7.3.0#73011-sha1:3c73d0e)  
 
 

 
   
 

  
 

  
 

   





-- 
You received this message because you are subscribed to the Google Groups "Jenkins Issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[JIRA] (JENKINS-49558) Run stages in separate Docker containers when top level agent declared

2018-02-15 Thread awiddersh...@hotmail.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Andrew Widdersheim commented on  JENKINS-49558  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: Run stages in separate Docker containers when top level agent declared   
 

  
 
 
 
 

 
 Another annoying scenario I just noticed is you are not trying to execute a stage in lightweight executor as to not tie up anything. For example: 

 
pipeline {
agent {
docker {
image 'python3.6'
}
}
stages {
stage('Foo') {
steps {
sh 'echo foo'
}
}
stage('Verify') {
agent none
steps {
input(
message: "Should we update production?"
)
}
}
}
}
 

  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian JIRA (v7.3.0#73011-sha1:3c73d0e)  
 
 

 
   
 

  
 

  
 

   





-- 
You received this message because you are subscribed to the Google Groups "Jenkins Issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[JIRA] (JENKINS-49558) Run stages in separate Docker containers when top level agent declared

2018-02-14 Thread awiddersh...@hotmail.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Andrew Widdersheim commented on  JENKINS-49558  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: Run stages in separate Docker containers when top level agent declared   
 

  
 
 
 
 

 
 Just to add to this some, it is possible to have each stage run in it's own container instance but requires setting agent on every stage which can become very verbose and not DRY.  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian JIRA (v7.3.0#73011-sha1:3c73d0e)  
 
 

 
   
 

  
 

  
 

   





-- 
You received this message because you are subscribed to the Google Groups "Jenkins Issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[JIRA] (JENKINS-49558) Run stages in separate Docker containers when top level agent declared

2018-02-14 Thread awiddersh...@hotmail.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Andrew Widdersheim created an issue  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
 Jenkins /  JENKINS-49558  
 
 
  Run stages in separate Docker containers when top level agent declared   
 

  
 
 
 
 

 
Issue Type: 
  New Feature  
 
 
Assignee: 
 Andrew Bayer  
 
 
Components: 
 pipeline-model-definition-plugin  
 
 
Created: 
 2018-02-14 17:48  
 
 
Priority: 
  Minor  
 
 
Reporter: 
 Andrew Widdersheim  
 

  
 
 
 
 

 
 When specifying either docker or dockerfile as the top level agent this will run the entire pipeline and all of it's stages in the same container instance created at the beginning. 

 
pipeline {
agent {
docker {
image 'python3.6'
}
}
/* These stages all run in the same python3.6 container
 * created at the beginning of the pipeline.
 */
stages {
stage('Stage 1') {
steps {
sh 'echo foo'
}
}
stage('Stage 2') {
steps {
sh 'echo bar'
}
}
}
}
 

   It would be nice if there were some setting to run each stage in it's own container instance. 

 
pipeline {
agent {
docker {
image 'python3.6'
runPerStage true
}
}
/* These stages all create their own python3.6 container
 * created at the beginning of each stage.
 */
stages {
stage('Stage 1') {
steps {
sh 'echo foo'
}
}
stage('Stage 2') {
steps {
sh 'echo bar'
}
}
}
}