Debug CI pipeline
This commit is contained in:
parent
3efcc8148d
commit
38a9cda825
@ -1,11 +1,6 @@
|
|||||||
# Parse version from latest git semver tag
|
# 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_TAG := $(shell git describe --tags --match v*.*.* 2>/dev/null || git rev-parse --short HEAD 2>/dev/null)
|
||||||
|
GIT_BRANCH ?= $(shell git rev-parse --abbrev-ref HEAD 2>/dev/null | sed -e 's/[^a-zA-Z0-9]/-/g')
|
||||||
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
|
|
||||||
|
|
||||||
TAG := $(GIT_TAG)
|
TAG := $(GIT_TAG)
|
||||||
# append branch name to tag if NOT main nor master
|
# append branch name to tag if NOT main nor master
|
||||||
|
@ -10,6 +10,7 @@ def call(Map config=[:]) {
|
|||||||
stages {
|
stages {
|
||||||
stage('Prepare') {
|
stage('Prepare') {
|
||||||
steps {
|
steps {
|
||||||
|
// we set pull tags as project adv. options
|
||||||
// pull tags
|
// pull tags
|
||||||
//withCredentials([gitUsernamePassword(credentialsId: 'gitea-jenkins-user')]) {
|
//withCredentials([gitUsernamePassword(credentialsId: 'gitea-jenkins-user')]) {
|
||||||
// sh 'git fetch -q --tags ${GIT_URL}'
|
// sh 'git fetch -q --tags ${GIT_URL}'
|
||||||
@ -22,8 +23,7 @@ def call(Map config=[:]) {
|
|||||||
// Build using rootless podman
|
// Build using rootless podman
|
||||||
stage('Build') {
|
stage('Build') {
|
||||||
steps {
|
steps {
|
||||||
sh 'env'
|
sh 'make build GIT_BRANCH=$GIT_BRANCH'
|
||||||
sh 'make build'
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user