-
Notifications
You must be signed in to change notification settings - Fork 8
/
Jenkinsfile
37 lines (37 loc) · 899 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
pipeline {
agent {
docker {
image 'maven:3.6-jdk-11'
args '-v /home/jenkins/.m2:/var/maven/.m2 -v /home/jenkins/.gnupg:/.gnupg -e MAVEN_CONFIG=/var/maven/.m2 -e MAVEN_OPTS=-Duser.home=/var/maven'
}
}
environment {
COVERALLS_REPO_TOKEN = credentials('coveralls_repo_token_semantic_version')
GPG_SECRET = credentials('gpg_password')
}
stages {
stage('Build') {
steps {
sh 'mvn -B clean verify'
}
}
stage('Coverage') {
steps {
sh 'mvn -B jacoco:report jacoco:report-integration coveralls:report -DrepoToken=$COVERALLS_REPO_TOKEN'
}
}
stage('javadoc') {
steps {
sh 'mvn -B javadoc:javadoc'
}
}
stage('Deploy SNAPSHOT') {
when {
branch 'dev'
}
steps {
sh 'mvn -B -Prelease -DskipTests -Dgpg.passphrase=${GPG_SECRET} deploy'
}
}
}
}