I’m sorry if this has been asked before
We have the following usecase, whenever we deploy a repository, we deploy to 1 or more different ECS Fargate services, depending on the repository usecase. I created the following workflow:
Build - Build docker image and push to ECR.
Deploy Service 1 - Update Service 1 task definition with new image url and update Service 1 ECS service.
Deploy Service 2 - Update Service 2 task definition with new image url and update Service 2 ECS service.
Reasoning for seperating it to different jobs is only building and pushing to ECR ones and running each “Deploy Service” job in parallel.
I would like to send a notification to Slack based on the workflow status. I can’t seem to find a way to do it on the workflow level, but only on a job level which means I need another job (“notify slack”) with the following argument:
needs: [build, deploy-service-1, deploy-service-2, ..., deploy-service-x]
This means it will only run when all other jobs have ended but I would like to avoid having to update this job based on the number of “Deploy Service” jobs I have for each repository.
Are there other ways to achieve this? Thank you for any suggestions.