[英]Jenkins Pipeline: How to add help for Global Shared Library
According to documentation , it should be possible to include *.txt
file with help/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. vars目录托管脚本,这些脚本定义了可从Pipeline脚本访问的全局变量。 The basename of each *.groovy file should be a Groovy (~ Java) identifier, conventionally camelCased. 每个* .groovy文件的基本名称应该是Groovy(〜Java)标识符,通常是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(如果存在)可以包含通过系统配置的标记格式化程序处理的文档(因此可能确实是HTML,Markdown等,尽管需要txt扩展名)。
Unfortunately it hasn't worked for me by simply creating *.txt
with some arbitrary content. 不幸的是,仅仅通过创建带有任意内容的*.txt
并不能为我工作。
Am I missing something? 我想念什么吗? Or does Global Shared Library doesn't shown documentation in usual Jenkins places: 或者Global Shared Library没有在Jenkins的通常位置显示文档:
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.