Search code examples
triggerspipelinegit-branchartifactbamboo-specs

Error in Bamboo Specs while triggering build plan for master branch


Default branch in Bamboo spec is master for the repository. At the time of Auto deployment trigger, Bamboo specs deploying master branch only, but sometimes even if default branch is updated to feature branch, I want to trigger master only.

I am able to set any feature branch other than master.

But I am not able to set master branch explicitly in Pipeline.java file.

It gives Bamboo Specs error stating "Scheduled trigger: Can't find triggering branch 'master'"


Solution

  • I know it's late now. but lately I realized that I didn't post the answer which figured out by myself. Conclusion is: you can not set default branch as planned branch in any of the property of pipeline.java. Since by default it consider default branch of bamboo repository as planned branch for bamboo pipeline. And if you want to set some different branch in bamboo pipeline.java file, you can do it by newDeploymentTrigger().setArtifactBranch("<planned_branch_name>")