Commit 3e208a24 authored by Eloy Lafuente's avatar Eloy Lafuente
Browse files

Add-back the second path handling junit files, it's phpunit one!

Note that behat saves them as .xml files under junit subdir, and
phpunit saves them as .junit files without subdir, hence the 2 patterns.
parent 1f573508
......@@ -82,10 +82,12 @@ def call(org.moodle.ci.Task task) {
post {
always {
// Process the jUnit test results.
// (note that behat saves them as .xml files under junit subdir, and
// phpunit saves them as .junit files without subdir, hence the 2 patterns)
// By default only process last-rerun junit files. Those are the final, consistent failures.
script {
// By default, process all the junit files.
def jFiles = "${env.BUILD_ID}/*.junit/*.xml"
def jFiles = "${env.BUILD_ID}/*.junit/*.xml,${env.BUILD_ID}/*.junit"
if (task.task == "behat" && task.numReruns > 0) {
// For behat tasks with reruns, let's process last rerun junit logs only.
jFiles = "${env.BUILD_ID}/*rerun${task.numReruns}.junit/*.xml"
......@@ -96,6 +98,8 @@ def call(org.moodle.ci.Task task) {
}
// Keep a copy of the junit artifacts into s3 bucket.
// (note that behat saves them as .xml files under junit subdir, and
// phpunit saves them as .junit files without subdir, hence the 2 patterns)
s3Upload consoleLogLevel: 'INFO',
dontSetBuildResultOnFailure: false,
dontWaitForConcurrentBuildCompletion: false,
......@@ -110,7 +114,7 @@ def call(org.moodle.ci.Task task) {
noUploadOnFailure: false,
selectedRegion: 'eu-west-1',
showDirectlyInBrowser: true,
sourceFile: "${env.BUILD_ID}/*.junit/*.xml",
sourceFile: "${env.BUILD_ID}/*.junit/*.xml,${env.BUILD_ID}/*.junit",
storageClass: 'STANDARD',
uploadFromSlave: true,
useServerSideEncryption: false
......@@ -121,7 +125,11 @@ def call(org.moodle.ci.Task task) {
userMetadata: []
// Keep all artifacts in the build directory, but don't store the junit files. These are in S3 anyway.
archiveArtifacts allowEmptyArchive: true, artifacts: "${env.BUILD_ID}/**", excludes: "${env.BUILD_ID}/*.junit/*.xml"
// (note that behat saves them as .xml files under junit subdir, and
// phpunit saves them as .junit files without subdir, hence the 2 patterns)
archiveArtifacts allowEmptyArchive: true,
artifacts: "${env.BUILD_ID}/**",
excludes: "${env.BUILD_ID}/*.junit/*.xml,${env.BUILD_ID}/*.junit"
// Clean the workspace. No point storing all of this.
cleanWs deleteDirs: true, notFailBuild: true
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment