jenkinsci / jenkinsci/java-client-api
when running in multithreading separate thread triggers the build
- Dominant language
- Java
- Stars
- 913
- Forks
- 466
- PR merge metrics
- No merged PRs in 30d
Description
Running this code in parallel only starts one build, since they all refere to the same queue item
I am creating new jenkins server for each thread but using the same credentials
` try {
MTJenkinsUtil mtJenkinsUtil = new MTJenkinsUtil();
JenkinsServer jenkinsServer = mtJenkinsUtil.getJenkinsServer();
Job myJob = jenkinsServer.getJob(job);
String queue = myJob.build(params, true).getQueueItemUrlPart();
LOGGER.info(queue);
//BuildWithDetails buildWithDetails = qaJenkinsServer.
`
10:57:59.219 [pool-1-thread-3] INFO TestMTJobild - https://qajenkins/queue/item/5160/
10:57:59.225 [pool-1-thread-2] INFO TestMTJobild - https://qajenkins/queue/item/5160/
10:57:59.227 [pool-1-thread-1] INFO TestMTJobild - https://qajenkins/queue/item/5160/
10:57:59.227 [pool-1-thread-4] INFO TestMTJobild - https://qajenkins/queue/item/5160/
Contributor guide
Assessment
This issue has not been assessed yet.