-
Notifications
You must be signed in to change notification settings - Fork 11
/
Jenkinsfile
43 lines (40 loc) · 885 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
40
41
42
43
pipeline {
agent any
tools {
maven 'Maven 3'
jdk 'Java 11'
}
options {
buildDiscarder(logRotator(artifactNumToKeepStr: '15'))
}
stages {
stage ('Build') {
steps {
withMaven(options: [pipelineGraphPublisher(lifecycleThreshold: 'install')]) {
sh 'mvn clean install'
}
}
}
stage('Snapshot') {
when {
branch "develop"
}
steps {
sh 'mvn source:jar deploy -DskipTests'
}
}
stage ('Release') {
when {
branch "master"
}
steps {
sh 'mvn javadoc:jar source:jar deploy -DskipTests'
}
}
}
post {
always {
deleteDir()
}
}
}