|
barnish commented
9 years ago
mjoubert - Does p4-plugin work if you set ${EXECUTOR_NUMBER} in the workspace name field? I tried something like what you suggest (in order to share workspaces between jobs) but I see that the perforce polling on that job failed with a stacktrace: FATAL: <dev.${EXECUTOR_NUMBER}>: Found unresolved macro at 'dev.${EXECUTOR_NUMBER}' How did you set that up? |
Reply ·0 | |
|
|
mjoubert commented
10 years ago
Hi, i use the ability to set a jobs custom workspace myself, due to various bugs in Jenkins when running parallel builds. Please check if your code will still work if the user have specified a custom workspace |
Reply ·0 | |
|
|
|
Paul Allen commented
10 years ago
If you set a custom workspace (Advanced -> [x] Use custom workspace -> provide a Directory) then the tool builds on top of the same path for parallel builds. It seems that Jenkins is failing to add the @2 etc... to the end of your custom name. I would say this is a Jenkins Bug. |
Reply ·0 | |
|
|
|
Paul Allen commented
10 years ago
You can set the custom workspace to: Then you get: The downside is you will not reuse workspaces and end up creating hundreds of clients clogging up db.have and your disk. |
Reply ·0 | |
|
|
|
|
Reply ·0 | |
|
|
|
mjoubert commented
10 years ago
I use EXECUTOR_NUMBER in all my custom workspaces and if i don't use a custom workspace then i use EXECUTOR_NUMBER in the generated template name. ${SITE} allows me to cover the case where the same job is going to be run on different masters. (we have our own variable called SITE that has a meaningful value for each master. ${NODE_NAME}-${EXECUTOR_NUMBER} allows me to cover all the cases of have a single job running in parallel on the same slave or across different slaves. |
Reply ·0 | |
|
|
|
Paul Allen commented
10 years ago
That sounds ok; I'm always a bit cautious when sharing workspaces. As your workspaces all use the same code base (sounds like you are using streams) then it should be fairly efficient at populating too. I like the idea of ${STREAM} I guess you created that one. |
Reply ·0 | |
|
|
|
barnish commented
9 years ago
mjoubert - Does p4-plugin work if you set ${EXECUTOR_NUMBER} in the workspace name field? I tried something like what you suggest (in order to share workspaces between jobs) but I see that the perforce polling on that job failed with a stacktrace: FATAL: <dev.${EXECUTOR_NUMBER}>: Found unresolved macro at 'dev.${EXECUTOR_NUMBER}' How did you set that up? |
Reply ·0 | |
|
|
|
mjoubert commented
9 years ago
Hi barnish, I use the p4plugin to sync around 500-800 custom workspaces a day, all with the executor number set. |
Reply ·0 | |
|
|
|
mjoubert commented
9 years ago
let me restate how i work. I have a trigger job that uses the p4 plugin to sync to a custom workspace and then automatically trigger all the relevant jobs that does need rebuilding based on filter. That way i can have a handfull of jobs polling p4 vs 1000s of jobs polling p4 I have not checked any logs of the trigger jobs that do the polling to see if there is a problem. |
Reply ·0 | |
|