Bhanuchander Udhayakumar
Bhanuchander Udhayakumar

Reputation: 1621

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

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.

Upvotes: 4

Views: 2298

Answers (1)

mkobit
mkobit

Reputation: 47249

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.

Upvotes: 3

Related Questions