IT archives

This commit is contained in:
tibordigana 2019-07-31 17:22:07 +02:00
parent 93c88a2bd0
commit cb71885c14
1 changed files with 29 additions and 14 deletions

15
Jenkinsfile vendored
View File

@ -97,6 +97,7 @@ for (String os in runITsOses) {
bat "if exist apache-maven-dist.zip del /q apache-maven-dist.zip"
}
unstash 'dist'
try {
withMaven(jdk: jdkName, maven: mvnName, mavenLocalRepo:"${WORK_DIR}/it-local-repo", options:[
junitPublisher(ignoreAttachments: false)
]) {
@ -107,17 +108,23 @@ for (String os in runITsOses) {
}
if (isUnix()) {
sh 'df -hT'
sh "${cmd}"
} else {
bat 'wmic logicaldisk get size,freespace,caption'
bat "${cmd}"
}
}
} finally {
archiveDirs(stageId, ['core-it-suite-logs':'core-it-suite/target/test-classes',
'core-it-suite-reports':'core-it-suite/target/surefire-reports'])
deleteDir() // clean up after ourselves to reduce disk space
}
}
}
}
}
}
}
// run the parallel ITs
@ -156,3 +163,11 @@ parallel(runITsTasks)
jenkinsNotify()
}
}
def archiveDirs(stageId, archives) {
archives.each { archivePrefix, pathToContent ->
if (fileExists(pathToContent)) {
zip(zipFile: "${archivePrefix}-${stageId}.zip", dir: pathToContent, archive: true)
}
}
}