Added stop-task script to stop ECS service tasks
This MR adds a stop_task
function to the ecs
script. This will be linked to the stop
review environment action, made available in this other MR.
When redeploying to ECS, this MR also checks that at least one task is made available in the targeted service before updating the related task definition.
Relates to gitlab#218167 (closed)
Manual testing
Targeted service for review app has no task running:
Some code changes:
Pipeline running then: https://gitlab.com/ebaque/rails-minimal/-/pipelines/205045303
Deployment successful, new task started, new version of task definition:
Deployed app:
Stopping environment: https://gitlab.com/ebaque/rails-minimal/-/pipelines/205045303
Task has stopped:
Deployed app is unavailable:
Edited by Etienne Baqué