From e03533902fdc9ba9152dab0f4ce61413308f79d7 Mon Sep 17 00:00:00 2001 From: mahboobeh-binary Date: Mon, 29 Jun 2020 16:55:33 +0800 Subject: [PATCH] format slack message --- .circleci/config.yml | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index b36bd9f6d..751b96cfe 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -1,6 +1,7 @@ version: 2.1 orbs: k8s: circleci/kubernetes@0.7.0 + slack: circleci/slack@3.4.2 commands: git_checkout_from_cache: description: "Git checkout and save cache" @@ -133,15 +134,12 @@ commands: done notify_slack: description: "Notify slack" - parameters: - target: - type: string steps: - slack/status: include_project_field: false - failure_message: "<< parameters.target >> release failed for webtrader with version ``$(cat www/version)``" - success_message: "<< parameters.target >> release succeeded for webtrader with version $(cat www/version)" - webhook: ${SLACK_WEBHOOK} + failure_message: "Release failed for webtrader with version *$(cat dist/compressed/version)*" + success_message: "Release succeeded for webtrader with version *$(cat dist/compressed/version)*" + webhook: ${SLACK_WEBHOOK} jobs: release_staging: docker: @@ -152,8 +150,7 @@ jobs: - build - deploy: target_branch: "staging" - - notify_slack: - target: "Staging" + - notify_slack release_production: docker: - image: circleci/node:12.13.0-stretch @@ -163,9 +160,8 @@ jobs: - build - deploy: target_branch: "production" - - notify_slack: - target: "Production" - release_aws_production: + - notify_slack + release_aws_production: docker: - image: circleci/node:12.13.0-stretch steps: