Version 1.10.6 of the p4-plugin causes issues when multiple jobs are ran in parallel.
The result is that the p4 created environment variables of one job can corrupt those in another job that is running at the same time.
This bug wasn't in 1.10.5
Steps to reproduce issue:
- Create a new Jenkins test job with the following settings
- General:
- Execute concurrent builds if necessary
- Use custom workspace
- Directory
/tmp/${NODE_NAME}-${JOB_NAME}-${EXECUTOR_NUMBER}
- Directory
- Source Code Management
- Perforce Software:
- Workspace behaviour: Template (view generated for each node)
- Template workspace: Your test template
- Workspace Name Format being
jenkins-${NODE_NAME}-${JOB_NAME}-${EXECUTOR_NUMBER}
- Workspace behaviour: Template (view generated for each node)
- Perforce Software:
- General:
- Add a build step
To see the issue:
- Kick off two runs of the newly creates client
Result:
- Pre 1.10.5 both would have worked and both will set the expected P4 environment variables.
- 1.10.6 gets confused. So in my case:
Job1 Environment variables
P4_CLIENT _jenkins-master-ClientClashTest-0 WORKSPACE /tmp/master-ClientClashTest-0
Job2 Environment variables (THIS IS THE ISSUE – Wrong P4_CLIENT value)
P4_CLIENT _jenkins-master-ClientClashTest-0 WORKSPACE /tmp/master-ClientClashTest-1
—
If I reinstall the 1.10.5 (or earlier) plugin then for job 2 I would see:
P4_CLIENT _jenkins-master-ClientClashTest-1 WORKSPACE /tmp/master-ClientClashTest-1
- is related to
-
JENKINS-48882 Build Executor number is not consistent with EXECUTOR_NUMBER
- Open