Under "Advanced Project Options" set "Use custom workspace" to:
workspace/${JOB_NAME_SIMPLE}-${GERRIT_BRANCH}${EXECUTOR_NUMBER}
Add the Groovie script under "Prepare an environment for the run" to "Evaluated Groovy script".
| // The multi-configuration jobs lead to weird names with `/label_exp=` in them. | |
| // Remove those from the job name to have saner file paths. | |
| def job_name_simple = binding.variables["JOB_NAME"].split("/label_exp")[0] | |
| def manifest_file = "" | |
| switch(binding.variables["GERRIT_BRANCH"]) { | |
| case "master": manifest_file = "branch-master.xml"; break; | |
| case "watson": manifest_file = "watson.xml"; break; | |
| case "sherlock": manifest_file = "sherlock.xml"; break; | |
| case "3.x": manifest_file = "rel-3.0.x.xml"; break; | |
| } | |
| return [ | |
| MANIFEST_FILE: manifest_file, | |
| JOB_NAME_SIMPLE: job_name_simpl]e |