ci: split Analytics stage (#4701)

Co-authored-by: Kevin Turner <83819+keturn@users.noreply.github.com>
develop
jdrueckert 2021-05-24 03:13:35 +02:00 committed by GitHub
parent 142c44a255
commit ed2b29337d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 26 additions and 6 deletions

32
Jenkinsfile vendored
View File

@ -21,11 +21,21 @@ node ("ts-engine && heavy && java8") {
checkout scm
sh 'chmod +x gradlew'
}
stage('Build') {
// Jenkins sometimes doesn't run Gradle automatically in plain console mode, so make it explicit
sh './gradlew --console=plain clean extractConfig extractNatives distForLauncher testDist'
archiveArtifacts 'gradlew, gradle/wrapper/*, templates/build.gradle, config/**, facades/PC/build/distributions/Terasology.zip, engine/build/resources/main/org/terasology/engine/version/versionInfo.properties, natives/**, build-logic/src/**, build-logic/*.kts'
}
stage('Unit Tests') {
try {
sh './gradlew --console=plain unitTest'
} finally {
junit testResults: '**/build/test-results/unitTest/*.xml'
}
}
stage('Publish') {
if (specialBranch) {
withCredentials([usernamePassword(credentialsId: 'artifactory-gooey', usernameVariable: 'artifactoryUser', passwordVariable: 'artifactoryPass')]) {
@ -46,16 +56,26 @@ node ("ts-engine && heavy && java8") {
build job: 'Nanoware/Omega/master', wait: false
}
}
stage('Analytics') {
sh "./gradlew --console=plain check spotbugsmain javadoc"
stage('Integration Tests') {
try {
sh './gradlew --console=plain integrationTest'
} finally {
junit testResults: '**/build/test-results/integrationTest/*.xml', allowEmptyResults: true
}
}
stage('Record') {
junit testResults: '**/build/test-results/test/*.xml', allowEmptyResults: true
recordIssues tool: javaDoc()
step([$class: 'JavadocArchiver', javadocDir: 'engine/build/docs/javadoc', keepAll: false])
stage('Analytics') {
sh './gradlew --console=plain check -x test spotbugsmain'
recordIssues tool: checkStyle(pattern: '**/build/reports/checkstyle/*.xml')
recordIssues tool: spotBugs(pattern: '**/build/reports/spotbugs/main/*.xml', useRankAsPriority: true)
recordIssues tool: pmdParser(pattern: '**/build/reports/pmd/*.xml')
recordIssues tool: taskScanner(includePattern: '**/*.java,**/*.groovy,**/*.gradle', lowTags: 'WIBNIF', normalTags: 'TODO', highTags: 'ASAP')
}
stage('Documentation') {
sh './gradlew --console=plain javadoc'
step([$class: 'JavadocArchiver', javadocDir: 'engine/build/docs/javadoc', keepAll: false])
recordIssues tool: javaDoc()
}
}