From ed949f97b6ff049bf7c0c1303dc2ab5902edb6df Mon Sep 17 00:00:00 2001 From: Sebastian Hugentobler Date: Tue, 3 Jun 2025 19:03:17 +0200 Subject: [PATCH] try git ref --- Jenkinsfile | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index afe4bd6..de0048d 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -1,7 +1,10 @@ pipeline { agent none environment { - GIT_REF = sh(script: 'git describe --tags --exact-match 2>/dev/null || git symbolic-ref --short HEAD', returnStdout: true) + GIT_REF = """${sh( + returnStdout: true, + script: 'git describe --tags --exact-match 2>/dev/null || git symbolic-ref --short HEAD' + ).trim()}""" } stages { stage('Build') {