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

Symbolic links should not be resolved to the pointing path for buildfile under "Invoke Ant"

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Minor Minor
    • ant-plugin
    • None

      For some reason when specifying a Build File that is lying in a symbolic linked folder, this symbolic link is resolved to the pointing path by Jenkins. This causing Ant working directory to be different than expected. 

      Ie. if i refer to a build file SymLinkFolder/BuildFile/build.xml and SymLinkFolder refers to OtherFolder/YetAnotherFolder/, the working directory will be OtherFolder/YetAnotherFolder/BuildFile/build.xml

      This breaks the use of relative paths in the build.xml file. The expected behavior would be that a symbolic linked folder should be treated no different than a regular folder.

       

      I have attached screenshot of jenkins configuration and resulting output.

      In the output I have replaced ant binary with this simple shellscript that lets me know the working directory of Ant.

      #!/bin/sh
      echo ${@}
      pwd
       

       

      This bug is observed on Jenkins 2.130 with Ant plugin version 1.8  (but it seems like this issue is not new, as it is also seen on Jenkins 1.595 with Ant plugin version 1.2

        1. 1-folder-structure.png
          39 kB
          Steffen Mikkelsen
        2. 2-jenkins-config.png
          18 kB
          Steffen Mikkelsen
        3. 3-output.png
          29 kB
          Steffen Mikkelsen

            armfergom Armando Fernandez
            smikkelsen Steffen Mikkelsen
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: