I’d like to propose an update the events listened on, adding the ‘closed’ event for github issues (Github lists PRs as issues).
After talking with Jacob McCann, he thought it would be a good idea for me to raise the question here. I would like to know firstly if the drone maintainers would find it useful. And secondly I’d like to explain why its valuable to me.
Currently I am maintaining a server that does ephemeral builds on Kubernetes for a pull request. This has a multitude of benefits including, but not limited to: being able to test code in an integrated environment prior to merge, per-performance tests, cpu profiling of PRs, automated functional tests being run, etc. I would like to remove the dependency of hosting a server, and create a Drone plugin instead.
Right now Drone can facilitate everything I would need by providing the pull_request
and push
events. I can conveniently create and update an ‘ephemeral environment’. However, the problem is with cleaning up. If I’m unaware of the pull request closing, I’d be hard pressed to identify when to clean up the then stale environment. In this use case, I don’t believe a CRON-like set up would be sufficient.
Personally, I’m unaware of the effort it would take to implement this in Drone Core, but I would be delighted to hear your feedback, and if this is a viable option.
Thanks for taking the time to read over this!