Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-46831

Not able to use a normal agent on stage when agent docker is declared globally

      When the agent globally defined is a a docker-based, then if a stage defined another agent, it seems that we are facing JENKINS-33510.

       

      PR: https://github.com/jenkinsci/pipeline-model-definition-plugin/pull/192

          [JENKINS-46831] Not able to use a normal agent on stage when agent docker is declared globally

          Adrien Lecharpentier created issue -
          Adrien Lecharpentier made changes -
          Description Original: When the agent globally defined is a a docker-based, then if a stage defined another agent, it seems that we are facing JENKINS-33510. New: When the agent globally defined is a a docker-based, then if a stage defined another agent, it seems that we are facing JENKINS-33510.

           

          PR: https://github.com/jenkinsci/pipeline-model-definition-plugin/pull/192

          Code changed in jenkins
          User: Adrien Lecharpentier
          Path:
          pipeline-model-definition/src/test/java/org/jenkinsci/plugins/pipeline/modeldefinition/AgentTest.java
          pipeline-model-definition/src/test/resources/agentDockerGlobalThenLabel.groovy
          http://jenkins-ci.org/commit/pipeline-model-definition-plugin/5db16c00a2e8e44dabed4905614342081374be2d
          Log:
          JENKINS-46831 Link to the issue declaration

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Adrien Lecharpentier Path: pipeline-model-definition/src/test/java/org/jenkinsci/plugins/pipeline/modeldefinition/AgentTest.java pipeline-model-definition/src/test/resources/agentDockerGlobalThenLabel.groovy http://jenkins-ci.org/commit/pipeline-model-definition-plugin/5db16c00a2e8e44dabed4905614342081374be2d Log: JENKINS-46831 Link to the issue declaration

          Code changed in jenkins
          User: Andrew Bayer
          Path:
          pipeline-model-definition/src/test/java/org/jenkinsci/plugins/pipeline/modeldefinition/AgentTest.java
          pipeline-model-definition/src/test/resources/agentDockerGlobalThenLabel.groovy
          http://jenkins-ci.org/commit/pipeline-model-definition-plugin/d271998b3ac677d92747baa54fb56edce1b884ea
          Log:
          Merge pull request #192 from alecharp/validate-agent-declaration-on-stage

          JENKINS-46831 Test behaviour when agent defined globally and on stage

          Compare: https://github.com/jenkinsci/pipeline-model-definition-plugin/compare/059615693f92...d271998b3ac6

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Andrew Bayer Path: pipeline-model-definition/src/test/java/org/jenkinsci/plugins/pipeline/modeldefinition/AgentTest.java pipeline-model-definition/src/test/resources/agentDockerGlobalThenLabel.groovy http://jenkins-ci.org/commit/pipeline-model-definition-plugin/d271998b3ac677d92747baa54fb56edce1b884ea Log: Merge pull request #192 from alecharp/validate-agent-declaration-on-stage JENKINS-46831 Test behaviour when agent defined globally and on stage Compare: https://github.com/jenkinsci/pipeline-model-definition-plugin/compare/059615693f92...d271998b3ac6
          Andrew Bayer made changes -
          Link New: This issue is duplicated by JENKINS-47103 [ JENKINS-47103 ]

          What's the state of this issue ?

          When will it be possible to run stages in parallel with docker agents ?

          wknapik wknapik added a comment - What's the state of this issue ? When will it be possible to run stages in parallel with docker agents ?

          This issue, marked as critical, has been open for 6 months with no apparent progress.

          Making it impossible for users to run stages in parallel goes against the core purpose of this software, which is providing rapid feedback.

          It's as if `ls' stopped listing some files and for half a year no one got around to fixing it.

          abayer - can you please comment ? When can we expect this to be resolved ? How can users, who have built their pipelines using docker-based agents, run stages in parallel ? Is there some workaround/hack that can be used now ?

          wknapik wknapik added a comment - This issue, marked as critical, has been open for 6 months with no apparent progress. Making it impossible for users to run stages in parallel goes against the core purpose of this software, which is providing rapid feedback. It's as if `ls' stopped listing some files and for half a year no one got around to fixing it. abayer - can you please comment ? When can we expect this to be resolved ? How can users, who have built their pipelines using docker-based agents, run stages in parallel ? Is there some workaround/hack that can be used now ?

          abayer ping?

          wknapik wknapik added a comment - abayer ping?

          Andrew Bayer added a comment -

          It's due to an inherent aspect of the Docker Pipeline plugin - we're working on a successor to Docker Pipeline over in JENKINS-48050, but I don't have a specific timeframe. For now, you just have to not use a top-level docker agent if you want to run stages, parallel or otherwise, on a different agent.

          Andrew Bayer added a comment - It's due to an inherent aspect of the Docker Pipeline plugin - we're working on a successor to Docker Pipeline over in JENKINS-48050 , but I don't have a specific timeframe. For now, you just have to not use a top-level docker agent if you want to run stages, parallel or otherwise, on a different agent.

          abayer thanks for the response. I don't really care where/how the agents are specified - I just need to run all the stages in docker containers. Are you saying that it's possible to run parallel stages in containers (on multiple slaves at the same time), if I change how the agents are specified in the Jenkinsfile ?

          wknapik wknapik added a comment - abayer thanks for the response. I don't really care where/how the agents are specified - I just need to run all the stages in docker containers. Are you saying that it's possible to run parallel stages in containers (on multiple slaves at the same time), if I change how the agents are specified in the Jenkinsfile ?

            Unassigned Unassigned
            alecharp Adrien Lecharpentier
            Votes:
            9 Vote for this issue
            Watchers:
            15 Start watching this issue

              Created:
              Updated: