0

我正在尝试将 slack 与 circle ci 集成仅用于特定工作并遵循以下文档:https ://circleci.com/orbs/registry/orb/circleci/slack 。每次运行该作业时,我都会收到此错误步骤类型“slack/status”不是有效类型。任何帮助/反馈表示赞赏,这是我到目前为止所做的:

   version: 2
   orbs:
     slack: circleci/slack@3.4.2
   
  jobs:

    slack_notification:
      docker:
        - image: circleci/node
      steps:
        - run: exit 0
        - slack/status:
            fail_only: false
            channel: {Channel ID}
            failure_message: ':red_circle: A $CIRCLE_JOB job has failed!'
            success_message: ':tada: A $CIRCLE_JOB job has succeeded!'
            include_project_field: true
            include_job_number_field: true
            url: 'https://circleci.com/workflow-run/${CIRCLE_WORKFLOW_ID}' 
            webhook: {webhook}

   workflows:
     version: 2
     jobs:
       - job_1:
         { Job steps}

       - slack_notification:
           requires:
             - {job_1}
           filters:
             branches:
              only:
                - {branch}
4

1 回答 1

0

使用版本:2.1 代替工作流版本 2 很好

于 2020-09-10T10:49:17.503 回答