Skip to content

Commit

Permalink
Create Jenkinsfile
Browse files Browse the repository at this point in the history
  • Loading branch information
ravdy authored Sep 7, 2021
1 parent 4bbc39c commit cee6407
Showing 1 changed file with 29 additions and 0 deletions.
29 changes: 29 additions & 0 deletions sonarqube/Jenkinsfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
pipeline{
agent any
environment {
PATH = "$PATH:/opt/apache-maven-3.8.2/bin"
}
stages{
stage('GetCode'){
steps{
git 'https://github.com/ravdy/javaloginapp.git'
}
}
stage('Build'){
steps{
sh 'mvn clean package'
}
}
stage('SonarQube analysis') {
// def scannerHome = tool 'SonarScanner 4.0';
steps{
withSonarQubeEnv('sonarqube-8.9') {
// If you have configured more than one global server connection, you can specify its name
// sh "${scannerHome}/bin/sonar-scanner"
sh "mvn sonar:sonar"
}
}
}

}
}

0 comments on commit cee6407

Please sign in to comment.