forked from JodaOrg/joda-time
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathJenkinsfile
41 lines (38 loc) · 960 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
def executeMaven(buildCommand) {
withMaven(
// Maven installation declared in the Jenkins "Global Tool Configuration"
maven: 'maven',
// Maven settings.xml file defined with the Jenkins Config File Provider Plugin
// Maven settings and global settings can also be defined in Jenkins Global Tools Configuration
mavenSettingsConfig: 'maven-global-settings-xml-96ab007b-1034-4027-a8a5-6e0de13af319',
mavenLocalRepo: '.repository') {
ansiColor('xterm') {
sh "mvn ${buildCommand}"
}
}
}
pipeline {
agent any
stages {
stage('Clean') {
steps {
executeMaven("clean")
}
}
stage('Compile') {
steps {
executeMaven("compile")
}
}
stage('Test') {
steps {
executeMaven("test")
}
}
stage('Release') {
steps {
executeSbt("deploy")
}
}
}
}