• Icon: Bug Bug
    • Resolution: Won't Fix
    • Icon: Minor Minor
    • git-plugin
    • None
    • Jenkins 2.50
      SCM API Plugin 2.1.1
      Git plugin 3.1.0

      When using GitSCMFile::content() on an object that is symlink the content returned is the path to the symlinked file.

      While this might be the intended behavior this might cause problems. For example when using the workflow-multibranch (tested with 2.14) with a Jenkinsfile that is a symlink, this behavior causes the resulting main script to be the path of the symlinked file instead of the file content. E.g. the main script would be "build/Jenkinsfile" (if Jenkinsfile is a link to build/Jenkinsfile)

      The behavior is easy reproducible:

      • create a multi branch pipeline
      • as branch sources use an arbitrary git repository where the Jenkinsfile is a symlink (within the repository)
      • run the Job (the job will fail with an exception)
      • when looking at the replay - the main script will be the path to the symlinked file

          [JENKINS-42882] GitSCMFile::content() doesn't handle symlinks

          Bernhard Miklautz created issue -
          Bernhard Miklautz made changes -
          Summary Original: GitSCMFile::content() doesn't handle symlink New: GitSCMFile::content() doesn't handle symlinks
          Mark Waite made changes -
          Assignee Original: Mark Waite [ markewaite ]
          Tomonari Nakamura made changes -
          Attachment New: image-2017-04-13-23-00-32-116.png [ 37133 ]
          Mark Waite made changes -
          Resolution New: Won't Fix [ 2 ]
          Status Original: Open [ 1 ] New: Resolved [ 5 ]
          Jesse Glick made changes -
          Link New: This issue duplicates JENKINS-42830 [ JENKINS-42830 ]
          Mark Waite made changes -
          Status Original: Resolved [ 5 ] New: Closed [ 6 ]

            Unassigned Unassigned
            bmiklautz Bernhard Miklautz
            Votes:
            4 Vote for this issue
            Watchers:
            7 Start watching this issue

              Created:
              Updated:
              Resolved: