From 779db6f720d63310e10b0e1eff13c9c781c656f2 Mon Sep 17 00:00:00 2001 From: gitgit Date: Tue, 2 Aug 2022 08:56:09 +0000 Subject: [PATCH] =?UTF-8?q?feat:=20.devops/=E5=85=8B=E9=9A=86=E9=A1=B9?= =?UTF-8?q?=E7=9B=AE,=E8=8E=B7=E5=8F=96=E9=A1=B9=E7=9B=AE=E7=9A=84log,?= =?UTF-8?q?=E5=90=91=E4=BC=81=E4=B8=9A=E5=BE=AE=E4=BF=A1/=E9=92=89?= =?UTF-8?q?=E9=92=89=E5=8F=91=E9=80=81=E6=B6=88=E6=81=AF.yml?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../钉钉发送消息.yml | 59 +++++++++++++++++++ 1 file changed, 59 insertions(+) create mode 100644 .devops/克隆项目,获取项目的log,向企业微信/钉钉发送消息.yml diff --git a/.devops/克隆项目,获取项目的log,向企业微信/钉钉发送消息.yml b/.devops/克隆项目,获取项目的log,向企业微信/钉钉发送消息.yml new file mode 100644 index 0000000..360e830 --- /dev/null +++ b/.devops/克隆项目,获取项目的log,向企业微信/钉钉发送消息.yml @@ -0,0 +1,59 @@ +name: 克隆项目,获取项目的log,向企业微信/钉钉发送消息 +description: |- + 1. 第一步:克隆项目,指定commit id + 2. 第二步:获取克隆项目的指定次数的commit log + 3. 第三步:同时向钉钉/企业微信发送git_log +global: + concurrent: false +workflow: + - ref: start + name: 开始 + task: start + - ref: git_clone_0 + name: git clone + task: git_clone@1.2.4 + input: + username: ((testgitea.user)) + password: ((testgitea.pwd)) + remote_url: '"https://testgitea2.trustie.net/gitgit/testdevops.git"' + ref: '"refs/heads/master"' + commit_id: '"c3e9c6bb1e"' + needs: + - start + - ref: end + name: 结束 + task: end + needs: + - dingtalk_notice_action_card_0 + - qywx_notice_0 + - ref: git_log_0 + name: git log + task: git_log@1.0.2 + input: + git_path: git_clone_0.git_path + commit_num: 5 + needs: + - git_clone_0 + - ref: dingtalk_notice_action_card_0 + name: 钉钉通知-ActionCard + task: dingtalk_notice_action_card@1.0.2 + input: + boot_webhook_url: ((wecom.bot_webhook)) + msg_title: '"gitlog"' + msg_text: git_log_0.git_log + single_title: '""' + single_url: '""' + btns: '"[]"' + needs: + - git_log_0 + - ref: qywx_notice_0 + name: 企业微信通知 + task: qywx_notice@1.2.1-text + input: + bot_webhook_url: ((wechat.wechat_bot)) + text_content: JSON.stringify(git_log_0.git_log) + mentioned_list: '"[]"' + mentioned_mobile_list: '"[]"' + needs: + - git_log_0 +