[JIRA] (JENKINS-48050) Replace Declarative Docker agent directive with new implementation

5 views
Skip to first unread message

flood@itnews-bg.com (JIRA)

unread,
Feb 13, 2018, 12:53:03 PM2/13/18
to jenkinsc...@googlegroups.com
Steve Todorov commented on Story JENKINS-48050
 
Re: Replace Declarative Docker agent directive with new implementation

This seems like it will fix a lot of the issues we're having with running maven builds in docker containers.
What is the approximate timeline for having this feature released - I'm guessing a few months? 

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

nicolas.deloof@gmail.com (JIRA)

unread,
Feb 13, 2018, 12:59:02 PM2/13/18
to jenkinsc...@googlegroups.com

Nothing planned yet, not even agreement on implementation decisions. 

flood@itnews-bg.com (JIRA)

unread,
Feb 14, 2018, 11:11:02 AM2/14/18
to jenkinsc...@googlegroups.com

Thanks for your reply. Please keep us in the loop in that case.  

w.maleska@gmail.com (JIRA)

unread,
Feb 15, 2018, 10:24:02 AM2/15/18
to jenkinsc...@googlegroups.com
Waldek M commented on Story JENKINS-48050

Hello,

I'm wondering  - would the new implementation be also solving problems like https://issues.jenkins-ci.org/browse/JENKINS-47026 ?

I.e. would it also honor the isolation of Docker container from host (processes running within and outside of Docker container with different UID/GID)?

nicolas.deloof@gmail.com (JIRA)

unread,
Feb 15, 2018, 10:31:03 AM2/15/18
to jenkinsc...@googlegroups.com

Waldek M this is uncertain so far, as this issue is more about balancing what we'd like to get and what is feasible . Typically

  • we'd like to be able to run arbitrary docker image but jenkins require a JVM for it's agent
  • we'd like to be able to share workspace between steps running in containers, but then the uid/gid issue will come back 
  • etc ... always with but xx at some point

IMHO we need to define a fresh new pipeline approach for docker usage that would not try to hack docker container. Working on a proposal on this purpose

 

w.maleska@gmail.com (JIRA)

unread,
Feb 16, 2018, 6:10:06 AM2/16/18
to jenkinsc...@googlegroups.com
Waldek M commented on Story JENKINS-48050

