2019-08-06 03:08:45 +08:00
|
|
|
pipeline {
|
|
|
|
agent any
|
|
|
|
|
|
|
|
stages {
|
2019-08-06 17:16:13 +08:00
|
|
|
stage('Build') {
|
|
|
|
steps {
|
|
|
|
dir("Plan") {
|
|
|
|
script {
|
|
|
|
sh './gradlew shadowJar --parallel'
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
stage('Tests') {
|
2019-08-06 03:08:45 +08:00
|
|
|
steps {
|
|
|
|
dir("Plan") {
|
|
|
|
script {
|
|
|
|
try {
|
2019-08-07 14:29:53 +08:00
|
|
|
sh './gradlew clean test'
|
2019-08-06 03:08:45 +08:00
|
|
|
} finally {
|
2019-08-06 17:16:13 +08:00
|
|
|
junit '**/build/test-results/test/*.xml'
|
2019-08-06 03:08:45 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
stage('Checkstyle') {
|
|
|
|
steps {
|
|
|
|
dir("Plan") {
|
|
|
|
script {
|
2019-08-06 17:16:13 +08:00
|
|
|
sh './gradlew checkstyleMain checkstyleTest --parallel'
|
2019-08-06 03:08:45 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
stage('SonarQube analysis') {
|
|
|
|
steps {
|
|
|
|
dir("Plan") {
|
|
|
|
script {
|
|
|
|
withSonarQubeEnv() {
|
|
|
|
sh './gradlew sonarqube -Dsonar.organization=player-analytics-plan'
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|