[JIRA] (JENKINS-58705) Change default working dir to /home/jenkins/agent

14 views
Skip to first unread message

vincent@latombe.net (JIRA)

unread,
Jul 29, 2019, 8:25:02 AM7/29/19
to jenkinsc...@googlegroups.com
Vincent Latombe created an issue
 
Jenkins / Improvement JENKINS-58705
Change default working dir to /home/jenkins/agent
Issue Type: Improvement Improvement
Assignee: Carlos Sanchez
Components: kubernetes-plugin
Created: 2019-07-29 12:24
Priority: Minor Minor
Reporter: Vincent Latombe

The current default /home/jenkins causes some issues in some scenarios:

When building a docker image with kaniko that is actually a jnlp agent image, since the specified workingDir is mounted as a volume in all containers in the pod, and it is also the home directory for the jenkins user, it prevents adding any file to /home/jenkins in the docker image.

Changing the default working directory to /home/jenkins/agent should not have any downside except for users hardcoding stuff to it, while allowing this kind of scenarios in an easier way.

Add Comment Add Comment
 
This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d)

vincent@latombe.net (JIRA)

unread,
Jul 29, 2019, 8:38:03 AM7/29/19
to jenkinsc...@googlegroups.com
Vincent Latombe assigned an issue to Vincent Latombe
Change By: Vincent Latombe
Assignee: Carlos Sanchez Vincent Latombe

vincent@latombe.net (JIRA)

unread,
Jul 29, 2019, 9:58:02 AM7/29/19
to jenkinsc...@googlegroups.com
Vincent Latombe started work on Improvement JENKINS-58705
 
Change By: Vincent Latombe
Status: Open In Progress

vincent@latombe.net (JIRA)

unread,
Jul 29, 2019, 10:37:02 AM7/29/19
to jenkinsc...@googlegroups.com

vincent@latombe.net (JIRA)

unread,
Jul 30, 2019, 7:20:02 AM7/30/19
to jenkinsc...@googlegroups.com

vincent@latombe.net (JIRA)

unread,
Jul 30, 2019, 7:21:01 AM7/30/19
to jenkinsc...@googlegroups.com
Change By: Vincent Latombe
Status: In Review Fixed but Unreleased
Resolution: Fixed

seckler@in.tum.de (JIRA)

unread,
Aug 1, 2019, 10:37:02 AM8/1/19
to jenkinsc...@googlegroups.com

seckler@in.tum.de (JIRA)

unread,
Aug 1, 2019, 10:38:02 AM8/1/19
to jenkinsc...@googlegroups.com

giusva@gmail.com (JIRA)

unread,
Sep 11, 2019, 2:05:04 PM9/11/19
to jenkinsc...@googlegroups.com
Giuseppe Valente commented on Bug JENKINS-58705
 
Re: Change default working dir to /home/jenkins/agent

This required a configuration change, without any changes it causes this error when using `docker image:`:

 

```

Error: docker: Error response from daemon: OCI runtime create failed: container_linux.go:348: starting container process caused "chdir to cwd (\"/home/jenkins/agent/workspace/myjob\") set in config.json failed: permission denied": unknown.

```

 

It should at least be release-noted.

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

giusva@gmail.com (JIRA)

unread,
Sep 11, 2019, 2:09:02 PM9/11/19
to jenkinsc...@googlegroups.com
Giuseppe Valente edited a comment on Bug JENKINS-58705

giusva@gmail.com (JIRA)

unread,
Sep 11, 2019, 2:10:12 PM9/11/19
to jenkinsc...@googlegroups.com

afeller@bandwidth.com (JIRA)

unread,
Jan 15, 2020, 11:44:04 AM1/15/20
to jenkinsc...@googlegroups.com

This change should have facilitated the use case without breaking backwards compatibility for everyone else as the use of the older working directory should have been noted as a deprecated expectation. It is clear it was made without any thought to the actual impact to others with no consideration of how significant it would be.

afeller@bandwidth.com (JIRA)

unread,
Jan 15, 2020, 11:44:05 AM1/15/20
to jenkinsc...@googlegroups.com
Andrew Feller edited a comment on Bug JENKINS-58705
This change should have facilitated the use case without breaking backwards compatibility for everyone else as the use of the older working directory should have been noted as a deprecated expectation.  It is clear it was made without any thought to the actual impact to others with no consideration as there are situation where _"just use the env var"_ is not enough of how significant it would be a solution to everything .

adam.olejar@mavenir.com (JIRA)

unread,
Feb 14, 2020, 2:47:03 PM2/14/20
to jenkinsc...@googlegroups.com

How did you solved that error ?

Error: docker: Error response from daemon: OCI runtime create failed: container_linux.go:346: starting container process caused "chdir to cwd (\"/home/jenkins/workspace/MCO_3.0/custom_test\") set in config.json failed: permission denied": unknown.

Reply all
Reply to author
Forward
0 new messages