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 {
|
2019-08-07 13:58:52 +02:00
|
|
|
sh './gradlew clean shadowJar --parallel'
|
2019-08-06 11:16:13 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
stage('Tests') {
|
2019-08-05 21:08:45 +02:00
|
|
|
steps {
|
|
|
|
dir("Plan") {
|
|
|
|
script {
|
|
|
|
try {
|
2019-08-07 13:58:52 +02:00
|
|
|
sh './gradlew test --parallel'
|
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'
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2019-08-07 13:58:52 +02:00
|
|
|
post {
|
|
|
|
always {
|
|
|
|
dir("Plan") {
|
|
|
|
script {
|
|
|
|
sh './gradlew clean --parallel'
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2019-08-05 21:08:45 +02:00
|
|
|
}
|