From 38a9cda825c6f0de518782a9a7e98254d62c44ce Mon Sep 17 00:00:00 2001 From: Stefan Reimer Date: Tue, 15 Aug 2023 14:36:15 +0000 Subject: [PATCH] Debug CI pipeline --- podman.mk | 7 +------ vars/buildPodman.groovy | 4 ++-- 2 files changed, 3 insertions(+), 8 deletions(-) diff --git a/podman.mk b/podman.mk index 4a51640..28a699d 100644 --- a/podman.mk +++ b/podman.mk @@ -1,11 +1,6 @@ # Parse version from latest git semver tag GIT_TAG := $(shell git describe --tags --match v*.*.* 2>/dev/null || git rev-parse --short HEAD 2>/dev/null) - -GIT_BRANCH ?= $(shell git name-rev --name-only HEAD 2>/dev/null | sed -e 's,remotes/origin/,,' -e 's/[^a-zA-Z0-9]/-/g') -# if "tags/" is in the branchname we are actually on a tag and need to use rev-parse instead -ifeq ($(findstring tags/, $(GIT_TAG)),) - GIT_BRANCH = $(shell git rev-parse --abbrev-ref HEAD 2>/dev/null) -endif +GIT_BRANCH ?= $(shell git rev-parse --abbrev-ref HEAD 2>/dev/null | sed -e 's/[^a-zA-Z0-9]/-/g') TAG := $(GIT_TAG) # append branch name to tag if NOT main nor master diff --git a/vars/buildPodman.groovy b/vars/buildPodman.groovy index 89811ae..e33c2cf 100644 --- a/vars/buildPodman.groovy +++ b/vars/buildPodman.groovy @@ -10,6 +10,7 @@ def call(Map config=[:]) { stages { stage('Prepare') { steps { + // we set pull tags as project adv. options // pull tags //withCredentials([gitUsernamePassword(credentialsId: 'gitea-jenkins-user')]) { // sh 'git fetch -q --tags ${GIT_URL}' @@ -22,8 +23,7 @@ def call(Map config=[:]) { // Build using rootless podman stage('Build') { steps { - sh 'env' - sh 'make build' + sh 'make build GIT_BRANCH=$GIT_BRANCH' } }