-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathJenkinsfile
executable file
·59 lines (50 loc) · 1.33 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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
#!/usr/bin/env groovy
pipeline {
agent any
environment {
PROJECT = 'SOL'
}
stages {
stage('Checkout') {
steps {
git url: 'https://github.com/Holger-Mayer/solarsystemserver.git', branch: 'main'
}
}
stage('Build') {
steps {
sh 'mvn clean install'
}
}
stage('Run JUnit Tests') {
steps {
sh 'mvn test'
}
post {
always {
junit '**/target/surefire-reports/*.xml'
}
}
}
stage('Coverage') {
steps {
sh 'mvn jacoco:report'
}
post {
always {
jacoco execPattern:'**/target/jacoco.exec',
classPattern:'**/target/classes',
sourcePattern:'**/src/main/java',
exclusionPattern:'**/target/**/*'
}
}
}
stage('reportJira') {
steps {
withCredentials([string(credentialsId:'ZEPHYRSCALETOKEN',variable:"TOKEN")]) {
// Run Maven on a Unix agent.
sh 'sh testupload.sh ${PROJECT} ${TOKEN}'
}
}
}
}
}