version: 2.1
orbs:
aws-ecr: circleci/aws-ecr@6.15.2
aws-ecs: circleci/aws-ecs@1.4.0
jobs:
build_push_deploy_notify:
docker:
- image: circleci/node
steps:
- checkout
- aws-ecr/build-and-push-image:
repo: "${AWS_RESOURCE_NAME_PREFIX}"
tag: "$(git rev-parse --short HEAD)"
- aws-ecs/deploy-service-update:
requires:
- aws-ecr/build-and-push-image # only run this job once aws-ecr/build-and-push-image has completed
family: "test-cluster-td"
cluster-name: "test-cluster"
container-image-name-updates: "container=test-container,image-and-tag=${AWS_ECR_ACCOUNT_URL}/${AWS_RESOURCE_NAME_PREFIX}:$(echo $CIRCLE_SHA1 | cut -c -7)"
force-new-deployment: true
verify-revision-is-deployed: true
max-poll-attempts: 6
- run:
name: Send Failed Slack Notifications
command: curl -X POST -H 'Content-type:application/json' --data '{"text":"Enter success message"}' https://hooks.slack.com/services/*/*
when: on_fail
- run:
name: Send Success Slack Notifications
command: curl -X POST -H 'Content-type:application/json' --data '{"text":"Enter fail message"}' https://hooks.slack.com/services/*/*
when: on_success
workflows:
ecr-ecs-ci-cd:
jobs:
- build_push_deploy_notify
So i have the above circle config file but the linter wont let me save it.
I want to send slack messages on failure and success.
There’s no official support to it so i want if there’s any workaround.
Here is the error that pops up: