We have a build plan (configured by bamboo yml file) that copies files to AWS S3. If a branch build runs it creates these files but we'd like to remove them when the branch is deleted.
We previously used gitlab and it had this ability but I haven't been able to find any hook or trigger in bamboo that would run a job/task just before the branch plan is deleted. Any ideas on how to do it?
Hello @Ben D_Herville
Bamboo will not trigger any actions once a Plan branch is deleted. Instead, it will disable the Plan branch immediately and queue a branch deletion according to the Plan configuration.
Data that is generated outside of Bamboo premises such as files on S3 buckets will not be touched by Bamboo.
We recommend you set an external script that will run the cleanup on your buckets on a daily basis (or even more/less often depending on your requirement). That script can be run as a different Plan from Bamboo based on a scheduled trigger or even outside of Bamboo scope as a cron job.
Atlassian Support APAC
--please don't forget to Accept the answer if the reply is helpful--