Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Bamboo specs plan branch

Alfons Ming
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
February 27, 2019

Dear,

I have some problems with bamboo specs.

I have this code for create a plan

 

.planBranchManagement(new PlanBranchManagement()
.createForPullRequest()
.delete(new BranchCleanup()
.whenRemovedFromRepositoryAfterDays(7)
.whenInactiveInRepositoryAfterDays(7))
.notificationLikeParentPlan()
.issueLinkingEnabled(false))

 

If I try to run this code the first time is ok and I cant create a branch when the properties "When pull is created" but when I try to run another time the code I receive this error:

 

0:45,677 INFO [BambooServer] An error occurred while publishing plan MP-MCM: Plan branch / workflow: You can't change the default repository because automatic branch management for this plan is dependent on pull requests. Update plan's branching configuration to enable switching the default repository.
2019-02-27 12:20:45,678 INFO [BambooServer] (for more information, enable more detailed logging with system property -Dbamboo.specs.log.level=DEBUG)
Exception in thread "main" com.atlassian.bamboo.specs.api.exceptions.BambooSpecsPublishingException: An error occurred while publishing plan MP-MCM: Plan branch / workflow: You can't change the default repository because automatic branch management for this plan is dependent on pull requests. Update plan's branching configuration to enable switching the default repository.
at com.atlassian.bamboo.specs.util.BambooServer.translateRestException(BambooServer.java:178)
at com.atlassian.bamboo.specs.util.BambooServer.translateException(BambooServer.java:148)
at com.atlassian.bamboo.specs.util.BambooServer.publish(BambooServer.java:101)
at MediacoachPlatformSpecs.BuildPlansRunner.main(BuildPlansRunner.java:55)

 

I've found this topic with the same problem: https://jira.atlassian.com/browse/BAM-18952 but the solution is not the best way because you have to delete the repository every time you want to run the code ...

 

0 answers

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events