Compare commits

...

3 Commits

Author SHA1 Message Date
William Bell
f3630fa35a add tag to build name 2025-12-01 03:42:36 +00:00
William Bell
8561f6d762 test 2025-12-01 03:40:00 +00:00
William Bell
1e21a7f11c fix tagging 2025-12-01 03:33:07 +00:00

28
Jenkinsfile vendored
View File

@@ -35,13 +35,8 @@ pipeline {
stage('Detect Tag') {
steps {
script {
echo "REF from Gitea: ${env.GITEA_REF}"
echo "GIT_BRANCH: ${env.GIT_BRANCH}"
echo "GIT_TAG: ${env.GIT_TAG}"
def ref = sh(script: "git rev-parse --symbolic-full-name HEAD", returnStdout: true).trim()
if (ref.startsWith('refs/tags/')) {
def tag = ref.replace('refs/tags/', '')
def tag = sh(script: "git describe --tags --exact-match", returnStdout: true).trim()
echo "Tag detected: ${tag}"
if (tag.toLowerCase().contains('unsable')) {
@@ -50,15 +45,8 @@ pipeline {
}
// Expose for other stages
currentBuild.displayName = "#${env.BUILD_NUMBER} ${tag}"
env.TAG_NAME = tag
} else {
// Normal branch push = DEV build
def branchName = ref.replace("refs/heads/", "")
echo "Regular branch build: ${branchName}"
// Mark display name as a dev build
currentBuild.displayName = "#${env.BUILD_NUMBER} DEV-${branchName}"
}
}
}
}
@@ -138,11 +126,7 @@ stage('Archive Build Artifacts') {
always {
script {
// Automatically detects full ref name
def ref = sh(script: "git rev-parse --symbolic-full-name HEAD", returnStdout: true).trim()
if (ref.startsWith("refs/tags/")) {
// Extract tag name
def tag = ref.replace("refs/tags/", "")
def tag = sh(script: "git describe --tags --exact-match", returnStdout: true).trim()
echo "Detected tag: ${tag}"
if (tag.toLowerCase().contains("unstable")) {
@@ -153,12 +137,6 @@ stage('Archive Build Artifacts') {
currentBuild.description = "Stable"
currentBuild.result = "SUCCESS"
}
} else {
currentBuild.result = "UNSTABLE"
echo "Regular commit → marking as dev build"
currentBuild.description = "Dev Build"
}
}
}
}