From a6c1aca559f89d280e903f9deea25a217d718eac Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E6=96=87=E5=8D=9A?= <7677415+liwenbo1@user.noreply.gitee.com> Date: Thu, 22 Sep 2022 03:39:16 +0000 Subject: [PATCH 01/11] add default pipeline template yaml --- .workflow/branch-pipeline.yml | 53 +++++++++++++++++++++++++++++++++++ .workflow/master-pipeline.yml | 51 +++++++++++++++++++++++++++++++++ .workflow/pr-pipeline.yml | 40 ++++++++++++++++++++++++++ 3 files changed, 144 insertions(+) create mode 100644 .workflow/branch-pipeline.yml create mode 100644 .workflow/master-pipeline.yml create mode 100644 .workflow/pr-pipeline.yml diff --git a/.workflow/branch-pipeline.yml b/.workflow/branch-pipeline.yml new file mode 100644 index 0000000..9d2a292 --- /dev/null +++ b/.workflow/branch-pipeline.yml @@ -0,0 +1,53 @@ +version: '1.0' +name: branch-pipeline +displayName: BranchPipeline +stages: + - stage: + name: compile + displayName: 编译 + steps: + - step: build@maven + name: build_maven + displayName: Maven 构建 + # 支持6、7、8、9、10、11六个版本 + jdkVersion: 8 + # 支持2.2.1、3.2.5、3.3.9、3.5.2、3.5.3、3.5.4、3.6.1、3.6.3八个版本 + mavenVersion: 3.3.9 + # 构建命令 + commands: + - mvn -B clean package -Dmaven.test.skip=true + # 非必填字段,开启后表示将构建产物暂存,但不会上传到制品库中,7天后自动清除 + artifacts: + # 构建产物名字,作为产物的唯一标识可向下传递,支持自定义,默认为BUILD_ARTIFACT。在下游可以通过${BUILD_ARTIFACT}方式引用来获取构建物地址 + - name: BUILD_ARTIFACT + # 构建产物获取路径,是指代码编译完毕之后构建物的所在路径,如通常jar包在target目录下。当前目录为代码库根目录 + path: + - ./target + - step: publish@general_artifacts + name: publish_general_artifacts + displayName: 上传制品 + # 上游构建任务定义的产物名,默认BUILD_ARTIFACT + dependArtifact: BUILD_ARTIFACT + # 上传到制品库时的制品命名,默认output + artifactName: output + dependsOn: build_maven + - stage: + name: release + displayName: 发布 + steps: + - step: publish@release_artifacts + name: publish_release_artifacts + displayName: '发布' + # 上游上传制品任务的产出 + dependArtifact: output + # 发布制品版本号 + version: '1.0.0.0' + # 是否开启版本号自增,默认开启 + autoIncrement: true +triggers: + push: + branches: + exclude: + - master + include: + - .* diff --git a/.workflow/master-pipeline.yml b/.workflow/master-pipeline.yml new file mode 100644 index 0000000..5d926c2 --- /dev/null +++ b/.workflow/master-pipeline.yml @@ -0,0 +1,51 @@ +version: '1.0' +name: master-pipeline +displayName: MasterPipeline +stages: + - stage: + name: compile + displayName: 编译 + steps: + - step: build@maven + name: build_maven + displayName: Maven 构建 + # 支持6、7、8、9、10、11六个版本 + jdkVersion: 8 + # 支持2.2.1、3.2.5、3.3.9、3.5.2、3.5.3、3.5.4、3.6.1、3.6.3八个版本 + mavenVersion: 3.3.9 + # 构建命令 + commands: + - mvn -B clean package -Dmaven.test.skip=true + # 非必填字段,开启后表示将构建产物暂存,但不会上传到制品库中,7天后自动清除 + artifacts: + # 构建产物名字,作为产物的唯一标识可向下传递,支持自定义,默认为BUILD_ARTIFACT。在下游可以通过${BUILD_ARTIFACT}方式引用来获取构建物地址 + - name: BUILD_ARTIFACT + # 构建产物获取路径,是指代码编译完毕之后构建物的所在路径,如通常jar包在target目录下。当前目录为代码库根目录 + path: + - ./target + - step: publish@general_artifacts + name: publish_general_artifacts + displayName: 上传制品 + # 上游构建任务定义的产物名,默认BUILD_ARTIFACT + dependArtifact: BUILD_ARTIFACT + # 上传到制品库时的制品命名,默认output + artifactName: output + dependsOn: build_maven + - stage: + name: release + displayName: 发布 + steps: + - step: publish@release_artifacts + name: publish_release_artifacts + displayName: '发布' + # 上游上传制品任务的产出 + dependArtifact: output + # 发布制品版本号 + version: '1.0.0.0' + # 是否开启版本号自增,默认开启 + autoIncrement: true +triggers: + push: + branches: + include: + - master diff --git a/.workflow/pr-pipeline.yml b/.workflow/pr-pipeline.yml new file mode 100644 index 0000000..3f7579d --- /dev/null +++ b/.workflow/pr-pipeline.yml @@ -0,0 +1,40 @@ +version: '1.0' +name: pr-pipeline +displayName: PRPipeline +stages: + - stage: + name: compile + displayName: 编译 + steps: + - step: build@maven + name: build_maven + displayName: Maven 构建 + # 支持6、7、8、9、10、11六个版本 + jdkVersion: 8 + # 支持2.2.1、3.2.5、3.3.9、3.5.2、3.5.3、3.5.4、3.6.1、3.6.3八个版本 + mavenVersion: 3.3.9 + # 构建命令 + commands: + - mvn -B clean package -Dmaven.test.skip=true + # 非必填字段,开启后表示将构建产物暂存,但不会上传到制品库中,7天后自动清除 + artifacts: + # 构建产物名字,作为产物的唯一标识可向下传递,支持自定义,默认为BUILD_ARTIFACT。在下游可以通过${BUILD_ARTIFACT}方式引用来获取构建物地址 + - name: BUILD_ARTIFACT + # 构建产物获取路径,是指代码编译完毕之后构建物的所在路径,如通常jar包在target目录下。当前目录为代码库根目录 + path: + - ./target + - step: publish@general_artifacts + name: publish_general_artifacts + displayName: 上传制品 + # 上游构建任务定义的产物名,默认BUILD_ARTIFACT + dependArtifact: BUILD_ARTIFACT + # 构建产物制品库,默认default,系统默认创建 + artifactRepository: default + # 上传到制品库时的制品命名,默认output + artifactName: output + dependsOn: build_maven +triggers: + pr: + branches: + include: + - master -- Gitee From e5434c6c485e2909268ed89a4fec68cf0d7bed34 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E6=96=87=E5=8D=9A?= <7677415+liwenbo1@user.noreply.gitee.com> Date: Thu, 22 Sep 2022 03:40:02 +0000 Subject: [PATCH 02/11] create pipeline-20220922.yml --- .workflow/pipeline-20220922.yml | 36 +++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 .workflow/pipeline-20220922.yml diff --git a/.workflow/pipeline-20220922.yml b/.workflow/pipeline-20220922.yml new file mode 100644 index 0000000..baa7de4 --- /dev/null +++ b/.workflow/pipeline-20220922.yml @@ -0,0 +1,36 @@ +version: '1.0' +name: pipeline-20220922 +displayName: pipeline-20220922 +triggers: + trigger: manual + push: + branches: + precise: + - master +stages: + - name: stage-8873a05c + displayName: 未命名 + strategy: naturally + trigger: auto + executor: [] + steps: + - step: ut@maven + name: unit_test_maven + displayName: Maven 单元测试 + jdkVersion: '8' + mavenVersion: 3.3.9 + commands: + - '# Maven单元测试默认命令' + - mvn -B test -Dmaven.test.failure.ignore=true + - mvn surefire-report:report-only + - mvn site -DgenerateReports=false + report: + path: ./target/site + index: surefire-report.html + checkpoints: [] + settings: [] + caches: + - ~/.m2 + notify: [] + strategy: + retry: '0' -- Gitee From a1df6c826af912ceb8c71cb34ad757a02b870d07 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E6=96=87=E5=8D=9A?= <7677415+liwenbo1@user.noreply.gitee.com> Date: Thu, 22 Sep 2022 06:27:05 +0000 Subject: [PATCH 03/11] update pipeline-20220922.yml --- .workflow/pipeline-20220922.yml | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/.workflow/pipeline-20220922.yml b/.workflow/pipeline-20220922.yml index baa7de4..f6dd5bb 100644 --- a/.workflow/pipeline-20220922.yml +++ b/.workflow/pipeline-20220922.yml @@ -34,3 +34,29 @@ stages: notify: [] strategy: retry: '0' + - name: stage-345a679e + displayName: 未命名 + strategy: naturally + trigger: auto + executor: [] + steps: + - step: coverage@jacoco + name: jacoco_coverage_collection + displayName: Jacoco 覆盖率采集 + jdkVersion: '8' + mavenVersion: 3.3.9 + commands: + - '# ./gradlew jacocoTestReport' + - mvn test -Dmaven.test.failure.ignore=true + report: + path: ./target/site/jacoco + index: index.html + checkpoints: + - key: InstructionCoverageRate + value: 0 + logicalOperator: '&&' + relationalOperator: '>=' + settings: [] + notify: [] + strategy: + retry: '0' -- Gitee From ab3906c04b9a5e7994d828820ca9273402e68f76 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E6=96=87=E5=8D=9A?= <7677415+liwenbo1@user.noreply.gitee.com> Date: Thu, 22 Sep 2022 06:35:05 +0000 Subject: [PATCH 04/11] update pipeline-20220922.yml --- .workflow/pipeline-20220922.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.workflow/pipeline-20220922.yml b/.workflow/pipeline-20220922.yml index f6dd5bb..52a56e8 100644 --- a/.workflow/pipeline-20220922.yml +++ b/.workflow/pipeline-20220922.yml @@ -49,8 +49,8 @@ stages: - '# ./gradlew jacocoTestReport' - mvn test -Dmaven.test.failure.ignore=true report: - path: ./target/site/jacoco - index: index.html + path: ./target/site + index: surefire-report.html checkpoints: - key: InstructionCoverageRate value: 0 -- Gitee From 257d915ca0bf219701ac5d180a116941fbb743cf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E6=96=87=E5=8D=9A?= <7677415+liwenbo1@user.noreply.gitee.com> Date: Thu, 22 Sep 2022 06:42:13 +0000 Subject: [PATCH 05/11] update pipeline-20220922.yml --- .workflow/pipeline-20220922.yml | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/.workflow/pipeline-20220922.yml b/.workflow/pipeline-20220922.yml index 52a56e8..3701c21 100644 --- a/.workflow/pipeline-20220922.yml +++ b/.workflow/pipeline-20220922.yml @@ -49,10 +49,14 @@ stages: - '# ./gradlew jacocoTestReport' - mvn test -Dmaven.test.failure.ignore=true report: - path: ./target/site - index: surefire-report.html + path: ./target/ + index: surefire-reports.html checkpoints: - - key: InstructionCoverageRate + - key: BranchCoverageRate + value: 0 + logicalOperator: '&&' + relationalOperator: '>=' + - key: LineCoverageRate value: 0 logicalOperator: '&&' relationalOperator: '>=' -- Gitee From fd8c01509c3ca37c10abfd98de16cc54db25aaf2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E6=96=87=E5=8D=9A?= <7677415+liwenbo1@user.noreply.gitee.com> Date: Thu, 22 Sep 2022 06:47:07 +0000 Subject: [PATCH 06/11] update pipeline-20220922.yml --- .workflow/pipeline-20220922.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.workflow/pipeline-20220922.yml b/.workflow/pipeline-20220922.yml index 3701c21..cf5f9d9 100644 --- a/.workflow/pipeline-20220922.yml +++ b/.workflow/pipeline-20220922.yml @@ -47,10 +47,10 @@ stages: mavenVersion: 3.3.9 commands: - '# ./gradlew jacocoTestReport' - - mvn test -Dmaven.test.failure.ignore=true + - '# mvn test -Dmaven.test.failure.ignore=true' report: - path: ./target/ - index: surefire-reports.html + path: ./target/site + index: surefire-report.html checkpoints: - key: BranchCoverageRate value: 0 -- Gitee From f7a46633c6c3dc031b3e6922284dd25dbd9c2771 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E6=96=87=E5=8D=9A?= <7677415+liwenbo1@user.noreply.gitee.com> Date: Thu, 22 Sep 2022 06:50:37 +0000 Subject: [PATCH 07/11] update pipeline-20220922.yml --- .workflow/pipeline-20220922.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.workflow/pipeline-20220922.yml b/.workflow/pipeline-20220922.yml index cf5f9d9..ce47cff 100644 --- a/.workflow/pipeline-20220922.yml +++ b/.workflow/pipeline-20220922.yml @@ -46,8 +46,9 @@ stages: jdkVersion: '8' mavenVersion: 3.3.9 commands: - - '# ./gradlew jacocoTestReport' - - '# mvn test -Dmaven.test.failure.ignore=true' + - mvn -B test -Dmaven.test.failure.ignore=true + - mvn surefire-report:report-only + - mvn site -DgenerateReports=false report: path: ./target/site index: surefire-report.html -- Gitee From 6bceb4b1283bff80c62942f96c1db7f624b8d4bb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E6=96=87=E5=8D=9A?= <7677415+liwenbo1@user.noreply.gitee.com> Date: Wed, 19 Oct 2022 07:17:34 +0000 Subject: [PATCH 08/11] create pipeline-20221019.yml --- .workflow/pipeline-20221019.yml | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 .workflow/pipeline-20221019.yml diff --git a/.workflow/pipeline-20221019.yml b/.workflow/pipeline-20221019.yml new file mode 100644 index 0000000..a33f7df --- /dev/null +++ b/.workflow/pipeline-20221019.yml @@ -0,0 +1,26 @@ +version: '1.0' +name: pipeline-20221019 +displayName: pipeline-20221019 +triggers: + trigger: manual + push: + branches: + prefix: + - '' + paths: + include: + - liwenbo/s +stages: + - name: stage-374a12d3 + displayName: 未命名 + strategy: naturally + trigger: auto + executor: [] + steps: + - step: sc@opensca + name: open_sca + displayName: OpenSCA 开源组件检测 + detectPath: ./ + notify: [] + strategy: + retry: '0' -- Gitee From 7906b7a553fe0fc3283038a8bb0b9f8708164948 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E6=96=87=E5=8D=9A?= <7677415+liwenbo1@user.noreply.gitee.com> Date: Sun, 5 Mar 2023 06:48:17 +0000 Subject: [PATCH 09/11] update pipeline-20220922.yml --- .workflow/pipeline-20220922.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.workflow/pipeline-20220922.yml b/.workflow/pipeline-20220922.yml index ce47cff..189dbb7 100644 --- a/.workflow/pipeline-20220922.yml +++ b/.workflow/pipeline-20220922.yml @@ -2,11 +2,15 @@ version: '1.0' name: pipeline-20220922 displayName: pipeline-20220922 triggers: - trigger: manual + trigger: auto push: branches: precise: - master + pr: + branches: + precise: + - master stages: - name: stage-8873a05c displayName: 未命名 -- Gitee From 395d436882c239cedc09a589a9709614acd700ed Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E6=96=87=E5=8D=9A?= <7677415+liwenbo1@user.noreply.gitee.com> Date: Sun, 5 Mar 2023 06:48:41 +0000 Subject: [PATCH 10/11] update pom.xml. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 李文博 <7677415+liwenbo1@user.noreply.gitee.com> --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 0091b7f..1208911 100644 --- a/pom.xml +++ b/pom.xml @@ -1,4 +1,4 @@ - +1 4.0.0 -- Gitee From 58350768cf74f53c339537c6758c5a7825461260 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E6=96=87=E5=8D=9A?= <7677415+liwenbo1@user.noreply.gitee.com> Date: Sun, 5 Mar 2023 06:49:25 +0000 Subject: [PATCH 11/11] update pom.xml. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 李文博 <7677415+liwenbo1@user.noreply.gitee.com> --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 1208911..a417481 100644 --- a/pom.xml +++ b/pom.xml @@ -1,4 +1,4 @@ -1 +11 4.0.0 -- Gitee