在 Jenkins XUnit 自定义样式表中使用工作区变量
我搜索了一段时间,没有找到这个问题的答案。我正在使用 Jenkins 进行一些测试,并使用 Clearcase 作为我的 CM 工具。我为自定义工具创建的样式表位于与 Clearcase 视图路径相关的目录中。当我将整个路径硬编码到样式表时,一切都很好,但是如果我尝试使用 ${CLEARCASE_VIEWNAME} 环境变量,xUnit 不会尝试解决它,而是给我一个错误,
"The input xsl '${CLEARCASE_VIEWNAME}/rest_of_path/my_stylesheet.xsl' relative to the workspace '/myworkspace' doesn't exist."
奇怪的是我也使用此变量指向 xml 文件所在的位置,它可以毫无问题地找到它。有谁知道这是否是 xUnit 插件的特定“功能”或者是否是一个错误?
I searched around for a while and have not found an answer to this question. I am using Jenkins to do some testing and I use Clearcase as my CM tool. The stylesheet I have created for a custom tool lives in a directory relative to the clearcase view path. When I hardcode the entire path to the stylesheet, everything is fine, but if I try to use the ${CLEARCASE_VIEWNAME} environment variable, xUnit does not try to resolve it, rather it gives me the error that
"The input xsl '${CLEARCASE_VIEWNAME}/rest_of_path/my_stylesheet.xsl' relative to the workspace '/myworkspace' doesn't exist."
The strange thing is that I also use this variable to point to where the xml file is and it finds it with no problem. Does anyone know if that is a specific "feature" of the xUnit plugin or if it is a bug?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
请参阅 Pushy 对我的另一篇文章的回答 Hudson/Jenkins PMD 配置
您的 Clearcase 路径需要指定在 Jenkins 主要配置中。
See pushy's answer to my other post at Hudson/Jenkins PMD Configuration
Your clearcase path needs to be specified in the main Jenkins configuration.
漏洞。
(或未实现的功能)
我使用 Jenkins XUnit 插件遇到了相同的场景,其中包含全局参数的“自定义工具模式”值正在解析,但包含全局参数的“自定义样式表”值未解析,导致出现与您类似的错误。
看一下源代码: https://github.com/jenkinsci/xunit-plugin/ 显示 XLS 参数的全局参数解析尚未实现。
此处已提交错误:https://issues.jenkins-ci.org/browse /JENKINS-17438/
由于它是开源的,因此是时候安装 Maven 并调试一些 Jenkins 插件代码了。
更新:完成后,您应该会在最新版本中看到新功能
Bug.
(or unimplemented feature)
I have run into the same scenario using the Jenkins XUnit plugin, where the "Custom Tool Pattern" value containing a Global Parameters IS being resolved, but the "Custom Stylesheet" value containing a Global Parameters is NOT resolved, leading to an error similar to yours.
Having a peek at the source: https://github.com/jenkinsci/xunit-plugin/ reveals that the Global Parameter resolution for the XLS parameter is not yet implemented.
A bug has been filed here: https://issues.jenkins-ci.org/browse/JENKINS-17438/
Since it's open source, it's time to get Maven installed and debug some Jenkins plugin code.
UPDATE: and done, you should see the new functionality in the latest version