-
Notifications
You must be signed in to change notification settings - Fork 75
/
Copy pathJenkinsfile-1
35 lines (33 loc) · 921 Bytes
/
Jenkinsfile-1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
pipeline {
agent any
tools {
maven 'maven-3.8.6'
}
stages {
stage('Checkout git') {
steps {
git branch: 'main', url: 'https://github.com/logicopslab/java-web-app'
}
}
stage ('Build & JUnit Test') {
steps {
sh 'mvn install'
}
post {
success {
junit 'target/surefire-reports/**/*.xml'
}
}
}
stage('SonarQube Analysis'){
steps{
withSonarQubeEnv('sonarqube') {
sh 'mvn clean verify sonar:sonar \
-Dsonar.projectKey=devsecopsproject-key \
-Dsonar.host.url=$sonarurl \
-Dsonar.login=$sonarlogin'
}
}
}
}
}