Skip to content

Commit

Permalink
ci: split Analytics stage (MovingBlocks#4701)
Browse files Browse the repository at this point in the history
Co-authored-by: Kevin Turner <[email protected]>
  • Loading branch information
jdrueckert and keturn authored May 24, 2021
1 parent 142c44a commit ed2b293
Showing 1 changed file with 26 additions and 6 deletions.
32 changes: 26 additions & 6 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -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')]) {
Expand All @@ -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()
}
}

0 comments on commit ed2b293

Please sign in to comment.