More of a feature request, apologies if not the right place to post.
We're migrating from Jenkins to drone and it's great, but in regards to publishing to ECS it would be good if could be a bit more dynamic. We use cloud formation to bring up all our services so the ECS service, definition and task names are all dynamic along with the environment variables we inject for things like database IP addresses etc. Currently we have a script in jenkins that pulls down the current service definition as a template and replaces the values for the image to be used. This way we don't need to hard code any of the environment variables into jenkins that could change through cloud formation.
Also it takes the environment (eg production) and finds the appropriate cluster / service first rather than needing to hard code those names too, which may change. eg an api cluster might be called production-api-JH67JGSJK, with a random value appended to the base name production-api through the cloud formation process and a db cluster might be production-db-HGDTY13TH.
It's just a simple bash script using the aws cli, first we pull down all the services and grep on the environment, then on the service ie db or api. This way we can then drill in to the service and find the latest task def for say production-api for a cloud formation built service
So I was wondering if this sort of functionality could be considered to be added. Rather than specifying a fixed service name or family, could it be derived from a substring. Then pull the existing definition and merge any new settings like cpu, mem, env vars, image name etc if they are specified in the yml otherwise use the existing tasks settings. So you only need to specify in the drone.yml what has changed.
I've attached an example bash script, this script is for a cluster with a base name of ServicesCluster which contains a service with a base name that contains the word 'Dashboard'. The service only has one task so it derives the current task from that, but it could easily handle finding a specific task in the service as well if you passed in a base name for the task.
Thanks in advance for any consideration and review
Cheers
Paul
jenkins_build.txt