-
Notifications
You must be signed in to change notification settings - Fork 1
/
Jenkinsfile
39 lines (39 loc) · 1.01 KB
/
Jenkinsfile
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
36
37
38
39
pipeline {
agent any
tools {
maven '3.9.0'
}
stages {
stage('Git checkout') {
steps {
git credentialsId: '02293762-3141-4165-9f13-8ff3d2411726', url: 'https://ksoftwares@dev.azure.com/ksoftwares/WASSALNY%20APP/_git/wassalny-auth-ms'
}
}
stage('Unit test') {
steps {
sh 'mvn test'
}
}
stage('Maven Build') {
steps {
sh 'mvn clean install -DskipTests'
}
}
stage('SonarQube analysis') {
steps {
script {
withSonarQubeEnv(credentialsId: 'sonarqube-api-key') {
sh 'mvn clean package sonar:sonar'
}
}
}
}
stage('Quality Gate') {
steps {
timeout(time: 1, unit: 'HOURS') {
waitForQualityGate abortPipeline: true
}
}
}
}
}