mirror of
https://github.com/spring-projects/spring-petclinic.git
synced 2025-07-19 14:05:50 +00:00
Changed
This commit is contained in:
parent
88975dc500
commit
29503c4f91
1 changed files with 24 additions and 32 deletions
10
Jenkinsfile
vendored
10
Jenkinsfile
vendored
|
@ -2,7 +2,6 @@ node {
|
||||||
def mavenHome
|
def mavenHome
|
||||||
|
|
||||||
stage('Code Checkout') {
|
stage('Code Checkout') {
|
||||||
|
|
||||||
// Get code from a repository and Git has to be installed in the system; git must be configured in the Global Tool Configuration
|
// Get code from a repository and Git has to be installed in the system; git must be configured in the Global Tool Configuration
|
||||||
git 'https://github.com/mitesh51/spring-petclinic.git'
|
git 'https://github.com/mitesh51/spring-petclinic.git'
|
||||||
|
|
||||||
|
@ -11,19 +10,12 @@ node {
|
||||||
mavenHome = tool 'apache-maven-3.5.3'
|
mavenHome = tool 'apache-maven-3.5.3'
|
||||||
}
|
}
|
||||||
stage('Code Analysis') {
|
stage('Code Analysis') {
|
||||||
|
|
||||||
// Configure SonarQube Scanner in Manage Jenkins -> Global Tool Configuration
|
// Configure SonarQube Scanner in Manage Jenkins -> Global Tool Configuration
|
||||||
def scannerHome = tool 'SonarQube Scanner';
|
def scannerHome = tool 'SonarQube Scanner';
|
||||||
|
|
||||||
// Sonarqube 7 must be configured in the Jenkins Manage Jenkins -> Configure System -> Add SonarQube server
|
// Sonarqube 7 must be configured in the Jenkins Manage Jenkins -> Configure System -> Add SonarQube server
|
||||||
withSonarQubeEnv('Sonar7.1') {
|
withSonarQubeEnv('Sonar7.1') {
|
||||||
|
bat "${scannerHome}/bin/sonar-scanner -Dsonar.host.url=http://localhost:9000 -Dsonar.login=4589cdd82528c33f782b63254d9656d564f42bd1 -Dsonar.projectVersion=1.0 -Dsonar.projectKey=PetClinic_Key -Dsonar.sources=src"
|
||||||
bat "${scannerHome}/bin/sonar-scanner -
|
|
||||||
Dsonar.host.url=http://localhost:9000 -
|
|
||||||
Dsonar.login=4589cdd82528c33f782b63254d9656d564f42bd1 -
|
|
||||||
Dsonar.projectVersion=1.0 -
|
|
||||||
Dsonar.projectKey=PetClinic_Key -
|
|
||||||
Dsonar.sources=src"
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
stage('Build') {
|
stage('Build') {
|
||||||
|
|
Loading…
Reference in a new issue