Skip to content

Commit efafe89

Browse files
authored
Merge pull request #350 from axonivy/manualDeploy
fix: only do releases on user triggered pipelines
2 parents a7fe6be + 05bf004 commit efafe89

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

build/release/Jenkinsfile

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ pipeline {
1414
stages {
1515
stage('build') {
1616
when {
17-
expression { isReleaseBranch() }
17+
expression { isReleaseBranch() && isManualRun() }
1818
}
1919
steps {
2020
script {
@@ -54,6 +54,10 @@ def isReleaseBranch() {
5454
return env.BRANCH_NAME.startsWith('release/')
5555
}
5656

57+
def isManualRun() {
58+
return currentBuild.buildCauses.toString().contains('UserIdCause');
59+
}
60+
5761
def setupGPGEnvironment() {
5862
withCredentials([file(credentialsId: 'gpg.keystore', variable: 'GPG_FILE')]) {
5963
sh "gpg --batch --import ${env.GPG_FILE}"

0 commit comments

Comments
 (0)