Open strakh-alex opened 6 years ago
@strakh-alex Please excuse my late response. Could you please provide me a minimal example DSL so that I'm able to reproduce it? Thanks, Michael
Hi @mrueegg. It looks like this: triggers { afterSuccessfulBuildPlan() { description 'After Successful Build Plan' /if(env.name == 'DEV' || env.name == 'SIU') { customPlanBranchName 'develop' }/ } }
If I uncomment condition - the issue will appear. With comments all works.
afterSuccessfulBuildPlan() works for me only on the main branch of the Build Plan.
This works, sets the branch to default branch. Master, in my case.
environment(name: 'PRODUCTION', id: 1) {
description 'PRODUCTION-RELEASE'
triggers {
afterSuccessfulBuildPlan() {
description 'Master Plan Branch Trigger'
//no branch definition
}
}
}
Custom plan branch does not work, I tried using the plan branch key generated by Bamboo instead of the branch name as well.
environment(name: 'PRODUCTION', id: 1) {
description 'PRODUCTION-RELEASE'
triggers {
afterSuccessfulBuildPlan() {
description 'Develop Plan Branch Trigger'
customPlanBranchName 'develop'
}
}
}
I am trying to create deployment trigger via DSL which triggers on afterSuccessfulBuildPlan() event. If I specify customPlanBranchName (develop) option I receive next error: Plan DSL: task failed: Plan with key 'SPR-SPRAT0' not found If I don't specify this option - plan is successfully creating. Also I notified next strings in logs: Plan DSL: plan branch mapping SPR-SPRAT-develop = SPR-SPRAT0 Plan DSL: plan branch mapping SPR-SPRAT-master = SPR-SPRAT2 My project has name SPR-SPRAT. Where did these numbers come from?