From 0f190ae3dadf4082f10f5df492085e6246fbe496 Mon Sep 17 00:00:00 2001 From: Jay Chung Date: Mon, 3 Jul 2023 20:41:12 +0800 Subject: [PATCH] chore: Add new step skip for ui build and spotless (#14427) --- .github/workflows/api-test.yml | 4 ++-- .github/workflows/backend.yml | 2 +- .github/workflows/e2e.yml | 2 +- .github/workflows/owasp-dependency-check.yaml | 2 +- .github/workflows/publish-docker.yaml | 2 +- .github/workflows/unit-test.yml | 4 ++-- docs/docs/en/contribute/development-environment-setup.md | 4 ++-- docs/docs/en/contribute/release.md | 6 +++--- docs/docs/zh/contribute/development-environment-setup.md | 4 ++-- docs/docs/zh/contribute/release.md | 6 +++--- dolphinscheduler-ui/pom.xml | 1 + pom.xml | 3 +++ 12 files changed, 22 insertions(+), 18 deletions(-) diff --git a/.github/workflows/api-test.yml b/.github/workflows/api-test.yml index 14a5bcec1d..2364c874fe 100644 --- a/.github/workflows/api-test.yml +++ b/.github/workflows/api-test.yml @@ -67,7 +67,7 @@ jobs: ./mvnw -B clean install \ -Dmaven.test.skip \ -Dmaven.javadoc.skip \ - -Dcheckstyle.skip=true \ + -Dspotless.skip=true \ -Pdocker,release -Ddocker.tag=ci \ -pl dolphinscheduler-standalone-server -am - name: Export Docker Images @@ -118,7 +118,7 @@ jobs: run: | ./mvnw -B -f dolphinscheduler-api-test/pom.xml -am \ -DfailIfNoTests=false \ - -Dcheckstyle.skip=false \ + -Dspotless.skip=false \ -Dtest=${{ matrix.case.class }} test - uses: actions/upload-artifact@v2 if: always() diff --git a/.github/workflows/backend.yml b/.github/workflows/backend.yml index 5267c3355b..ee27ed5e70 100644 --- a/.github/workflows/backend.yml +++ b/.github/workflows/backend.yml @@ -81,7 +81,7 @@ jobs: ./mvnw -B clean install \ -Prelease,docker \ -Dmaven.test.skip=true \ - -Dcheckstyle.skip=true \ + -Dspotless.skip=true \ -Dhttp.keepAlive=false \ -Dmaven.wagon.http.pool=false \ -Dmaven.wagon.httpconnectionManager.ttlSeconds=120 diff --git a/.github/workflows/e2e.yml b/.github/workflows/e2e.yml index d4c73848ec..011eafe175 100644 --- a/.github/workflows/e2e.yml +++ b/.github/workflows/e2e.yml @@ -67,7 +67,7 @@ jobs: ./mvnw -B clean install \ -Dmaven.test.skip \ -Dmaven.javadoc.skip \ - -Dcheckstyle.skip=true \ + -Dspotless.skip=true \ -Pdocker,release -Ddocker.tag=ci \ -pl dolphinscheduler-standalone-server -am - name: Export Docker Images diff --git a/.github/workflows/owasp-dependency-check.yaml b/.github/workflows/owasp-dependency-check.yaml index 5552335b13..54e51aafed 100644 --- a/.github/workflows/owasp-dependency-check.yaml +++ b/.github/workflows/owasp-dependency-check.yaml @@ -40,7 +40,7 @@ jobs: java-version: 8 distribution: 'adopt' - name: Run OWASP Dependency Check - run: ./mvnw -B clean install verify dependency-check:check -DskipDepCheck=false -Dmaven.test.skip=true -Dcheckstyle.skip=true + run: ./mvnw -B clean install verify dependency-check:check -DskipDepCheck=false -Dmaven.test.skip=true -Dspotless.skip=true - name: Upload report uses: actions/upload-artifact@v3 if: ${{ cancelled() || failure() }} diff --git a/.github/workflows/publish-docker.yaml b/.github/workflows/publish-docker.yaml index 612f4a10db..0ed0b99149 100644 --- a/.github/workflows/publish-docker.yaml +++ b/.github/workflows/publish-docker.yaml @@ -71,7 +71,7 @@ jobs: ./mvnw -B clean deploy \ -Dmaven.test.skip \ -Dmaven.javadoc.skip \ - -Dcheckstyle.skip=true \ + -Dspotless.skip=true \ -Dmaven.deploy.skip \ -Ddocker.tag=${{ env.DOCKER_TAG }} \ -Ddocker.hub=${{ env.HUB }} \ diff --git a/.github/workflows/unit-test.yml b/.github/workflows/unit-test.yml index 6acfa1fc4b..5867f611f1 100644 --- a/.github/workflows/unit-test.yml +++ b/.github/workflows/unit-test.yml @@ -75,7 +75,7 @@ jobs: key: ${{ runner.os }}-maven - name: Run Unit tests - run: ./mvnw clean verify -B -Dmaven.test.skip=false -Dcheckstyle.skip=true + run: ./mvnw clean verify -B -Dmaven.test.skip=false -Dspotless.skip=true - name: Upload coverage report to codecov run: CODECOV_TOKEN="09c2663f-b091-4258-8a47-c981827eb29a" bash <(curl -s https://codecov.io/bash) @@ -90,7 +90,7 @@ jobs: ./mvnw --batch-mode verify sonar:sonar -Dsonar.coverage.jacoco.xmlReportPaths=target/site/jacoco/jacoco.xml -Dmaven.test.skip=true - -Dcheckstyle.skip=true + -Dspotless.skip=true -Dsonar.host.url=https://sonarcloud.io -Dsonar.organization=apache -Dsonar.core.codeCoveragePlugin=jacoco diff --git a/docs/docs/en/contribute/development-environment-setup.md b/docs/docs/en/contribute/development-environment-setup.md index 3b416e8a32..6222136eda 100644 --- a/docs/docs/en/contribute/development-environment-setup.md +++ b/docs/docs/en/contribute/development-environment-setup.md @@ -65,7 +65,7 @@ cd dolphinscheduler ./mvnw -B clean package \ -Dmaven.test.skip \ -Dmaven.javadoc.skip \ - -Dmaven.checkstyle.skip \ + -Dspotless.skip = true \ -Ddocker.tag= \ -Pdocker,release ``` @@ -79,7 +79,7 @@ cd dolphinscheduler ./mvnw -B clean deploy \ -Dmaven.test.skip \ -Dmaven.javadoc.skip \ - -Dmaven.checkstyle.skip \ + -Dspotless.skip = true \ -Dmaven.deploy.skip \ -Ddocker.tag= \ -Ddocker.hub= \ diff --git a/docs/docs/en/contribute/release.md b/docs/docs/en/contribute/release.md index 03851bb581..4fffce4688 100644 --- a/docs/docs/en/contribute/release.md +++ b/docs/docs/en/contribute/release.md @@ -208,7 +208,7 @@ git push "${GH_REMOTE}" "${VERSION}"-release > first to clone the source code. And then make sure you set `GH_REMOTE="origin"` to make all command work fine. ```shell -mvn release:prepare -Prelease -Darguments="-Dmaven.test.skip=true -Dcheckstyle.skip=true -Dmaven.javadoc.skip=true -Dspotless.check.skip=true" -DautoVersionSubmodules=true -DdryRun=true -Dusername="${GH_USERNAME}" +mvn release:prepare -Prelease -Darguments="-Dmaven.test.skip=true -Dspotless.skip=true -Dmaven.javadoc.skip=true -Dspotless.check.skip=true" -DautoVersionSubmodules=true -DdryRun=true -Dusername="${GH_USERNAME}" ``` - `-Prelease`: choose release profile, which will pack all the source codes, jar files and executable binary packages. @@ -226,7 +226,7 @@ mvn release:clean Then, prepare to execute the release. ```shell -mvn release:prepare -Prelease -Darguments="-Dmaven.test.skip=true -Dcheckstyle.skip=true -Dmaven.javadoc.skip=true -Dspotless.check.skip=true" -DautoVersionSubmodules=true -DpushChanges=false -Dusername="${GH_USERNAME}" +mvn release:prepare -Prelease -Darguments="-Dmaven.test.skip=true -Dspotless.skip=true -Dmaven.javadoc.skip=true -Dspotless.check.skip=true" -DautoVersionSubmodules=true -DpushChanges=false -Dusername="${GH_USERNAME}" ``` It is basically the same as the previous rehearsal command, but deleting `-DdryRun=true` parameter. @@ -258,7 +258,7 @@ git push "${GH_REMOTE}" --tags #### Maven Release Deploy ```shell -mvn release:perform -Prelease -Darguments="-Dmaven.test.skip=true -Dcheckstyle.skip=true -Dmaven.javadoc.skip=true -Dspotless.check.skip=true" -DautoVersionSubmodules=true -Dusername="${GH_USERNAME}" +mvn release:perform -Prelease -Darguments="-Dmaven.test.skip=true -Dspotless.skip=true -Dmaven.javadoc.skip=true -Dspotless.check.skip=true" -DautoVersionSubmodules=true -Dusername="${GH_USERNAME}" ``` After that command is executed, the version to be released will be uploaded to Apache staging repository automatically. diff --git a/docs/docs/zh/contribute/development-environment-setup.md b/docs/docs/zh/contribute/development-environment-setup.md index 5caae63b60..be3379137a 100644 --- a/docs/docs/zh/contribute/development-environment-setup.md +++ b/docs/docs/zh/contribute/development-environment-setup.md @@ -62,7 +62,7 @@ cd dolphinscheduler ./mvnw -B clean package \ -Dmaven.test.skip \ -Dmaven.javadoc.skip \ - -Dmaven.checkstyle.skip \ + -Dspotless.skip=true \ -Ddocker.tag= \ -Pdocker,release ``` @@ -76,7 +76,7 @@ cd dolphinscheduler ./mvnw -B clean deploy \ -Dmaven.test.skip \ -Dmaven.javadoc.skip \ - -Dmaven.checkstyle.skip \ + -Dspotless.skip = true \ -Dmaven.deploy.skip \ -Ddocker.tag= \ -Ddocker.hub= \ diff --git a/docs/docs/zh/contribute/release.md b/docs/docs/zh/contribute/release.md index e64206a13a..5f4f4bdf7c 100644 --- a/docs/docs/zh/contribute/release.md +++ b/docs/docs/zh/contribute/release.md @@ -215,7 +215,7 @@ git push "${GH_REMOTE}" "${VERSION}"-release ```shell # 运行发版校验 -mvn release:prepare -Prelease -Darguments="-Dmaven.test.skip=true -Dcheckstyle.skip=true -Dmaven.javadoc.skip=true -Dspotless.check.skip=true" -DautoVersionSubmodules=true -DdryRun=true -Dusername="${GH_USERNAME}" +mvn release:prepare -Prelease -Darguments="-Dmaven.test.skip=true -Dspotless.skip=true -Dmaven.javadoc.skip=true -Dspotless.check.skip=true" -DautoVersionSubmodules=true -DdryRun=true -Dusername="${GH_USERNAME}" ``` - `-Prelease`: 选择 release 的 profile,这个 profile 会打包所有源码、jar 文件以及可执行二进制包。 @@ -233,7 +233,7 @@ mvn release:clean 然后准备执行发布。 ```shell -mvn release:prepare -Prelease -Darguments="-Dmaven.test.skip=true -Dcheckstyle.skip=true -Dmaven.javadoc.skip=true -Dspotless.check.skip=true" -DautoVersionSubmodules=true -DpushChanges=false -Dusername="${GH_USERNAME}" +mvn release:prepare -Prelease -Darguments="-Dmaven.test.skip=true -Dspotless.skip=true -Dmaven.javadoc.skip=true -Dspotless.check.skip=true" -DautoVersionSubmodules=true -DpushChanges=false -Dusername="${GH_USERNAME}" ``` 和上一步演练的命令基本相同,去掉了 `-DdryRun=true` 参数。 @@ -262,7 +262,7 @@ git push "${GH_REMOTE}" --tags #### 部署发布 ```shell -mvn release:perform -Prelease -Darguments="-Dmaven.test.skip=true -Dcheckstyle.skip=true -Dmaven.javadoc.skip=true -Dspotless.check.skip=true" -DautoVersionSubmodules=true -Dusername="${GH_USERNAME}" +mvn release:perform -Prelease -Darguments="-Dmaven.test.skip=true -Dspotless.skip=true -Dmaven.javadoc.skip=true -Dspotless.check.skip=true" -DautoVersionSubmodules=true -Dusername="${GH_USERNAME}" ``` 执行完该命令后,待发布版本会自动上传到 Apache 的临时筹备仓库(staging repository)。你可以通过访问 [apache staging repositories](https://repository.apache.org/#stagingRepositories) diff --git a/dolphinscheduler-ui/pom.xml b/dolphinscheduler-ui/pom.xml index fb6d32fa49..2e61184ef5 100644 --- a/dolphinscheduler-ui/pom.xml +++ b/dolphinscheduler-ui/pom.xml @@ -45,6 +45,7 @@ frontend-maven-plugin ${frontend-maven-plugin.version} + ${build.ui.skip} false diff --git a/pom.xml b/pom.xml index 1752f877de..7d5caaf76c 100755 --- a/pom.xml +++ b/pom.xml @@ -92,6 +92,8 @@ true true true + false + false @@ -604,6 +606,7 @@ spotless-maven-plugin ${spotless.version} + ${spotless.skip} style/spotless_dolphinscheduler_formatter.xml