在我的 Jenkinsfile 中,我使用 publishHTML 来发布PIT的报告。我的步骤如下
stage('Results') {
publishHTML([allowMissing: false, alwaysLinkToLastBuild: false,
keepAll: false, reportDir: 'target/pit-reports/*/', reportFiles: 'index.html', reportName: 'PIT Report'])
}
index.html 的目录是这样的\target\pit-reports\201612081633
。最后一部分201612081633
当然每次都不一样。在 Windows 机器上使用target/pit-reports/*/
会导致以下错误。
ERROR: Specified HTML directory 'D:\David\Tools\Jenkins\workspace\jenkinsSandbox\target\pit-reports\*' does not exist.
通配符*
or**
不起作用。如何在 jenkinsfile 中使用通配符作为目录名称,在 windows 或 unix 上执行此操作有什么区别?