相关疑难解决方法(0)

Jenkinsfile - 代理匹配多个标签

在我的声明性管道中,我需要选择一个匹配2个标签的节点.我试过这样的事

agent { label 'label1 && label2'}

但我得到一个错误there are no nodes.我有一个带有2个标签label1label2相关联的节点.

Started by user admin
Running in Durability level: MAX_SURVIVABILITY
[Pipeline] node
Still waiting to schedule task
There are no nodes with the label ‘label1&&label2’
Run Code Online (Sandbox Code Playgroud)

我知道我可以通过创建第三个标签label1-2并将其与管道中的代理关联来临时解决这个问题.

有没有正确的方法来解决这个问题?

jenkins-pipeline

1
推荐指数
1
解决办法
967
查看次数

标签 统计

jenkins-pipeline ×1