Why build executor status showing two jobs for one pipeline job?

匆匆过客 提交于 2019-12-24 00:33:45

问题


I am using a groovy pipeline script for a build job, so in jenkins pipeline is like,

node
{
  git url : 'myurl.git'
  load 'mydir/myfile.groovy'
}

Its working well as expected. but in build executor status, It is showing it as two jobs running.

  • Why it is showing one job as two jobs with same name ?.

  • Is there something which i have missed to tell something to jenkins for pipeline job?


回答1:


I can't find a better documentation source than this README (issue JENKINS-35710 also has some information), but the short of it is the Groovy pipeline executes on master (on a flyweight executor) while node blocks run on an allocated executor.

Here is a relevant snippet taken from the linked documentation:

[...]

Why are there two executors consumed by one Pipeline build?

  • Every Pipeline build itself runs on the master, using a flyweight executor — an uncounted slot that is assumed to not take any significant computational power.

  • This executor represents the actual Groovy script, which is almost always idle, waiting for a step to complete.

  • Flyweight executors are always available.



来源:https://stackoverflow.com/questions/50904939/why-build-executor-status-showing-two-jobs-for-one-pipeline-job

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!