summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Poessinger <christian@poessinger.com>2019-10-06 15:10:50 +0200
committerChristian Poessinger <christian@poessinger.com>2019-10-06 15:10:50 +0200
commit6ca30cb10784b77dea79b6196f54852c49ed09b6 (patch)
treeab790b22a87602273f2a9cce7a3ebc1fdaecc0ef
parent5848a4d6095e6d7bc70e34e0b7b7e2c3d8e3303f (diff)
downloadvyos-1x-6ca30cb10784b77dea79b6196f54852c49ed09b6.tar.gz
vyos-1x-6ca30cb10784b77dea79b6196f54852c49ed09b6.zip
Jenkins: add current Git commit ID to build description
-rw-r--r--Jenkinsfile8
1 files changed, 6 insertions, 2 deletions
diff --git a/Jenkinsfile b/Jenkinsfile
index 20eb2531d..bcce16dd0 100644
--- a/Jenkinsfile
+++ b/Jenkinsfile
@@ -87,7 +87,8 @@ pipeline {
steps {
script {
dir('build') {
- git branch: getGitBranchName(), url: getGitRepoURL()
+ git branch: getGitBranchName(),
+ url: getGitRepoURL()
}
}
}
@@ -96,7 +97,10 @@ pipeline {
steps {
script {
dir('build') {
- sh "dpkg-buildpackage -b -us -uc -tc"
+ def commitId = sh(returnStdout: true, script: 'git rev-parse --short=11 HEAD').trim()
+ currentBuild.description = sprintf('Git SHA1: %s', commitId[-11..-1])
+
+ sh 'dpkg-buildpackage -b -us -uc -tc'
}
}
}