在 Jenins 2 Pipeline 脚本中使用任意插件 [英] Using an arbitrary plugin in Jenins 2 Pipeline scripts

查看:15
本文介绍了在 Jenins 2 Pipeline 脚本中使用任意插件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

使用 Jenkins 2 中的 Snippet Generator 工具,我可以像在工作中一样设置一个插件,然后它会生成我可以在我的 Pipeline 脚本中使用的 Groovy.

Using the Snippet Generator tool in Jenkins 2, I can setup a plugin like I would within a job, and then it will generate me the Groovy I can use in my Pipeline script.

但是,如果我对检测感兴趣的插件未列在 Snippet Generator 的示例步骤"下拉列表中怎么办?如何确定如何创建脚本块来检测我要使用的插件?

But what if the plugin I am interested in instrumenting isn't listed in the "Sample Step" drop down in the Snippet Generator? How do I determine how to create a script block to instrument the plugin I want to use?

就我而言,我想使用灵活发布" 我的 Pipeline 脚本中的插件.

In my case, I would like to use the "Flexible Publish" plugin within my Pipeline script.

推荐答案

一般不能使用与管道不兼容的插件.插件需要或多或少地修改才能兼容.请参阅 https://github.com/jenkinsci/pipeline-plugin/blob/master/COMPATIBILITY.md

You can't use plugins which are not compatible with pipeline generally. Plugins need to be modified more or less to be compatible. See https://github.com/jenkinsci/pipeline-plugin/blob/master/COMPATIBILITY.md

这篇关于在 Jenins 2 Pipeline 脚本中使用任意插件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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