Nicolas De Loof sure, I hear what you're saying. There's a lot of features Jenkins users take for granted (which they wouldn't like to use) and general design of agents stand in the way too.

I've had a couple of discussions with my colleagues on the subject of sharing files between a host and a container and the bottom line was: the alternatives may be inconvenient (or complicated, or come  with performance trade-off), but using a simple volume mount just isn't clean and versatile enough and

IMO the only clean way to transfer files back and forth is some sort of RPC (as Nicola Worthington has suggested in JENKINS-47026), be it directly via SSH/SFTP/what have you or e.g. https://github.com/vieux/docker-volume-sshfs..] otherwise the design is always going to make assumptions on the image or Docker host setup. Just my £0.02.

nicolas.deloof@gmail.com (JIRA)

unread,
Feb 16, 2018, 7:59:03 AM2/16/18
to jenkinsc...@googlegroups.com

Waldek M yes indeed, I'd prefer we enforce use of pipeline `squash` for file sharing, and get rid of the uid/gid ownership constraint

nicolas.deloof@gmail.com (JIRA)

unread,
Feb 23, 2018, 8:06:02 AM2/23/18
to jenkinsc...@googlegroups.com

Some update on this issue:

we'd like to introduce some "version:2" in declarative pipeline so changing behaviour to this new agent design would be opt-in only and we wouldn't break existing pipelines.

docker-plugin do support `dockerNode` pipeline DSL keyword to provision a full jenkins node within a pipeline. This sounds like a nice candidate for docker agent implementation in declarative, as we would then get a full agent to fully honour Jenkins APIs and expectations (wrappers, env, path, etc).

A major issue to remain is the way docker.inside to let one access workspace from higher level agent. This introduce filesystem permission issues, so forced user to run in container. To get rid of this, safer option seems imho to not keep this behaviour for nested agents, and only support use of `stash` to share files between agents.

scm_issue_link@java.net (JIRA)

unread,
Feb 26, 2018, 8:38:08 AM2/26/18
to jenkinsc...@googlegroups.com

Code changed in jenkins
User: Nicolas De Loof
Path:
pom.xml
src/main/groovy/io/jenkins/docker/pipeline/DockerAgentScript.groovy
src/main/java/io/jenkins/docker/pipeline/DockerAgent.java
src/main/java/io/jenkins/docker/pipeline/DockerAgentScript.groovy
http://jenkins-ci.org/commit/docker-plugin/a8240b9a147153a9c2c772bcc8df4acdd8798d19
Log:
JENKINS-48050 declarative « container » agent

Compare: https://github.com/jenkinsci/docker-plugin/compare/6acd9e848f61^...a8240b9a1471

scm_issue_link@java.net (JIRA)

unread,
Feb 26, 2018, 8:39:02 AM2/26/18
to jenkinsc...@googlegroups.com

Code changed in jenkins
User: Nicolas De Loof
Path:
pom.xml
src/main/groovy/io/jenkins/docker/pipeline/DockerAgentScript.groovy
src/main/java/io/jenkins/docker/pipeline/DockerAgent.java


Log:
JENKINS-48050 declarative « container » agent

Signed-off-by: Nicolas De Loof <nicolas...@gmail.com>

nicolas.deloof@gmail.com (JIRA)

unread,
Feb 26, 2018, 10:38:02 AM2/26/18
to jenkinsc...@googlegroups.com

nicolas.deloof@gmail.com (JIRA)

unread,
Feb 26, 2018, 10:39:03 AM2/26/18
to jenkinsc...@googlegroups.com

scm_issue_link@java.net (JIRA)

unread,
Feb 28, 2018, 4:31:03 AM2/28/18
to jenkinsc...@googlegroups.com

Code changed in jenkins
User: Nicolas De Loof
Path:
pom.xml
src/main/groovy/io/jenkins/docker/pipeline/DockerAgentScript.groovy
src/main/java/io/jenkins/docker/pipeline/DockerAgent.java


Log:
JENKINS-48050 declarative « container » agent

Signed-off-by: Nicolas De Loof <nicolas...@gmail.com>

vivek.pandey@gmail.com (JIRA)

unread,
Mar 13, 2018, 10:35:03 PM3/13/18
to jenkinsc...@googlegroups.com
Vivek Pandey updated an issue
 
Change By: Vivek Pandey
Sprint: Declarative - 1.2, Pipeline - December , Pipeline - March 2018

scm_issue_link@java.net (JIRA)

unread,
Mar 14, 2018, 11:17:03 AM3/14/18
to jenkinsc...@googlegroups.com

Code changed in jenkins
User: Nicolas De Loof
Path:
pom.xml
src/main/groovy/io/jenkins/docker/pipeline/DockerAgentScript.groovy
src/main/java/io/jenkins/docker/pipeline/DockerAgent.java


Log:
JENKINS-48050 declarative « container » agent

Signed-off-by: Nicolas De Loof <nicolas...@gmail.com>

nicolas.deloof@gmail.com (JIRA)

unread,
Mar 26, 2018, 2:33:03 PM3/26/18
to jenkinsc...@googlegroups.com

nicolas.deloof@gmail.com (JIRA)

unread,
Mar 26, 2018, 2:33:05 PM3/26/18
to jenkinsc...@googlegroups.com

jglick@cloudbees.com (JIRA)

unread,
Aug 24, 2018, 11:30:02 AM8/24/18
to jenkinsc...@googlegroups.com
This message was sent by Atlassian JIRA (v7.10.1#710002-sha1:6efc396)

bitwiseman@gmail.com (JIRA)

unread,
May 27, 2019, 5:51:02 PM5/27/19
to jenkinsc...@googlegroups.com

I've added a link to some work done for this https://github.com/jenkinsci/pipeline-model-definition-plugin/pull/255

This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d)
Reply all
Reply to author
Forward
0 new messages