From 5dcb7a5259a9a788f6e37a63afb2280711666435 Mon Sep 17 00:00:00 2001 From: YuanHuakk <1751826683@qq.com> Date: Fri, 8 Mar 2024 19:13:24 +0800 Subject: [PATCH] ci(custom): --- .drone.yml | 64 ++++++++++++++++++++++++++++ .idea/.gitignore | 5 --- .idea/codeStyles/codeStyleConfig.xml | 5 --- .idea/git_toolbox_prj.xml | 15 ------- .idea/jsLibraryMappings.xml | 6 --- .idea/jsLinters/eslint.xml | 6 --- .idea/modules.xml | 8 ---- .idea/taroApp.iml | 12 ------ .idea/vcs.xml | 6 --- .idea/watcherTasks.xml | 4 -- 10 files changed, 64 insertions(+), 67 deletions(-) create mode 100644 .drone.yml delete mode 100644 .idea/.gitignore delete mode 100644 .idea/codeStyles/codeStyleConfig.xml delete mode 100644 .idea/git_toolbox_prj.xml delete mode 100644 .idea/jsLibraryMappings.xml delete mode 100644 .idea/jsLinters/eslint.xml delete mode 100644 .idea/modules.xml delete mode 100644 .idea/taroApp.iml delete mode 100644 .idea/vcs.xml delete mode 100644 .idea/watcherTasks.xml diff --git a/.drone.yml b/.drone.yml new file mode 100644 index 0000000..69c9cae --- /dev/null +++ b/.drone.yml @@ -0,0 +1,64 @@ +kind: pipeline +type: docker +name: default + +platform: + os: linux + arch: amd64 + +steps: + - name: 测试服-依赖安装&&编译打包&&上传微信小程序平台 + pull: if-not-exists + image: node:20-alpine + when: + branch: + - test + commands: + - npm config set registry https://registry.npmmirror.com/ + - npm install -g pnpm + - pnpm install + - pnpm build:weapp:test:upload + - rm -rf dist.tar + - rm -rf node_modules + + - name: 正式服-依赖安装&&编译打包&&上传微信小程序平台 + pull: if-not-exists + image: node:20-alpine + when: + branch: + - master + commands: + - npm config set registry https://registry.npmmirror.com/ + - npm install -g pnpm + - pnpm install + - pnpm build:weapp:prod:upload + - rm -rf dist.tar + - rm -rf node_modules + + - name: 企业微信通知 + pull: if-not-exists + image: plugins/webhook + when: + branch: + - test + - master + status: + - success + - failure + settings: + urls: https://qyapi.weixin.qq.com/cgi-bin/webhook/send?key=a2065e21-4f92-4f5b-a432-2c0cd1d965b5 + content_type: application/json + template: | + { + "msgtype": "markdown", + "markdown": { + "content": "{{#success build.status}}✅{{else}}❌{{/success}}**{{ repo.owner }}/{{ repo.name }}** (Build #{{build.number}})\n + >**构建结果**: {{ build.status }} + >**构建详情**: [点击查看]({{ build.link }}) + >**代码分支**: {{ build.branch }} + >**提交标识**: {{ build.commit }} + >**提交发起**: {{ build.author }} + >**提交信息**: {{ build.message }} + " + } + } diff --git a/.idea/.gitignore b/.idea/.gitignore deleted file mode 100644 index 10b731c..0000000 --- a/.idea/.gitignore +++ /dev/null @@ -1,5 +0,0 @@ -# 默认忽略的文件 -/shelf/ -/workspace.xml -# 基于编辑器的 HTTP 客户端请求 -/httpRequests/ diff --git a/.idea/codeStyles/codeStyleConfig.xml b/.idea/codeStyles/codeStyleConfig.xml deleted file mode 100644 index a55e7a1..0000000 --- a/.idea/codeStyles/codeStyleConfig.xml +++ /dev/null @@ -1,5 +0,0 @@ - - - - \ No newline at end of file diff --git a/.idea/git_toolbox_prj.xml b/.idea/git_toolbox_prj.xml deleted file mode 100644 index 02b915b..0000000 --- a/.idea/git_toolbox_prj.xml +++ /dev/null @@ -1,15 +0,0 @@ - - - - - - - \ No newline at end of file diff --git a/.idea/jsLibraryMappings.xml b/.idea/jsLibraryMappings.xml deleted file mode 100644 index d23208f..0000000 --- a/.idea/jsLibraryMappings.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/.idea/jsLinters/eslint.xml b/.idea/jsLinters/eslint.xml deleted file mode 100644 index 2ece342..0000000 --- a/.idea/jsLinters/eslint.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/.idea/modules.xml b/.idea/modules.xml deleted file mode 100644 index 1d1e2fc..0000000 --- a/.idea/modules.xml +++ /dev/null @@ -1,8 +0,0 @@ - - - - - - - - \ No newline at end of file diff --git a/.idea/taroApp.iml b/.idea/taroApp.iml deleted file mode 100644 index 24643cc..0000000 --- a/.idea/taroApp.iml +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - - - - - - - \ No newline at end of file diff --git a/.idea/vcs.xml b/.idea/vcs.xml deleted file mode 100644 index 35eb1dd..0000000 --- a/.idea/vcs.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/.idea/watcherTasks.xml b/.idea/watcherTasks.xml deleted file mode 100644 index fb0d65a..0000000 --- a/.idea/watcherTasks.xml +++ /dev/null @@ -1,4 +0,0 @@ - - - - \ No newline at end of file