Добавил в сборочную линию проверку SonarQube
This commit is contained in:
40
Jenkinsfile
vendored
Normal file
40
Jenkinsfile
vendored
Normal file
@@ -0,0 +1,40 @@
|
|||||||
|
pipeline {
|
||||||
|
|
||||||
|
agent {
|
||||||
|
label 'windows'
|
||||||
|
}
|
||||||
|
|
||||||
|
environment {
|
||||||
|
platformVersion = '8.3.26.1581'
|
||||||
|
}
|
||||||
|
|
||||||
|
post {
|
||||||
|
always {
|
||||||
|
allure includeProperties: false, jdk: '', results: [[path: 'build/syntax-check/allure']]
|
||||||
|
junit allowEmptyResults: true, testResults: 'build/syntax-check/junit/junit.xml'
|
||||||
|
}
|
||||||
|
success {
|
||||||
|
echo 'success'
|
||||||
|
}
|
||||||
|
failure {
|
||||||
|
echo 'failure'
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
stages {
|
||||||
|
|
||||||
|
stage("SonarQube") {
|
||||||
|
steps {
|
||||||
|
script {
|
||||||
|
scannerHome = tool name: 'sonar-scanner', type: 'hudson.plugins.sonar.SonarRunnerInstallation'
|
||||||
|
withSonarQubeEnv("Sonar") {
|
||||||
|
bat "chcp 65001\n ${scannerHome}/bin/sonar-scanner -Dsonar.projectVersion=${BUILD_ID}"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user