-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathJenkinsfile
40 lines (39 loc) · 966 Bytes
/
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 'maven-3.9.8'
jdk 'java-21'
}
environment {
USER = 'kasimir'
}
stages {
stage('Initialize') {
steps {
sh 'echo "PATH = ${PATH}"'
sh 'echo "M2_HOME = ${M2_HOME}"'
}
}
stage('Build') {
steps {
sh 'mvn -B -DskipTests clean install'
}
}
stage('Testing') {
steps {
sh 'mvn -B test'
}
post {
always {
junit 'target/surefire-reports/*.xml'
}
}
}
stage('SonarQube Analysis') {
steps {
// properties such as sonar.host.url and sonar.login are configured in the m2 settings.xml for this profile
sh 'mvn clean verify -Psonar -Dsonar.projectKey=kcl'
}
}
}
}