[JIRA] (JENKINS-54110) Pipeline's dir() does not work with symlinks
Title: Message Title Sebastian Flügge commented on JENKINS-54110 Re: Pipeline's dir() does not work with symlinks I can confirm this bug because I ran into it with the same motivation as Taylor Jones. Would be nice if it can be fixed. Add Comment This message was sent by Atlassian Jira (v7.13.12#713012-sha1:6e07c38) -- 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.194735.153971511.10028.1586849280195%40Atlassian.JIRA.
[JIRA] (JENKINS-54110) Pipeline's dir() does not work with symlinks
Title: Message Title Andrew Bayer updated an issue Jenkins / JENKINS-54110 Pipeline's dir() does not work with symlinks Change By: Andrew Bayer Component/s: workflow-basic-steps-plugin Component/s: pipeline Add Comment This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d) -- 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-54110) Pipeline's dir() does not work with symlinks
Title: Message Title Taylor Jones created an issue Jenkins / JENKINS-54110 Pipeline's dir() does not work with symlinks Issue Type: Bug Assignee: Unassigned Components: pipeline Created: 2018-10-16 18:38 Priority: Major Reporter: Taylor Jones I'm currently trying to do this as a way of getting around bash's interpreter path length restrictions. Since Jenkins Pipeline generates an obscenely long workspace name, I figured the easiest solution would be to create a symlink in /tmp and just change directory into it. Unfortunately, this does not work. This is easy to reproduce, just run the following Pipeline job: node { def id = UUID.randomUUID().toString() def symlink = "/tmp/${id}" sh("ln -s ${pwd()} ${symlink}") sh("ls -lah /tmp") dir(symlink) { println("Jenkins thinks we are in ${pwd()}") sh('echo "But we are actually in `pwd`"') sh("ls -lah /tmp") } sh("rm -fr /tmp/${id}") } If you run that, you'll also see that Jenkins generates this odd directory when you try to change into the symlink: + ls -lah /tmp total 3.0M drwxrwxrwt 43 root root 4.0K Oct 16 18:36 . dr-xr-xr-x 27 root root 4.0K Oct 16 18:10 .. lrwxrwxrwx 1 jenkins jenkins40 Oct 16 18:36 136ef826-e9a1-479e-9074-1de076349252 -> /var/build/workspace/jenkinsfile-sandbox drwxr-xr-x 3 jenkins jenkins 4.0K Oct 16 18:36 136ef826-e9a1-479e-9074-1de076349252@tmp