forked from mybatis/guice
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathJenkinsfile
90 lines (63 loc) · 2.12 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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
pipeline{
agent any
tools {
jdk 'JAVA_HOME'
maven 'MAVEN_HOME'
}
environment {
PATH = "$PATH:C:/maven/apache-maven-3.9.6-bin (3)/apache-maven-3.9.6/bin"
}
stages{
stage('Code Compile'){
steps{
bat 'mvn clean compile'
}
}
stage('Unit test'){
steps{
bat 'mvn test'
}
}
stage('Integration test'){
steps{
bat 'mvn verify -DskipUnitTests'
}
}
stage('Maven build'){
steps{
bat 'mvn clean install'
}
}
stage('OWASP Dependency Check'){
steps{
dependencyCheck additionalArguments: '', odcInstallation: 'DP'
}
}
stage('Testing by sonar'){
steps{
bat ''' mvn sonar:sonar -Dsonar.url-http://localhost:9000/ -Dsonar.login-squ_abb67d36969df874cb80b76166032e71de78defa -Dsonar.projectname-guice \
-Dsonar.java.binaries=. \
-Dsonar.projectKey=guice '''
}
}
stage('Code build'){
steps{
bat 'mvn clean package'
}
}
}
post{
success{
emailext attachLog: true, body: '''Your guice pipeline is successfully completed.<br>
For check pipeline result click the blog.<br><br>
Thanks.<br>
-DevOps Team Ximple Solutions''', subject: 'guice pipeline result', to: '[email protected]'
}
failure{
emailext attachLog: true, body: '''Your guice pipeline is unfortunately failed.<br>
For check pipeline result click the blog.<br><br>
Thanks.<br>
-DevOps Team Ximple Solutions''', subject: 'guice pipeline result', to: '[email protected]'
}
}
}