Issue with automating ANT build via bamboo cli

Sudeshna Das January 5, 2019

I am trying to automate the ant build procedure via bamboo cli but i am facing an issue.
I am firing the below command:

[ec2-user@ip-172-31-34-157 atlassian-cli-8.1.0]$ sudo ./bamboo.sh --action addTask --plan MCP-MPP --job "Ant Job" --description Ant-Build --taskKey ANT --field1 label --value1 ANT --field2 buildFile --value2 build.xml --field3 target --value3 "war" --field4 buildJdk --value4 "JDK 1.8.0_191"

JDK and ANT has already been included in the capability section along with the path.

Below is the error that i am getting:

URL requested: http://ec2-35-168-11-39.compute-1.amazonaws.com:8085/rest/api/latest/plan/MCP-MPP-ANT JOB
Request type: GET
Content type: application/json; charset=utf-8
Accept content type: application/json
Response code: 400, message: null, url: http://ec2-35-168-11-39.compute-1.amazonaws.com:8085/rest/api/latest/plan/MCP-MPP-ANT JOB
json: {}
json: {}
json: {}
Problem determination - response: 400: null
Problem determination - response url: http://ec2-35-168-11-39.compute-1.amazonaws.com:8085/rest/api/latest/plan/MCP-MPP-ANT JOB
Problem determination - request url: http://ec2-35-168-11-39.compute-1.amazonaws.com:8085/rest/api/latest/plan/MCP-MPP-ANT JOB

Remote error: Invalid request. Response code: 400. Use -v to see more details.
org.swift.common.cli.CliClient$RemoteInvalidRequestException: Invalid request. Response code: 400. Use -v to see more details.
at org.swift.common.cli.helpers.DefaultRequestHelper.handleBadResponseCode(DefaultRequestHelper.java:1260)
at org.swift.common.cli.helpers.DefaultRequestHelper.makeRequestWithUrlConnection(DefaultRequestHelper.java:940)
at org.swift.common.cli.helpers.DefaultRequestHelper.makeUrlRequest(DefaultRequestHelper.java:725)
at org.swift.common.cli.helpers.DefaultRequestHelper.makeRequest(DefaultRequestHelper.java:685)
at org.swift.common.cli.helpers.DefaultRequestHelper.makeStandardRequest(DefaultRequestHelper.java:673)
at org.swift.bamboo.cli.helpers.PlanHelper.verifyJob(PlanHelper.java:1843)
at org.swift.bamboo.cli.helpers.TaskHelper.addOrUpdateTask(TaskHelper.java:272)
at org.swift.bamboo.cli.BambooClient.handleRequest(BambooClient.java:1150)
at org.swift.common.cli.DefaultRemoteClient.process(DefaultRemoteClient.java:748)
at org.swift.common.cli.CliClient.doWork(CliClient.java:689)
at org.swift.common.cli.CliClient.doWork(CliClient.java:646)
at org.swift.bamboo.cli.BambooClient.main(BambooClient.java:451)
This function requires a non-blank value for parameter server.

Please help me in resolving this issue.

1 answer

0 votes
Deleted user January 9, 2019

Hi @Sudeshna Das,

 

Can you please run the below command and check if you are able to get the server info using the CLI.

 

 --debug --action getServerInfo

 

We noticed that you are getting 404 error we would like to check if you are able to access the server first in order to perform some actions on it using CLI.

We have also raised a request SUPPORT-1826 on your behalf in our support portal. Please signup to our customer portal through this link so that we will be able to share the request with you.

 

Regards,

Vijay Ramamurthy

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events