简体   繁体   English

Jenkins 中冲突的方法名称

[英]Conflicting method names in Jenkins

I am using Jenkins Templating Engine, and I created a few libraries that implement the build step, eg cmake library.我正在使用 Jenkins 模板引擎,并创建了一些实现build步骤的库,例如cmake库。

The problem is, that down the flow I want to call the Build a job step contributed by the Pipeline plugin suite, and once I try to call it:问题是,在流程中,我想调用 Pipeline 插件套件提供的构建作业步骤,一旦我尝试调用它:

build job: "Job_Name", parameters: "..."

I get an error from JTE because it tries to call my cmake::build step.我从 JTE 收到一个错误,因为它试图调用我的cmake::build步骤。 Is there a way to call the Pipeline's build step explicitly?有没有办法显式调用流水线的构建步骤?

I think this could help:我认为这可能会有所帮助:

'org.jenkinsci.plugins.workflow.support.steps.build.BuildTriggerStep'(job: "job name")

What this does is calling directly the BuildTriggerStep , which is the class under the package org.jenkinsci.plugins.workflow.support.steps.build and will do exactly the same as the build step.它的作用是直接调用BuildTriggerStep ,它是org.jenkinsci.plugins.workflow.support.steps.build包下的类,将与build步骤完全相同。

I got that from The source code of the build step plugin我是从构建步骤插件的源代码中得到的

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM