- Disable the agent, wait for the agent to complete the current job
- Cleanup
- Enable the agent
Install Bamboo Agent Read APIs plugin
Go to bamboo admin screen => Rest API browser and type agent, uncheck show only public API's
{
"name": "Test Token",
"read": true,
"change": false
}
Store the tokens at the specific location on the bamboo agent. For example : /opt/data/bamboo-agents/token.uuid and update the script with the same
Update the script as necessary to match your requirements and setup a cron job to perform this operation.
Thanks to Edward A. Webb for the plugin