mirror of
https://github.com/plan-player-analytics/Plan.git
synced 2024-12-28 20:17:42 +01:00
Configured Jenkins (#1127)
Added a Jenkins configuration file for a build pipeline using gradle. - Runs tests - Run checkstyle - Runs sonar and publishes to SonarCloud
This commit is contained in:
parent
e54a781520
commit
0f058e0823
39
Jenkinsfile
vendored
Normal file
39
Jenkinsfile
vendored
Normal file
@ -0,0 +1,39 @@
|
||||
pipeline {
|
||||
agent any
|
||||
|
||||
stages {
|
||||
stage('Test') {
|
||||
steps {
|
||||
dir("Plan") {
|
||||
script {
|
||||
try {
|
||||
sh './gradlew clean test --no-daemon' //run a gradle task
|
||||
} finally {
|
||||
junit '**/build/test-results/test/*.xml' //make the junit test results available in any case (success & failure)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
stage('Checkstyle') {
|
||||
steps {
|
||||
dir("Plan") {
|
||||
script {
|
||||
sh './gradlew checkstyleMain checkstyleTest'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
stage('SonarQube analysis') {
|
||||
steps {
|
||||
dir("Plan") {
|
||||
script {
|
||||
withSonarQubeEnv() {
|
||||
sh './gradlew sonarqube -Dsonar.organization=player-analytics-plan'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user