This repository has been archived by the owner on Nov 27, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 61
/
Copy pathJenkinsfile
80 lines (71 loc) · 1.75 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
node {
def mvnHome
stage('Preparation') {
git 'https://github.com/LinuxSuRen/phoenix.webui.framework.git'
mvnHome = tool 'M3'
}
stage('Clean') {
if(isUnix()){
sh "'${mvnHome}/bin/mvn' clean"
}else{
bat(/"${mvnHome}\bin\mvn" clean/)
}
}
stage('Test') {
if(isUnix()){
sh "'${mvnHome}/bin/mvn' test"
}else{
bat(/"${mvnHome}\bin\mvn" test/)
}
}
stage('JavaDoc') {
if(isUnix()){
sh "'${mvnHome}/bin/mvn' javadoc:jar -DdocSkip=false"
}else{
bat(/"${mvnHome}\bin\mvn" javadoc:jar -DdocSkip=false/)
}
}
stage('Site') {
if(isUnix()){
sh "'${mvnHome}/bin/mvn' site"
}else{
bat(/"${mvnHome}\bin\mvn" site/)
}
}
stage('Package') {
if(isUnix()){
sh "'${mvnHome}/bin/mvn' --update-snapshots package"
}else{
bat(/"${mvnHome}\bin\mvn" --update-snapshots package/)
}
}
stage('Archive Site') {
sh "tar -czvf target/site.tar.gz -C target site"
archiveArtifacts 'target/site.tar.gz'
}
stage('Deploy') {
if(isUnix()){
sh "'${mvnHome}/bin/mvn' deploy -DsignSkip=false -DdocSkip=false"
}else{
bat(/"${mvnHome}\bin\mvn" deploy -DsignSkip=false -DdocSkip=false/)
}
}
}
properties([
[
$class: 'GithubProjectProperty',
displayName: 'phoenix.webui.framework',
projectUrlStr: 'https://github.com/LinuxSuRen/phoenix.webui.framework'
],
buildDiscarder(
logRotator(
artifactDaysToKeepStr: '',
artifactNumToKeepStr: '',
daysToKeepStr: '7',
numToKeepStr: '14'
)
),
pipelineTriggers([
pollSCM('H/15 * * * *')
])
])