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

node / dir / node on same agent sets PWD to that of dir rather than @2 workspace

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Minor Minor
    • Jenkins: 2.346.3
      OS: Linux - 4.14.203-156.332.amzn2.x86_64
      workflow-durable-task-step:1217.v38306d8fa_b_5c

      I thought I saw this fixed in 1210.va_1e5d77e122b
      but we are hitting it in 1217.v38306d8fa_b_5c
       
      We hit this in one of our libraries, and were able to refactor around it. I've attached our Jenkins info, and our minimal Jenkinsfile reproduction.
       
      From our console output, I distilled what we were seeing on our AWS node agent.
       

      "start workspace : workspace is /home/ec2-user/workspace/enkins-reproworkspacebug2_master
      to dir() : /home/ec2-user/workspace/enkins-reproworkspacebug2_master/vars
      to new node() and workspace : workspace is /home/ec2-user/workspace/enkins-reproworkspacebug2_master__2
      BUT cwd() is old workspace/dir : /home/ec2-user/workspace/enkins-reproworkspacebug2_master/vars"

      This looks related to https://issues.jenkins.io/browse/JENKINS-69936 but it does not seem like it was fixed for us? Or perhaps it is subtly different.

          [JENKINS-70528] node / dir / node on same agent sets PWD to that of dir rather than @2 workspace

          Matt created issue -
          Jesse Glick made changes -
          Link New: This issue relates to JENKINS-69936 [ JENKINS-69936 ]
          Jesse Glick made changes -
          Link New: This issue is caused by JENKINS-49707 [ JENKINS-49707 ]
          Jesse Glick made changes -
          Labels New: regression
          Jesse Glick made changes -
          Assignee New: Jesse Glick [ jglick ]
          Jesse Glick made changes -
          Status Original: Open [ 1 ] New: In Progress [ 3 ]
          Jesse Glick made changes -
          Remote Link New: This issue links to "workflow-durable-task-step-plugin #291 (Web Link)" [ 28485 ]
          Jesse Glick made changes -
          Summary Original: combination of script, dir, and node sets wrong working directory. New: node / dir / node on same agent sets PWD to that of dir rather than @2 workspace
          Jesse Glick made changes -
          Remote Link New: This issue links to "workflow-durable-task-step-plugin #292 (Web Link)" [ 28488 ]
          Jesse Glick made changes -
          Status Original: In Progress [ 3 ] New: In Review [ 10005 ]
          Jesse Glick made changes -
          Released As New: https://github.com/jenkinsci/workflow-durable-task-step-plugin/releases/tag/1234.v019404b_3832a
          Resolution New: Fixed [ 1 ]
          Status Original: In Review [ 10005 ] New: Resolved [ 5 ]

            jglick Jesse Glick
            hallm Matt
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: