3 def projectName = "sebhoss/maven-build-process"
4 def repositoryLocation = ".repository"
5 def mavenVersion = "maven-latest"
6 def mavenSettings = "repository.metio.wtf"
7 def githubCredentials = "build-metio-wtf-github"
10 dir("${repositoryLocation}") {
19 stage('Update Properties') {
21 maven: "${mavenVersion}",
22 mavenSettingsConfig: "${mavenSettings}",
23 mavenLocalRepo: "${repositoryLocation}") {
28 versions:update-properties \
29 -DgenerateBackupPoms=false
36 string(credentialsId: 'git.user.name', variable: 'GIT_USER'),
37 string(credentialsId: 'git.user.email', variable: 'GIT_EMAIL')]) {
38 sh "git config user.name '${GIT_USER}'"
39 sh "git config user.email '${GIT_EMAIL}'"
44 sh "git add pom.xml **/**/pom.xml"
45 sh "git commit -s -m 'Update properties to latest version'"
49 withCredentials([[$class: 'UsernamePasswordMultiBinding', credentialsId: "${githubCredentials}",
50 usernameVariable: 'USERNAME', passwordVariable: 'TOKEN']]) {
51 sh "git push https://${TOKEN}:x-oauth-basic@github.com/${projectName}.git"