-
Notifications
You must be signed in to change notification settings - Fork 45
/
MMP-Release.jenkinsfile
40 lines (40 loc) · 1.37 KB
/
MMP-Release.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
pipeline {
parameters {
string(name: 'version_to', defaultValue: '4.1.1', description: 'Version of the plugin that will be released.')
string(name: 'jdk', defaultValue: 'JDK8', description: 'Version of Java to be used.')
string(name: 'maven', defaultValue: 'Maven-3.9.4', description: 'Version of Maven to be used.')
}
options {
timeout(time: 1, unit: 'HOURS')
buildDiscarder(logRotator(numToKeepStr: '10'))
}
tools {
jdk params.jdk
maven params.maven
}
agent {
label 'ubuntu-14.04'
}
stages {
stage('Prepare release') {
steps {
sh "mvn org.codehaus.mojo:versions-maven-plugin:2.7:set -DallowSnapshots -DnewVersion=$version_to -DgenerateBackupPoms=false -PfullIntegration"
}
}
stage('Perform release') {
steps {
script {
def mycfg_file = 'munit-maven-settings'
configFileProvider([configFile(fileId: mycfg_file, variable: 'settingsxml')]) {
sh "mvn --settings ${env.settingsxml} -Dmaven.repo.local='${WORKSPACE}/.repository' deploy -PfullIntegration -DskipTests -Prelease -Dmaven.settings=${env.settingsxml}"
}
}
}
}
}
post {
cleanup {
cleanWs()
}
}
}