From 03303b2d5b88abca41bdddbfb098c2a7cc7b88c2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=BB=84=E6=98=95?= Date: Tue, 5 Mar 2024 15:43:00 +0800 Subject: [PATCH] =?UTF-8?q?OCT=201.=20=E6=9B=B4=E6=96=B0=20gitlab-ci=20?= =?UTF-8?q?=E9=85=8D=E7=BD=AE=EF=BC=8C=20=E6=94=AF=E6=8C=81=20=E6=B5=8B?= =?UTF-8?q?=E8=AF=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitlab-ci.yml | 22 +++++++++++++++++----- pom.xml | 1 - 2 files changed, 17 insertions(+), 6 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index c9c811c..e555375 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,10 +1,11 @@ # 本次构建的阶段: compile、package、deploy -stages : +stages : - sonarqube-check - compile - package + - integration-test -sonarqube-check: +sonarqube-check : stage : sonarqube-check tags : - linux-maven @@ -26,7 +27,7 @@ sonarqube-check: - develop # 编译 -compile : +compile : stage : compile tags : - linux-maven @@ -37,7 +38,18 @@ compile : - mvn compile # 打包 -package : +integration-test: + stage : integration-test + tags : + - linux-maven + only : + - master + script: + - echo "=============== 开始集成测试 ===============" + - mvn test -D test=IntegrationTestSuite + +# 打包 +package : stage : package tags : - linux-maven @@ -45,4 +57,4 @@ package : - master script: - echo "=============== 开始打包任务 ===============" - - mvn clean package + - mvn clean package -DskipTests diff --git a/pom.xml b/pom.xml index 48e77e4..149efa1 100644 --- a/pom.xml +++ b/pom.xml @@ -240,7 +240,6 @@ org.apache.maven.plugins maven-surefire-plugin - true true false