diff options
author | Christian Poessinger <christian@poessinger.com> | 2019-10-06 15:06:20 +0200 |
---|---|---|
committer | Christian Poessinger <christian@poessinger.com> | 2019-10-06 15:06:20 +0200 |
commit | 46f9b2ab60e4faf106182ad3dffed0edaa95ca77 (patch) | |
tree | e8c6c5cd2ec60f9f1bdd65b06f63e1a082406e15 | |
parent | 45a9ea3c32183c0b0e7bbcabbe41dbe8d6337744 (diff) | |
download | vyos-build-46f9b2ab60e4faf106182ad3dffed0edaa95ca77.tar.gz vyos-build-46f9b2ab60e4faf106182ad3dffed0edaa95ca77.zip |
Jenkins: add current Git commit ID to build description
-rw-r--r-- | Jenkinsfile | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/Jenkinsfile b/Jenkinsfile index 34c7b766..59223b79 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -90,17 +90,16 @@ pipeline { stage('Configure') { steps { script { - sh """ - ./configure --build-by="autobuild@vyos.net" --debian-mirror="http://ftp.us.debian.org/debian/" - """ + def commitId = sh(returnStdout: true, script: 'git rev-parse --short=11 HEAD').trim() + currentBuild.description = sprintf('Git SHA1: %s', commitId[-11..-1]) + + sh './configure --build-by autobuild@vyos.net --debian-mirror http://ftp.us.debian.org/debian/' } } } stage('Build') { steps { - sh """ - sudo make iso - """ + sh 'sudo make iso' } } } |