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

Creating a Bamboo build plan using the Rest API

Hi!

I see that task BAM-4854 was solved by release 6.0.0. But I couldn't find any new information about plan creation in the REST API documentation.

When can we start using this feature?

2 answers

0 votes

It's possible to create plan by Bamboo Specs, which uses REST endpoint, that's why that issue was closed. Please look at Bamboo Specs documentation https://confluence.atlassian.com/bamboo/bamboo-specs-894743906.html

Unfortunately this solution does not work in windows.  When I ran

mvn -Ppublish-specs

I got this error:

[ERROR] Failed to execute goal com.atlassian.bamboo:bamboo-specs-runner:6.0.2:run (default-cli) on project bamboo-specs-tutorial: Execution default-cli of goal com.atlassian.bamboo:bamboo-specs-runner:6.0.2:run failed: A required class was missing while executing com.atlassian.bamboo:bamboo-specs-runner:6.0.2:run: tutorial\PlanSpec (wrong name: tutorial/PlanSpec)

I tried mvn versions 3.2 and 3.5

can you share your repo if it doesn't have any secrets on Bitbucket/Github? Looks like some issue in folders layout

There are no secrets :) Its just "get started" tutorial. I reproduced the error on another PC with the same result

mvn archetype:generate -B ^
-DarchetypeGroupId=com.atlassian.bamboo -DarchetypeArtifactId=bamboo-specs-archetype ^
-DarchetypeVersion=6.0.2 ^
-DgroupId=com.atlassian.bamboo -DartifactId=bamboo-specs-tutorial -Dversion=1.0.0-SNAPSHOT ^
-Dpackage=tutorial -Dtemplate=minimal
cd bamboo-specs-tutorial
mvn -Ppublish-specs -X
[INFO] Scanning C:\java\proj\bamboo-specs-tutorial\target\classes for classes annotated with Bamboo plan annotation.
[DEBUG] Adding C:\java\proj\bamboo-specs-tutorial\target\classes\tutorial\PlanSpec.class to scan candidates
[DEBUG] Scanning tutorial\PlanSpec for BambooSpec annotation.
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 3.437 s
[INFO] Finished at: 2017-07-21T21:35:56+03:00
[INFO] Final Memory: 19M/272M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal com.atlassian.bamboo:bamboo-specs-runner:6.0.2:run (default-cli) on project bamboo-specs-tutorial: Execution default-cli of goal com.atlassian.bamboo:bamboo-specs-runner:6.0.2:run failed: A required class was missing while executing com.atlassian.bamboo:bamboo-specs-runner:6.0.2:run: tutorial\PlanSpec (wrong name: tutorial/PlanSpec)
[ERROR] -----------------------------------------------------
[ERROR] realm = plugin>com.atlassian.bamboo:bamboo-specs-runner:6.0.2
[ERROR] strategy = org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy

Apache Maven 3.5.0 (ff8f5e7444045639af65f6095c62210b5713f426; 2017-04-03T22:39:06+03:00)
Maven home: c:\java\maven\bin\..
Java version: 1.8.0_141, vendor: Oracle Corporation
Java home: c:\java\jdk1.8\jre
Default locale: en_US, platform encoding: Cp1251
OS name: "windows 10", version: "10.0", arch: "amd64", family: "windows"

 

When I run it from bash all is ok. The difference in trace from bash here:

[DEBUG] Scanning tutorial.PlanSpec for BambooSpec annotation.

tutorial.PlanSpec - linux 

tutorial\PlanSpec - win

Can this be a problem?

 

Until this is fixed, you will need to store your spec file in the default package.

0 votes

@smolkin, confirmed this issue and created bug https://jira.atlassian.com/browse/BAM-18584

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...

943 views 4 7
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