为什么要建立执行程序状态以显示一个管道作业有两个作业? [英] Why build executor status showing two jobs for one pipeline job?

查看:70
本文介绍了为什么要建立执行程序状态以显示一个管道作业有两个作业?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用groovy管道脚本来执行构建工作,因此在jenkins管道中就像

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?

推荐答案

我找不到比 JENKINS -35710 也有一些信息),但是它的简短之处在于Groovy管道是在master上(在flyweight执行程序上)执行,而node块在已分配的执行程序上运行.

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?

  • 每个管道构建本身都使用flyweight执行程序在主数据库上运行,这是一个无计数的插槽,假定不会占用任何重要的计算能力.

  • 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.

该执行程序代表实际的Groovy脚本,该脚本几乎总是空闲的,等待完成一个步骤.

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

轻量级执行程序始终可用.

Flyweight executors are always available.

这篇关于为什么要建立执行程序状态以显示一个管道作业有两个作业?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