Could not parse key 'null'

Hello, I am trying to create a Plan in Bamboo using specs but I everytime get the following error message:

 

[ERROR] Failed to execute goal com.atlassian.bamboo:bamboo-specs-runner:6.1.1:run (default-cli) on project bamboo-specs-tutorial: Execution default-cli of goal com.atlassian.bamboo:bamboo-specs-runner:6.1.1:run failed: java.lang.reflect.InvocationTargetException: An error occurred while publishing plan DEVOPS-TST: Could not parse key 'null' -> [Help 1]


 

and here the snippet of code:

 

public static void main(final String[] args) throws Exception {
BambooServer bambooServer = new BambooServer("https://bamboo.foo.com/bamboo");
Plan plan = new PlanSpec().createPlan();
bambooServer.publish(plan);
}

Project project() {
return new Project().key("DEVOPS");
}

Plan createPlan() {
return new Plan(
project(),
"TEST SPECS", "TST")
.description("Plan created from (enter repository url of your plan)");
}


Activating some TRACE logs I see the post that is

2017-10-23 11:44:34,425 INFO [BambooServer] Publishing plan DEVOPS-TST
2017-10-23 11:44:34,533 TRACE [RestHelper] Sending the following content to https://bamboo.foo.com/bamboo/rest/api/latest/import/plan via POST:
--- !!com.atlassian.bamboo.specs.util.BambooSpecProperties
rootEntity: !!com.atlassian.bamboo.specs.api.model.plan.PlanProperties
description: Plan created from (enter repository url of your plan)
enabled: true
key:
key: TST
name: TEST SPECS
oid: null
pluginConfigurations: []
dependenciesProperties:
childPlans: []
dependenciesConfigurationProperties:
blockingStrategy: NONE
enabledForBranches: true
requireAllStagesPassing: false
notifications: []
planBranchManagementProperties:
branchIntegrationProperties:
enabled: false
gatekeeper: false
integrationBranch: null
pushOn: false
createPlanBranch:
matchingPattern: null
trigger: MANUAL
deletePlanBranch:
removeDeletedFromRepository: false
removeDeletedFromRepositoryPeriod: !!java.time.Duration 'PT0S'
removeInactiveInRepository: false
removeInactiveInRepositoryPeriod: !!java.time.Duration 'PT0S'
issueLinkingEnabled: true
notificationStrategy: NONE
triggeringOption: INHERITED
project:
description: null
key:
key: DEVOPS
name: null
oid: null
repositories: []
repositoryStoredSpecsData: null
stages: []
triggers: []
variables: []
specModelVersion: 6.1.1 

 
Am I missing anything here?

0 answers

Suggest an answer

Log in or Join to answer
Community showcase
Renan Battaglin
Published May 18, 2017 in Bamboo

FAQ: How to Upgrade Bamboo Server

Bamboo 5.9 will no longer be supported after June 12, 2017. What does this mean? As part of our End of Life policy, Atlassian supports major versions for two years after the first major iteratio...

1,061 views 0 5
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you
Atlassian Team Tour

Join us on the Team Tour

We're bringing product updates and pro tips on teamwork to ten cities around the world.

Save your spot