1
votes

I'm trying to migrate from Hudson to Jenkins and faced a problem. All of my test jobs (huge number) are using Build -> Invoke Ant parameter Build File with relative path and it is the same for all of them. So they should all use the same workspace directory.

I've set it up in Workspace Root Directory in Jenkins Configure System.

Example:

  • Real run.xml file location: C:\var\lib\jenkins\workspace\trunk\Eb\run.xml
  • Workspace Root Directory: C:\var\lib\jenkins\workspace\trunk\
  • Build File parameter (in job): Eb\run.xml

Build fails with:

ERROR: Unable to find build script at C:/var/lib/jenkins/workspace/trunk/workspace/run BD CompletedPath (firefox) ~regression/Eb/run.xml

As you see Jenkins adds job name to it anyway, so the path is incorrect and build fails. If I set up absolute paths all works fine, but it's illogically and a large number of copy-paste work.

Please help to sort it out without modifying all the jobs, thanks!

2

2 Answers

1
votes

See the Shared workspace plugin:

This plugin allows to share workspaces by Jenkins jobs with the same SCM repos.

0
votes

Thanx! On my personal note I could also add ConfigurationSlicingPlugin as an option (I didn't notice that my previous Hudson setup had been using this plugin).