Debug CI pipeline
This commit is contained in:
parent
3efcc8148d
commit
38a9cda825
@ -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
|
||||
|
@ -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'
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user