Compare commits
No commits in common. "v2" and "main" have entirely different histories.
2 changed files with 4 additions and 9 deletions
11
Jenkinsfile
vendored
11
Jenkinsfile
vendored
|
|
@ -22,16 +22,11 @@ pipeline {
|
||||||
|
|
||||||
sh 'git submodule update --init --recursive'
|
sh 'git submodule update --init --recursive'
|
||||||
|
|
||||||
def branch = sh(
|
if (env.BRANCH_NAME !== 'main') {
|
||||||
script: 'git branch --show-current 2>/dev/null || echo "DETACHED"',
|
echo "[!] Not on main branch. Stopping pipeline."
|
||||||
returnStdout: true
|
|
||||||
).trim()
|
|
||||||
|
|
||||||
if(branch != 'main') {
|
|
||||||
echo "[!] Not on 'main' branch. Current branch: ${branch}"
|
|
||||||
currentBuild.result = 'SUCCESS'
|
currentBuild.result = 'SUCCESS'
|
||||||
error("Stopping pipeline: not on main branch.")
|
error("Stopping pipeline: not on main branch.")
|
||||||
}
|
}
|
||||||
|
|
||||||
def tagName = sh(
|
def tagName = sh(
|
||||||
script: "git describe --tags --exact-match 2>/dev/null || echo 'no-tag'",
|
script: "git describe --tags --exact-match 2>/dev/null || echo 'no-tag'",
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,3 @@
|
||||||
# dotnet.worker
|
# dotnet.worker
|
||||||
|
|
||||||
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue