1

I'm using Freestyle multi-branch project to define a build for all branches in the project. The problem is that if I use "Use custom workspace" I cannot define a path using ${branch} name. I would like to do something like: Use custom workspace: [dropfolder]\${branch} But the ${branch} is not recognizable.

Dima Kreisserman
  • 663
  • 1
  • 13
  • 33

1 Answers1

0

You cannot use dynamic variables when configuring workspace location.

You can however build multiple branches automatically, check i.e. this question.

Community
  • 1
  • 1
Dominik Gebhart
  • 2,980
  • 1
  • 16
  • 28
  • Thanks. I' resolved the issue by post build batch XCOPY "C:\Projects\...\target\X.war" "C:\Projects\MyProject_Artifacts\%GIT_BRANCH%\" /D /C /R /I /K /Y – Dima Kreisserman Mar 27 '16 at 08:56
  • If you wanted to just keep the `*.war`, have a look into jenkins's functionality to archive build artifacts. Check out [this Q&A](http://stackoverflow.com/questions/5821545/archive-the-artifacts-in-hudson-jenkins) – Dominik Gebhart Mar 27 '16 at 12:53