forked from geogebra/geogebra
-
Notifications
You must be signed in to change notification settings - Fork 0
/
bump.jenkinsfile
26 lines (26 loc) · 1008 Bytes
/
bump.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
pipeline {
agent any
options { overrideIndexTriggers(false) }
stages {
stage('build') {
steps {
sh 'git checkout master'
sh 'git reset --hard origin/master'
sh './gradlew :common:versionBump'
script {
def version = readFile('common/build/version.txt')
currentBuild.displayName = "${currentBuild.displayName} (${version})"
}
sh 'git add common/src'
sh 'git commit --author "Jenkins <[email protected]>" -m "Version bump `cat common/build/version.txt`"'
withCredentials([usernamePassword(credentialsId: "gitlab",
usernameVariable: 'username', passwordVariable: 'password')]) {
sh "git push https://${username}:${password}@git.geogebra.org/ggb/geogebra.git master"
}
}
}
}
post {
always { cleanAndNotify() }
}
}