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