Created
October 17, 2017 06:52
-
-
Save sskjames/96e0da6ad9ecd7ab926571dc0d4c8ca1 to your computer and use it in GitHub Desktop.
Multi module Spock reports in Jenkins Pipeline
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sh 'mkdir spock-reports' | |
sh 'cp **/target/spock-reports/com.* spock-reports/.' | |
sh ''' | |
for dir in $(find . -mindepth 1 -maxdepth 1 -type d) | |
do | |
file=$dir/target/spock-reports/index.html | |
if [ -f "$file" ] | |
then | |
cp $file spock-reports/$dir-index.html | |
fi | |
done''' | |
publishHTML(target: [allowMissing: true, alwaysLinkToLastBuild: false, keepAll: true, reportDir: 'spock-reports', reportFiles: '*index.html', reportName: 'Spock Report', reportTitles: '']) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment