From 3c98d9176fe677d53975ae40f59684a5299ea541 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=9B=A8=E4=BA=BA=E6=9C=A8?= Date: Thu, 13 Jan 2022 06:46:04 +0000 Subject: [PATCH 1/2] add default pipeline template yaml --- .workflow/BranchPipeline.yml | 55 ++++++++++++++++++++++++++++++++++++ .workflow/MasterPipeline.yml | 53 ++++++++++++++++++++++++++++++++++ .workflow/PRPipeline.yml | 38 +++++++++++++++++++++++++ 3 files changed, 146 insertions(+) create mode 100644 .workflow/BranchPipeline.yml create mode 100644 .workflow/MasterPipeline.yml create mode 100644 .workflow/PRPipeline.yml diff --git a/.workflow/BranchPipeline.yml b/.workflow/BranchPipeline.yml new file mode 100644 index 0000000..f5dc1ea --- /dev/null +++ b/.workflow/BranchPipeline.yml @@ -0,0 +1,55 @@ +version: '1.0' +name: branch-pipeline +displayName: BranchPipeline +stages: + - stage: + name: compile + displayName: 编译 + steps: + - step: build@nodejs + name: build_nodejs + displayName: Nodejs 构建 + # 支持8.16.2、10.17.0、12.16.1、14.16.0、15.12.0五个版本 + nodeVersion: 14.16.0 + # 构建命令:安装依赖 -> 清除上次打包产物残留 -> 执行构建 【请根据项目实际产出进行填写】 + commands: + - npm install && rm -rf ./dist && npm run build + # 非必填字段,开启后表示将构建产物暂存,但不会上传到制品库中,7天后自动清除 + artifacts: + # 构建产物名字,作为产物的唯一标识可向下传递,支持自定义,默认为BUILD_ARTIFACT。在下游可以通过${BUILD_ARTIFACT}方式引用来获取构建物地址 + - name: BUILD_ARTIFACT + # 构建产物获取路径,是指代码编译完毕之后构建物的所在路径 + path: + - ./dist + - step: publish@general_artifacts + name: publish_general_artifacts + displayName: 上传制品 + # 上游构建任务定义的产物名,默认BUILD_ARTIFACT + dependArtifact: BUILD_ARTIFACT + # 构建产物制品库,默认default,系统默认创建 + artifactRepository: default + # 上传到制品库时的制品命名,默认build + artifactName: output + dependsOn: build_nodejs + - stage: + name: release + displayName: 发布 + steps: + - step: publish@release_artifacts + name: publish_release_artifacts + displayName: '发布' + # 上游上传制品任务的产出 + dependArtifact: output + # 发行版制品库,默认release,系统默认创建 + artifactRepository: release + # 发布制品版本号 + version: '1.0.0.0' + # 是否开启版本号自增,默认开启 + autoIncrement: true +triggers: + push: + branches: + exclude: + - master + include: + - .* diff --git a/.workflow/MasterPipeline.yml b/.workflow/MasterPipeline.yml new file mode 100644 index 0000000..a062f2a --- /dev/null +++ b/.workflow/MasterPipeline.yml @@ -0,0 +1,53 @@ +version: '1.0' +name: master-pipeline +displayName: MasterPipeline +stages: + - stage: + name: compile + displayName: 编译 + steps: + - step: build@nodejs + name: build_nodejs + displayName: Nodejs 构建 + # 支持8.16.2、10.17.0、12.16.1、14.16.0、15.12.0五个版本 + nodeVersion: 14.16.0 + # 构建命令:安装依赖 -> 清除上次打包产物残留 -> 执行构建 【请根据项目实际产出进行填写】 + commands: + - npm install && rm -rf ./dist && npm run build + # 非必填字段,开启后表示将构建产物暂存,但不会上传到制品库中,7天后自动清除 + artifacts: + # 构建产物名字,作为产物的唯一标识可向下传递,支持自定义,默认为BUILD_ARTIFACT。在下游可以通过${BUILD_ARTIFACT}方式引用来获取构建物地址 + - name: BUILD_ARTIFACT + # 构建产物获取路径,是指代码编译完毕之后构建物的所在路径 + path: + - ./dist + - step: publish@general_artifacts + name: publish_general_artifacts + displayName: 上传制品 + # 上游构建任务定义的产物名,默认BUILD_ARTIFACT + dependArtifact: BUILD_ARTIFACT + # 构建产物制品库,默认default,系统默认创建 + artifactRepository: default + # 上传到制品库时的制品命名,默认build + artifactName: output + dependsOn: build_nodejs + - stage: + name: release + displayName: 发布 + steps: + - step: publish@release_artifacts + name: publish_release_artifacts + displayName: '发布' + # 上游上传制品任务的产出 + dependArtifact: output + # 发行版制品库,默认release,系统默认创建 + artifactRepository: release + # 发布制品版本号 + version: '1.0.0.0' + # 是否开启版本号自增,默认开启 + autoIncrement: true +triggers: + push: + branches: + include: + - master diff --git a/.workflow/PRPipeline.yml b/.workflow/PRPipeline.yml new file mode 100644 index 0000000..18d0e0d --- /dev/null +++ b/.workflow/PRPipeline.yml @@ -0,0 +1,38 @@ +version: '1.0' +name: pr-pipeline +displayName: PRPipeline +stages: + - stage: + name: compile + displayName: 编译 + steps: + - step: build@nodejs + name: build_nodejs + displayName: Nodejs 构建 + # 支持8.16.2、10.17.0、12.16.1、14.16.0、15.12.0五个版本 + nodeVersion: 14.16.0 + # 构建命令:安装依赖 -> 清除上次打包产物残留 -> 执行构建 【请根据项目实际产出进行填写】 + commands: + - npm install && rm -rf ./dist && npm run build + # 非必填字段,开启后表示将构建产物暂存,但不会上传到制品库中,7天后自动清除 + artifacts: + # 构建产物名字,作为产物的唯一标识可向下传递,支持自定义,默认为BUILD_ARTIFACT。在下游可以通过${BUILD_ARTIFACT}方式引用来获取构建物地址 + - name: BUILD_ARTIFACT + # 构建产物获取路径,是指代码编译完毕之后构建物的所在路径 + path: + - ./dist + - step: publish@general_artifacts + name: publish_general_artifacts + displayName: 上传制品 + # 上游构建任务定义的产物名,默认BUILD_ARTIFACT + dependArtifact: BUILD_ARTIFACT + # 构建产物制品库,默认default,系统默认创建 + artifactRepository: default + # 上传到制品库时的制品命名,默认build + artifactName: output + dependsOn: build_nodejs +triggers: + pr: + branches: + include: + - master -- Gitee From 667f959e4a2476fa4eb0b718ef725a36c568e82a Mon Sep 17 00:00:00 2001 From: yurenmu Date: Sun, 16 Jan 2022 11:49:08 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E5=B0=86=E8=AF=B4=E6=98=8E=E6=96=87?= =?UTF-8?q?=E6=A1=A3=E7=9A=84=E4=B8=AD=E6=96=87=E5=90=8D=E7=A7=B0=E4=BF=AE?= =?UTF-8?q?=E6=94=B9=E6=88=90=E8=8B=B1=E6=96=87=E5=90=8D=E7=A7=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../\350\257\264\346\230\216.md" => public/uploads/ReadMe.md | 0 .../app/modules/space/controller/ReadMe.md | 0 .../app/modules/task/controller/ReadMe.md | 0 3 files changed, 0 insertions(+), 0 deletions(-) rename "public/uploads/\350\257\264\346\230\216.md" => public/uploads/ReadMe.md (100%) rename "src/app/modules/space/controller/\350\257\264\346\230\216.md" => src/app/modules/space/controller/ReadMe.md (100%) rename "src/app/modules/task/controller/\350\257\264\346\230\216.md" => src/app/modules/task/controller/ReadMe.md (100%) diff --git "a/public/uploads/\350\257\264\346\230\216.md" b/public/uploads/ReadMe.md similarity index 100% rename from "public/uploads/\350\257\264\346\230\216.md" rename to public/uploads/ReadMe.md diff --git "a/src/app/modules/space/controller/\350\257\264\346\230\216.md" b/src/app/modules/space/controller/ReadMe.md similarity index 100% rename from "src/app/modules/space/controller/\350\257\264\346\230\216.md" rename to src/app/modules/space/controller/ReadMe.md diff --git "a/src/app/modules/task/controller/\350\257\264\346\230\216.md" b/src/app/modules/task/controller/ReadMe.md similarity index 100% rename from "src/app/modules/task/controller/\350\257\264\346\230\216.md" rename to src/app/modules/task/controller/ReadMe.md -- Gitee