diff options
author | Christian Poessinger <christian@poessinger.com> | 2020-06-20 23:08:56 +0200 |
---|---|---|
committer | Christian Poessinger <christian@poessinger.com> | 2020-06-20 23:11:56 +0200 |
commit | 918700c5a56038529ac28ddfb86da96191f33604 (patch) | |
tree | e9174eda8c000bc8c07b28ae1c12c89febde8662 /vars | |
parent | 22888ab75116af69fe88ec79e95ba8c5559f1e5b (diff) | |
download | vyos-build-918700c5a56038529ac28ddfb86da96191f33604.tar.gz vyos-build-918700c5a56038529ac28ddfb86da96191f33604.zip |
Jenkins: lib: record Git commit ID in job description
Diffstat (limited to 'vars')
-rw-r--r-- | vars/buildPackage.groovy | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/vars/buildPackage.groovy b/vars/buildPackage.groovy index f2a72dc4..801a2b33 100644 --- a/vars/buildPackage.groovy +++ b/vars/buildPackage.groovy @@ -75,6 +75,10 @@ def call(description, pkgList) { steps { script { checkout scm + + def commitId = sh(returnStdout: true, script: 'git rev-parse --short=11 HEAD').trim() + currentBuild.description = sprintf('Git SHA1: %s', commitId[-11..-1]) + pkgList.each { pkg -> dir(pkg.name) { checkout([$class: 'GitSCM', |