This commit is contained in:
Matias Pou 2026-01-06 16:13:25 -03:00
parent 970fd0cb11
commit 4227ca6965

11
Jenkinsfile vendored
View file

@ -22,11 +22,16 @@ pipeline {
sh 'git submodule update --init --recursive'
if (env.BRANCH_NAME !== 'main') {
echo "[!] Not on main branch. Stopping pipeline."
def branch = sh(
script: "git rev-parse --abbrev-ref HEAD",
returnStdout: true
).trim()
if(branch != 'main') {
echo "[!] Not on 'main' branch. Current branch: ${branch}"
currentBuild.result = 'SUCCESS'
error("Stopping pipeline: not on main branch.")
}
}
def tagName = sh(
script: "git describe --tags --exact-match 2>/dev/null || echo 'no-tag'",