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

Need to add script task through api

Akshara Prasad
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
June 20, 2019

Can anyone help me with the api (post )for adding task (Script task) to deployment plan 

I am trying to add it through bash script and also through java 

Any leads will be helpful

1 answer

0 votes
Daniel Santos
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
June 21, 2019

Hi @Akshara Prasad,

I wish it was that simple and I could just provide you with a REST API endpoint for this.

Bamboo provides a way to add and remove tasks from deployments but only if your deployment is configured through specs. There is know public REST API endpoint only to add tasks.

If you don't know specs, I suggest you start with this document:

And run some tests with:


In Java specs the code part to create a script task in a deployment environment would be something like:

.environments(new Environment("MyEnvironment")
.tasks(new ScriptTask()
.description("My script task")
.inlineBody("echo \"Hello World\"")));

I hope that helps.

Akshara Prasad
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
June 22, 2019

Thanks Daniel..will try with this

Like Daniel Santos likes this
Daniel Santos
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
June 24, 2019

You are welcome! =]

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events