Skip to content

Commit cee6407

Browse files
authored
Create Jenkinsfile
1 parent 4bbc39c commit cee6407

File tree

1 file changed

+29
-0
lines changed

1 file changed

+29
-0
lines changed

sonarqube/Jenkinsfile

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
pipeline{
2+
agent any
3+
environment {
4+
PATH = "$PATH:/opt/apache-maven-3.8.2/bin"
5+
}
6+
stages{
7+
stage('GetCode'){
8+
steps{
9+
git 'https://github.com/ravdy/javaloginapp.git'
10+
}
11+
}
12+
stage('Build'){
13+
steps{
14+
sh 'mvn clean package'
15+
}
16+
}
17+
stage('SonarQube analysis') {
18+
// def scannerHome = tool 'SonarScanner 4.0';
19+
steps{
20+
withSonarQubeEnv('sonarqube-8.9') {
21+
// If you have configured more than one global server connection, you can specify its name
22+
// sh "${scannerHome}/bin/sonar-scanner"
23+
sh "mvn sonar:sonar"
24+
}
25+
}
26+
}
27+
28+
}
29+
}

0 commit comments

Comments
 (0)