Skip to content

Commit

Permalink
Merge pull request #25 from MovingBlocks/test/logspamReduction
Browse files Browse the repository at this point in the history
  • Loading branch information
keturn authored Jun 4, 2022
2 parents d46bd45 + 96b573c commit b859991
Showing 1 changed file with 15 additions and 7 deletions.
22 changes: 15 additions & 7 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -55,18 +55,20 @@ pipeline {
discoverGitReferenceBuild(defaultBranch: 'develop')

echo "Copying in the build harness from an engine job: $buildHarnessOrigin"
copyArtifacts(projectName: buildHarnessOrigin, filter: "templates/build.gradle", flatten: true, selector: lastSuccessful())
copyArtifacts(projectName: buildHarnessOrigin, filter: "templates/build.gradle, templates/module.logback-test.xml", flatten: true, selector: lastSuccessful())
copyArtifacts(projectName: buildHarnessOrigin, filter: "*, gradle/wrapper/**, config/**, natives/**, build-logic/**", selector: lastSuccessful())

echo "Setting project name to: $realProjectName"
writeFile file: 'settings.gradle',
text: """rootProject.name = '$realProjectName'; includeBuild('build-logic')"""

sh 'rm -f gradle.properties'
sh label: 'configure workspace', script: '''
rm -f gradle.properties
chmod a+x gradlew
mkdir -p src/test/resources
mv --verbose --no-clobber module.logback-test.xml src/test/resources/logback-test.xml
'''

sh """
echo "rootProject.name = '$realProjectName'" > settings.gradle
echo 'includeBuild("build-logic")' >> settings.gradle
"""
sh 'chmod +x gradlew'
sh './gradlew --version'
}
}
Expand Down Expand Up @@ -113,6 +115,9 @@ pipeline {
//
// See https://docs.gradle.org/current/userguide/java_testing.html#test_reporting
junit testResults: '**/build/test-results/unitTest/*.xml', allowEmptyResults: true
// Jenkins truncates large test outputs, so archive it as well.
tar file: 'build/unitTest-results.tgz', archive: true, compress: true, overwrite: true,
glob: '**/build/test-results/unitTest/*.xml'
}
}
}
Expand Down Expand Up @@ -197,6 +202,9 @@ pipeline {
//
// See https://docs.gradle.org/current/userguide/java_testing.html#test_reporting
junit testResults: '**/build/test-results/integrationTest/*.xml', allowEmptyResults: true, healthScaleFactor: 0.0
// Jenkins truncates large test outputs, so archive it as well.
tar file: 'build/integrationTest-results.tgz', archive: true, compress: true, overwrite: true,
glob: '**/build/test-results/integrationTest/*.xml'
}
}
}
Expand Down

0 comments on commit b859991

Please sign in to comment.