From 42bab5448ada96f01c11183aeb845e14642e2069 Mon Sep 17 00:00:00 2001 From: Sebastian Hugentobler Date: Tue, 3 Jun 2025 18:52:56 +0200 Subject: [PATCH] try git ref --- Jenkinsfile | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index f6a5076..6bab94e 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -1,10 +1,15 @@ pipeline { agent none + environment { + GIT_REF = """${sh( + script: 'git describe --tags --exact-match 2>/dev/null || git symbolic-ref --short HEAD' + returnStdout: true, + )}""" + } stages { stage('Build') { agent { label 'linux-aarch64' } steps { - env.GIT_REF = sh(script: 'git describe --tags --exact-match 2>/dev/null || git symbolic-ref --short HEAD', returnStdout: true).trim() sh "podman build -t docker.io/thallian/atuin:${env.GIT_REF} ." } }