Hello. I followed tutorial https://confluence.atlassian.com/bamboo/tutorial-create-a-simple-plan-with-bamboo-specs-894743911.html Trying to test locally on my server. I use Test license for plugin developers.
How to create a bamboo plan from java code with bamboo specs.
private Plan createPlan() {
return new Plan(
project(),
"Plan Name", "PLANKEY")
.description("Plan created from (enter repository url of your plan)")
.stages(
new Stage("Stage 1")
.jobs(new Job("Build & run", "RUN")
.tasks(
new ScriptTask().inlineBody("echo Hello world!"))));
}Plan plan = new PlanSpec().createPlan();
bambooServer.publish(plan);
After executing project I observed error:
Caused by: com.atlassian.bamboo.specs.exceptions.BambooSpecsRestRequestException: null for uri: http://local:6990/bamboo/rest/api/latest/import/plan
2018-01-09 16:30:38,583 DEBUG [FileUserPasswordCredentials] Looking for credentials file: /testingPlatformIntergrationTest/bamboo-specs/.credentials
2018-01-09 16:30:38,587 DEBUG [FileUserPasswordCredentials] Credentials file found: testingPlatformIntergrationTest/bamboo-specs/.credentials
2018-01-09 16:30:38,629 INFO [BambooServer] Publishing plan PRJ-PLANKEY
2018-01-09 16:30:39,227 INFO [BambooServer] An error occurred while publishing plan PRJ-PLANKEY: null for uri: http://local:6990/bamboo/rest/api/latest/import/plan
2018-01-09 16:30:39,227 DEBUG [BambooServer] {"message":"null for uri: http://local:6990/bamboo/rest/api/latest/import/plan","status-code":404}
It looks like method "import" not available in REST API.
Expected results: from that tutorial new created plan in bamboo
Please, can somebody check it? Thanks in advance.
Best regards,
Eugene