How to replace a bamboo job with its spec equivalent?

1.4k views Asked by At

If you have an existing bamboo job configured through the bamboo browser UI and export that configuration through its corresponding Bamboo Java Specs to a java file how do you then setup the existing bamboo plan or create a new one to define all its build logic using that exported spec?

1

There are 1 answers

0
Oleksiy Chystoprudov On

When you export plan configuration to Java specs you need to create new repository at Bitbucket Server. Create bamboo-specs folder at root of that repo. Run command

mvn archetype:generate -B \
    -DarchetypeGroupId=com.atlassian.bamboo -DarchetypeArtifactId=bamboo-specs-archetype \
    -DarchetypeVersion=7.1.3 \
    -DgroupId=com.atlassian.bamboo -DartifactId=bamboo-specs -Dversion=1.0.0-SNAPSHOT \
    -Dpackage=tutorial -Dtemplate=minimal

Then replace generated Plan.java with code you've got for your plan from Bamboo UI. Commit all changes to repository and then follow steps at https://confluence.atlassian.com/bamboo/tutorial-create-a-simple-plan-with-bamboo-java-specs-894743911.html to configure repository at Bamboo side