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

Mercurial GeneralSCM step does not create intermediary directories.

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved (View Workflow)
    • Priority: Major
    • Resolution: Fixed
    • Component/s: mercurial-plugin
    • Labels:
    • Environment:
      Jenkins Master (Fedora 22 - Server 64bit)
      Jenkins Slave (Win7 - 64bit)
      Jenkins Version - v1.611
      Mercurial Plugin - v1.52
      Workflow Plugin - v1.5
    • Similar Issues:

      Description

      Base slave install with nothing in the home directory.

      Standard Freestyle project creates the full path $JENKINS_HOME\workspace\<job name>.

      Workflow project fails the scm step with abort: The system cannot find the path specified: $JENKINS_HOME\workspace\<job name>

      Manually creating the $JENKINS_HOME\workspace directory fixes the issue unless the scm step specifies a sub-directory, in which case the parent of the sub-directory also has to be manually created.

      Workflow script was a simple:

      node('slave-name') {
        checkout([$class: 'MercurialSCM', ...])
      }
      

        Attachments

          Issue Links

            Activity

            themaddhatter Geoffrey Edwards created issue -
            jglick Jesse Glick made changes -
            Field Original Value New Value
            Link This issue is duplicated by JENKINS-31993 [ JENKINS-31993 ]
            jglick Jesse Glick made changes -
            Component/s workflow-plugin [ 18820 ]
            Labels scm workflow workflow
            jglick Jesse Glick made changes -
            Description Base slave install with nothing in the home directory.

            Standard Freestyle project creates the full path ($JENKINS_HOME\\workspace\\<job name>\\).

            Workflow project fails the scm step with 'abort: The system cannot find the path specified: $JENKINS_HOME\workspace\<job name>\'

            Manually creating the $JENKINS_HOME\workspace directory fixes the issue unless the scm step specifies a sub-directory, in which case the parent of the sub-directory also has to be manually created.

            Workflow script was a simple:

            node('slave-name') {
              checkout([$class: 'MercurialSCM', ...])
            }
            Base slave install with nothing in the home directory.

            Standard Freestyle project creates the full path {{$JENKINS_HOME\\workspace\\<job name>\\}}.

            Workflow project fails the scm step with {{abort: The system cannot find the path specified: $JENKINS_HOME\workspace\<job name>\}}

            Manually creating the {{$JENKINS_HOME\workspace}} directory fixes the issue unless the scm step specifies a sub-directory, in which case the parent of the sub-directory also has to be manually created.

            Workflow script was a simple:

            {code}
            node('slave-name') {
              checkout([$class: 'MercurialSCM', ...])
            }
            {code}
            jglick Jesse Glick made changes -
            Description Base slave install with nothing in the home directory.

            Standard Freestyle project creates the full path {{$JENKINS_HOME\\workspace\\<job name>\\}}.

            Workflow project fails the scm step with {{abort: The system cannot find the path specified: $JENKINS_HOME\workspace\<job name>\}}

            Manually creating the {{$JENKINS_HOME\workspace}} directory fixes the issue unless the scm step specifies a sub-directory, in which case the parent of the sub-directory also has to be manually created.

            Workflow script was a simple:

            {code}
            node('slave-name') {
              checkout([$class: 'MercurialSCM', ...])
            }
            {code}
            Base slave install with nothing in the home directory.

            Standard Freestyle project creates the full path {{$JENKINS_HOME\workspace\<job name>\}}.

            Workflow project fails the scm step with {{abort: The system cannot find the path specified: $JENKINS_HOME\workspace\<job name>\}}

            Manually creating the {{$JENKINS_HOME\workspace}} directory fixes the issue unless the scm step specifies a sub-directory, in which case the parent of the sub-directory also has to be manually created.

            Workflow script was a simple:

            {code}
            node('slave-name') {
              checkout([$class: 'MercurialSCM', ...])
            }
            {code}
            Hide
            jglick Jesse Glick added a comment -

            Probably suffices to have the script do something to create the directory before checkout.

            The existing test does not reproduce such a problem.

            Show
            jglick Jesse Glick added a comment - Probably suffices to have the script do something to create the directory before checkout . The existing test does not reproduce such a problem.
            jglick Jesse Glick made changes -
            Link This issue is duplicated by JENKINS-34735 [ JENKINS-34735 ]
            Hide
            karabayan Bayan Chernogorski added a comment -

            How would one go about adding a script to make the missing directory. As far as I can tell the scm checkout is the first thing that happens on a project.

            Show
            karabayan Bayan Chernogorski added a comment - How would one go about adding a script to make the missing directory. As far as I can tell the scm checkout is the first thing that happens on a project.
            Hide
            jglick Jesse Glick added a comment -

            Working OK for me in Jenkins 1.651.3 with up-to-date Pipeline plugins and version 1.54 of the Mercurial plugin.

            Show
            jglick Jesse Glick added a comment - Working OK for me in Jenkins 1.651.3 with up-to-date Pipeline plugins and version 1.54 of the Mercurial plugin.
            jglick Jesse Glick made changes -
            Status Open [ 1 ] Resolved [ 5 ]
            Resolution Cannot Reproduce [ 5 ]
            jglick Jesse Glick made changes -
            Remote Link This issue links to "workflow-scm-step PR 4 (Web Link)" [ 14533 ]
            Hide
            jglick Jesse Glick added a comment -

            Workaround would be simple: precede checkout with, say, writeFile file: '.junk', text: ''. But of course I would like to learn how to reproduce.

            Show
            jglick Jesse Glick added a comment - Workaround would be simple: precede checkout with, say, writeFile file: '.junk', text: '' . But of course I would like to learn how to reproduce.
            Hide
            jglick Jesse Glick added a comment -

            I think I have it: you have to have an installation with caching enabled, and be cloning from a non-file-protocol source. Otherwise --rev is added, which implies --pull, which (for some reason) creates intermediate directories for you.

            Show
            jglick Jesse Glick added a comment - I think I have it: you have to have an installation with caching enabled, and be cloning from a non- file -protocol source. Otherwise --rev is added, which implies --pull , which (for some reason) creates intermediate directories for you.
            jglick Jesse Glick made changes -
            Resolution Cannot Reproduce [ 5 ]
            Status Resolved [ 5 ] Reopened [ 4 ]
            jglick Jesse Glick made changes -
            Status Reopened [ 4 ] Open [ 1 ]
            jglick Jesse Glick made changes -
            Status Open [ 1 ] In Progress [ 3 ]
            jglick Jesse Glick made changes -
            Remote Link This issue links to "workflow-scm-step PR 4 (Web Link)" [ 14533 ]
            jglick Jesse Glick made changes -
            Remote Link This issue links to "PR 81 (Web Link)" [ 14535 ]
            jglick Jesse Glick made changes -
            Status In Progress [ 3 ] Resolved [ 5 ]
            Resolution Fixed [ 1 ]
            rtyler R. Tyler Croy made changes -
            Workflow JNJira [ 162835 ] JNJira + In-Review [ 197047 ]
            abayer Andrew Bayer made changes -
            Labels workflow pipeline workflow
            abayer Andrew Bayer made changes -
            Labels pipeline workflow pipeline

              People

              • Assignee:
                jglick Jesse Glick
                Reporter:
                themaddhatter Geoffrey Edwards
              • Votes:
                3 Vote for this issue
                Watchers:
                6 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: