updated Jenkins pipeline

This commit is contained in:
2023-11-07 17:50:44 +08:00
parent 11e6a9fc92
commit 109b387a09

24
Jenkinsfile vendored
View File

@@ -6,29 +6,27 @@ pipeline {
stages { stages {
stage("Build") { stage("Build") {
steps { steps {
sh "./gradlew assemble" sh "./gradlew build"
}
}
stage("Check") {
steps {
sh "./gradlew test"
} }
post { post {
always { always {
junit 'build/test-results/test/*.xml' junit 'build/test-results/test/*.xml'
junit 'jmath/build/test-results/test/*.xml'
} }
} success {
} jacoco(
stage("Archive") { execPattern: '**/build/jacoco/*.exec',
steps { classPattern: '**/build/classes/java/main',
sh "./gradlew build" sourcePattern: '**/src/main'
)
javadoc javadocDir: "build/docs/javadoc", keepAll: true javadoc javadocDir: "build/docs/javadoc", keepAll: true
archiveArtifacts artifacts: 'build/libs/*.jar,benchmark/build/libs/*.jar', archiveArtifacts artifacts: '**/build/libs/*.jar',
allowEmptyArchive: true, allowEmptyArchive: false,
fingerprint: true, fingerprint: true,
onlyIfSuccessful: true onlyIfSuccessful: true
} }
} }
}
stage("Publish") { stage("Publish") {
steps { steps {
sh "./gradlew publish" sh "./gradlew publish"