根据 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 位置显示文档:
最佳答案
请注意,管道语法/全局变量引用页面仅在管道运行成功时更新。因此仅适用于此管道(而不适用于任何其他管道)。
这是a link !
关于 Jenkins 管道 : How to add help for Global Shared Library,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/41162177/