This article explains how how to add Script inline script task in a Bamboo Job job using Bamboo Command Line Interface (CLI).
Instructions
Use the addTask action to create inline script task tasks in the Bamboo job. Refer Refer to the sample command below:
Code Block | ||
---|---|---|
| ||
--action addTask --plan DEMO-NEW --job "JOB1" --taskKey SCRIPT --description "Scripted Task " --field scriptLocation=INLINE --field scriptBody="exit -1" |
In the above action:
- --plan value value refers to a Bamboo plan key.
- --job value value refers to the Bamboo job key.
- --taskKey value refers to Bamboo task type.
- --description value refers to task description.
- --field parameter refers to specific script configuation.
- Additionally, --disable parameter can be used to disable the task and --final parameter to script task as a final task.
Info |
---|
It is recommended to test it this scenario in a non-production environment or run the action with with --simulate parameter parameter to verify the behavior before deploying. |