test
This commit is contained in:
7
Jenkinsfile
vendored
7
Jenkinsfile
vendored
@@ -15,8 +15,9 @@ pipeline {
|
|||||||
stage('Detect Tag') {
|
stage('Detect Tag') {
|
||||||
steps {
|
steps {
|
||||||
script {
|
script {
|
||||||
if (env.GIT_BRANCH?.startsWith('refs/tags/')) {
|
def ref = sh(script: "git rev-parse --symbolic-full-name HEAD", returnStdout: true).trim()
|
||||||
def tag = env.GIT_BRANCH.replace('refs/tags/', '')
|
if (ref.startsWith('refs/tags/')) {
|
||||||
|
def tag = ref.replace('refs/tags/', '')
|
||||||
echo "Tag detected: ${tag}"
|
echo "Tag detected: ${tag}"
|
||||||
|
|
||||||
if (tag.toLowerCase().contains('unsable')) {
|
if (tag.toLowerCase().contains('unsable')) {
|
||||||
@@ -28,7 +29,7 @@ pipeline {
|
|||||||
env.TAG_NAME = tag
|
env.TAG_NAME = tag
|
||||||
} else {
|
} else {
|
||||||
// Normal branch push = DEV build
|
// Normal branch push = DEV build
|
||||||
def branchName = env.GIT_BRANCH.replace("refs/heads/", "")
|
def branchName = ref.replace("refs/heads/", "")
|
||||||
echo "Regular branch build: ${branchName}"
|
echo "Regular branch build: ${branchName}"
|
||||||
|
|
||||||
// Mark display name as a dev build
|
// Mark display name as a dev build
|
||||||
|
|||||||
Reference in New Issue
Block a user