Compare commits
No commits in common. "v1" and "main" have entirely different histories.
2 changed files with 4 additions and 9 deletions
9
Jenkinsfile
vendored
9
Jenkinsfile
vendored
|
|
@ -22,13 +22,8 @@ pipeline {
|
|||
|
||||
sh 'git submodule update --init --recursive'
|
||||
|
||||
def branch = sh(
|
||||
script: "git branch --show-current",
|
||||
returnStdout: true
|
||||
).trim()
|
||||
|
||||
if(branch != 'main') {
|
||||
echo "[!] Not on 'main' branch. Current branch: ${branch}"
|
||||
if (env.BRANCH_NAME !== 'main') {
|
||||
echo "[!] Not on main branch. Stopping pipeline."
|
||||
currentBuild.result = 'SUCCESS'
|
||||
error("Stopping pipeline: not on main branch.")
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue