Skip to content

[JENKINS-52373] Symbolic links should not be resolved to the pointing path for buildfile under "Invoke Ant" #320

@jenkins-infra-bot

Description

@jenkins-infra-bot

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


Originally reported by smikkelsen, imported from: Symbolic links should not be resolved to the pointing path for buildfile under "Invoke Ant"
  • assignee: armfergom
  • status: Open
  • priority: Minor
  • component(s): ant-plugin
  • resolution: Unresolved
  • votes: 0
  • watchers: 1
  • imported: 20251216-182730
Raw content of original issue

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

3 attachments

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions