/clear-bamboo-buildartifacts

Script to delete build artifacts from bamboo agents periodically

Primary LanguageShell

Script to clear bamboo build artifacts

  • Disable the agent, wait for the agent to complete the current job
  • Cleanup
  • Enable the agent

Go to bamboo admin screen => Rest API browser and type agent, uncheck show only public API's

API Browser

Create a new token

API Browser

{
    "name": "Test Token",
    "read": true,
    "change": false
}

View available tokens

API Browser

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.

References

Thanks to Edward A. Webb for the plugin