Jenkins 管道 : How to add help for Global Shared Library

标签 jenkins jenkins-pipeline

根据 documentation ,应该可以包含 *.txt带有帮助/文档的文件:

(root)
 +- src                     # Groovy source files
 |   +- org
 |       +- foo
 |           +- Bar.groovy  # for org.foo.Bar class
 +- vars
 |   +- foo.groovy          # for global 'foo' variable/function
 |   +- foo.txt             # help for 'foo' variable/function
 +- resources               # resource files (external libraries only)
 |   +- org
 |       +- foo
 |           +- bar.json    # static helper data for org.foo.Bar

...

The vars directory hosts scripts that define global variables accessible from Pipeline scripts. The basename of each *.groovy file should be a Groovy (~ Java) identifier, conventionally camelCased. The matching *.txt, if present, can contain documentation, processed through the system’s configured markup formatter (so may really be HTML, Markdown, etc., though the txt extension is required).



不幸的是,它并没有通过简单地创建 *.txt 对我有用。带有一些随意的内容。

我错过了什么吗?或者全局共享库没有在通常的 Jenkins 位置显示文档:enter image description here

最佳答案

请注意,管道语法/全局变量引用页面仅在管道运行成功时更新。因此仅适用于此管道(而不适用于任何其他管道)。

这是a link !

关于 Jenkins 管道 : How to add help for Global Shared Library,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/41162177/

相关文章:

linux - 从 Jenkins 连接到 EC2 实例失败 : Host key verification failed

linux - Jenkins 无法启动

jenkins - 没有为分支计划构建

jenkins job dsl 插件问题,内部作业都无法访问外部作业

jenkins - 退出声明式 Jenkins 管道的干净方法是否成功?

apache2 - 无法访问 Jenkins

windows - 如何在 Windows 中使用命令提示符在不同的端口而不是 8080 上启动 jenkins?

Jenkins NoClassDefFoundError : jenkins/scm/RunWithSCM

jenkins - 是否可以从 "Build other Projects"下的常规 Jenkins 作业触发多分支管道作业?

Jenkins 多分支管道扫描而不执行