Custom script conditions can only be created by users with the global administrator permission, and the same permission is required to update the script that they run.
To add a custom script condition, follow these steps:
Add your Inline Script.
If the script returns
true, or a truthy value, the subsequent tasks are executed. If not, they are skipped.
You can write the script directly in the Script tab, or you can use the File tab to upload a script.
Enter how many tasks you want to run if the condition is true in How Many Tasks.
Save the task.
As mentioned earlier, the code for all condition tasks runs on the server before any task in the job is executed. This is because you have access to the full Bamboo API, rather than just a subset as on a remote agent. Also, most things that you would want to check can be done when a job is first scheduled rather than during execution.