Plan/Jenkinsfile

61 lines
1.6 KiB
Plaintext
Raw Normal View History

pipeline {
agent any
stages {
stage('Build') {
steps {
dir("Plan") {
script {
2019-08-12 13:33:49 +02:00
sh 'rm -rf builds'
sh './gradlew clean shadowJar --parallel'
}
}
2019-08-12 13:33:49 +02:00
archiveArtifacts artifacts: 'Plan/builds/*.jar', fingerprint: false
}
}
stage('Tests') {
steps {
dir("Plan") {
script {
try {
sh './gradlew test --parallel'
} finally {
junit '**/build/test-results/test/*.xml'
}
}
}
}
}
stage('Checkstyle') {
steps {
dir("Plan") {
script {
sh './gradlew checkstyleMain checkstyleTest --parallel'
}
}
}
}
stage('SonarQube analysis') {
steps {
dir("Plan") {
script {
withSonarQubeEnv() {
sh './gradlew sonarqube -Dsonar.organization=player-analytics-plan'
}
}
}
}
}
}
post {
always {
dir("Plan") {
script {
sh './gradlew clean --parallel'
2019-08-12 13:33:49 +02:00
sh 'rm -rf builds'
}
}
}
}
}