Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Next challenges

Recent achievements

  • Global
  • Personal

Recognition

  • Give kudos
  • Received
  • Given

Leaderboard

  • Global

Trophy case

Kudos (beta program)

Kudos logo

You've been invited into the Kudos (beta program) private group. Chat with others in the program, or give feedback to Atlassian.

View group

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Automate the creation of Bamboo plan, jobs, stages, tasks and run using Java

Hi,

As per one of our requirements, we need to automate the creation of Plan, jobs, stages etc and finally it should run just by executing the Java code. As a initial step, i followed this tutorial https://confluence.atlassian.com/bameap/tutorial-create-a-simple-plan-with-bamboo-specs-883185040.html and created a Java project. While executing, getting the below error message. Any help/suggestions would be great.

 

ERROR: Unexpected response status: HTTP/1.1 400 Bad Request
[{"errors":["Could not parse yaml input: Cannot create property=description for JavaBean=com.atlassian.bamboo.specs.util.BambooSpecProperties@5ec72d3f\n in 'string', line 1, column 5:\n --- !!com.atlassian.bamboo.specs.api ... \n ^\nUnable to find property 'description' on class: com.atlassian.bamboo.specs.util.BambooSpecProperties\n in 'string', line 2, column 14:\n description: Plan created\n ^\n"],"fieldErrors":{}}]
Exception in thread "main" java.lang.RuntimeException: org.apache.http.client.ClientProtocolException: Unexpected response status: HTTP/1.1 400 Bad Request
[{"errors":["Could not parse yaml input: Cannot create property=description for JavaBean=com.atlassian.bamboo.specs.util.BambooSpecProperties@5ec72d3f\n in 'string', line 1, column 5:\n --- !!com.atlassian.bamboo.specs.api ... \n ^\nUnable to find property 'description' on class: com.atlassian.bamboo.specs.util.BambooSpecProperties\n in 'string', line 2, column 14:\n description: Plan created\n ^\n"],"fieldErrors":{}}]
at com.atlassian.bamboo.specs.util.RestTaskResult.<init>(RestTaskResult.java:18)
at com.atlassian.bamboo.specs.util.SendQueue$1.run(SendQueue.java:40)
Caused by: org.apache.http.client.ClientProtocolException: Unexpected response status: HTTP/1.1 400 Bad Request
[{"errors":["Could not parse yaml input: Cannot create property=description for JavaBean=com.atlassian.bamboo.specs.util.BambooSpecProperties@5ec72d3f\n in 'string', line 1, column 5:\n --- !!com.atlassian.bamboo.specs.api ... \n ^\nUnable to find property 'description' on class: com.atlassian.bamboo.specs.util.BambooSpecProperties\n in 'string', line 2, column 14:\n description: Plan created\n ^\n"],"fieldErrors":{}}]
at com.atlassian.bamboo.specs.util.RestHelper.lambda$sendRequest$0(RestHelper.java:77)
at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:222)
at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:164)
at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:139)
at com.atlassian.bamboo.specs.util.RestHelper.sendRequest(RestHelper.java:80)
at com.atlassian.bamboo.specs.util.RestHelper.post(RestHelper.java:110)
at com.atlassian.bamboo.specs.util.SendQueue$1.run(SendQueue.java:30)

1 answer

Hi,

are you using same version of Bamboo Specs as your Bamboo server has?

 

John

Hi,

Thank you for looking into this. 

Able to resolve it yesterday after using the proper version.

Hi John,

As I mentioned earlier, I am working on the requirement to automate the creation of Plan, jobs, tasks etc. I can able to do it as per the example given in the doc.

But my actual intention is once the build is triggered by Java code, it should do the following

1) check out the project source code from GIT

2) compile, run test cases and build using Maven

3) Containerize the project using Docker

4) Deploy the project on Kubernetes and parallely do the source code analysis using SonarQube

Is it possible to achieve the above steps by automation using Java? Please provide some insights and suggestions on how to achieve this?

 

Regards,

Praveen DK 

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Published in Bamboo

Bamboo 7.1 is here and is packed with value!

I'm happy to announce that Bamboo 7.1 has been released and it’s overflowing with awesome new features. Top-voted issues First and foremost, a bunch of JAC top voted issues has been delivered - y...

696 views 1 6
Read article

Community Events

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

Find an event

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

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you