added build tagging

This commit is contained in:
Ziver Koc 2016-12-19 17:02:55 +01:00
parent e0f31027a4
commit 2ac6b5e311

11
Jenkinsfile vendored
View file

@ -22,8 +22,15 @@ node {
stage('Package') {
sh 'ant package'
archiveArtifacts artifacts: 'build/release/Zutil.jar', fingerprint: true
sh 'ant package'
archiveArtifacts artifacts: 'build/release/Zutil.jar', fingerprint: true
// Tag artifact
withCredentials([[$class: 'UsernamePasswordMultiBinding', credentialsId: 'f8e5f6c6-4adb-4ab2-bb5d-1c8535dff491',
usernameVariable: 'USERNAME', passwordVariable: 'PASSWORD']]) {
sh "git tag BUILD-" + env.BUILD_ID
sh "git push 'https://${USERNAME}:${PASSWORD}@repo.koc.se/hal.git' --tags"
}
}