From 46f9b2ab60e4faf106182ad3dffed0edaa95ca77 Mon Sep 17 00:00:00 2001 From: Christian Poessinger Date: Sun, 6 Oct 2019 15:06:20 +0200 Subject: Jenkins: add current Git commit ID to build description --- Jenkinsfile | 11 +++++------ 1 file 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' } } } -- cgit v1.2.3