Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 42 additions & 0 deletions jenkins
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
pipeline{
agent any
stages{
stage("git code"){
steps{
git url: "https://github.com/kallepallinaveen/spring-framework-petclinic.git", branch:"prod"
}

}
stage("build code"){
steps{
sh "mvn clean install"

}

}
stage("test code"){
steps{
sh "mvn test"

}

}
stage("Sonarqube Analysis"){
environment {
def scannerHome = tool 'SonarQube Scanner 2.4'
}
steps{
withSonarQubeEnv('sonarqube-scanner'){
sh "${scannerHome}/bin/sonar-scanner"
}
}
sleep time: 30000, unit: 'MILLISECONDS'
script {
def qg = waitForQualityGate()
if (qg.status != 'OK') {
error "Pipeline aborted due to quality gate failure: ${qg.status}"
}
}
}
}
}
14 changes: 14 additions & 0 deletions sonar.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# must be unique in a given SonarQube instance
sonar.projectKey=sonar-scanning-examples
# --- optional properties ---
# defaults to project key
sonar.projectName=Naveen-pet-clinic-app
# defaults to 'not provided'
sonar.projectVersion=1.0
# Path is relative to the sonar-project.properties file. Defaults to .
sonar.sources=.
# Encoding of the source code. Default is default system encoding
sonar.sourceEncoding=UTF-8
sonar.host.url=http://7ba2808d972d.mylabserver.com:8000
sonar.java.binaries=./target/classes
sonar.login=a9401dc2d990013650b395a3d845fe7fede92e59
1 change: 1 addition & 0 deletions spring-framework-petclinic
Submodule spring-framework-petclinic added at 9aedda