In my Jenkinsfile I use publishHTML to publish report for PIT. My step is as follows
stage('Results') {
publishHTML([allowMissing: false, alwaysLinkToLastBuild: false,
keepAll: false, reportDir: 'target/pit-reports/*/', reportFiles: 'index.html', reportName: 'PIT Report'])
}
The directory of the index.html is something like this \target\pit-reports\201612081633
. That last part 201612081633
is of course different every time. Using target/pit-reports/*/
on a windows machine results in the following error.
ERROR: Specified HTML directory 'D:\David\Tools\Jenkins\workspace\jenkinsSandbox\target\pit-reports\*' does not exist.
The wildcard *
or **
does not work. How can I use a wildcard for a directory name in the jenkinsfile and is there any difference when doing this on windows or unix?