-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathJenkinsfile
64 lines (57 loc) · 1.32 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
#!/usr/bin/env groovy
// Declarative //
pipeline {
agent any
stages {
stage('checkout') {
steps {
withMaven() {
checkout scm
}
}
}
stage('check java') {
steps {
withMaven() {
sh "java -version"
}
}
}
stage('clean') {
steps {
withMaven() {
sh "mvn clean"
}
}
}
stage('tests') {
steps {
withMaven() {
sh "mvn test"
}
}
}
stage('Build') {
steps {
withMaven() {
sh "mvn compile"
}
}
}
stage('Install to local maven repository ') {
when {
branch 'master'
}
steps {
withMaven() {
sh "mvn install -DskipTests"
}
}
}
// stage('package & publish to nexus') {
// sh "mvn compile package -DskipTests"
// // FIXME: Temporarily disabled 'publish to nexus'
// sh "mvn deploy -Prelease-phase -DskipTests"
// }
}
}