From a6becd8c264257256ad7865f082a6e8767725a55 Mon Sep 17 00:00:00 2001 From: Zhenxu Ke Date: Fri, 15 Jan 2021 11:18:37 +0800 Subject: [PATCH] chore: set up license-eye to check license headers (#4453) --- .github/workflows/ci_backend.yml | 12 ++--- .github/workflows/ci_e2e.yml | 10 ++--- .github/workflows/ci_frontend.yml | 24 +--------- .github/workflows/ci_ut.yml | 22 ++++------ .licenserc.yaml | 43 ++++++++++++++++++ .../src/js/module/visibility/index.js | 2 +- pom.xml | 44 ------------------- 7 files changed, 63 insertions(+), 94 deletions(-) create mode 100644 .licenserc.yaml diff --git a/.github/workflows/ci_backend.yml b/.github/workflows/ci_backend.yml index c24a3ecf07..7b245d77ef 100644 --- a/.github/workflows/ci_backend.yml +++ b/.github/workflows/ci_backend.yml @@ -46,18 +46,14 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - # In the checkout@v2, it doesn't support git submodule. Execute the commands manually. - - name: checkout submodules - shell: bash - run: | - git submodule sync --recursive - git -c protocol.version=2 submodule update --init --force --recursive --depth=1 + with: + submodule: true + - name: Check License Header + uses: apache/skywalking-eyes@9bd5feb - name: Set up JDK 1.8 uses: actions/setup-java@v1 with: java-version: 1.8 - - name: Check license - run: ./mvnw -B apache-rat:check - name: Compile run: mvn -B clean compile install -Prelease -Dmaven.test.skip=true - name: Check dependency license diff --git a/.github/workflows/ci_e2e.yml b/.github/workflows/ci_e2e.yml index 8070d7e0c5..3e781056d0 100644 --- a/.github/workflows/ci_e2e.yml +++ b/.github/workflows/ci_e2e.yml @@ -30,12 +30,10 @@ jobs: steps: - uses: actions/checkout@v2 - # In the checkout@v2, it doesn't support git submodule. Execute the commands manually. - - name: checkout submodules - shell: bash - run: | - git submodule sync --recursive - git -c protocol.version=2 submodule update --init --force --recursive --depth=1 + with: + submodule: true + - name: Check License Header + uses: apache/skywalking-eyes@9bd5feb - uses: actions/cache@v1 with: path: ~/.m2/repository diff --git a/.github/workflows/ci_frontend.yml b/.github/workflows/ci_frontend.yml index 1feaabaeb3..afa0c8d672 100644 --- a/.github/workflows/ci_frontend.yml +++ b/.github/workflows/ci_frontend.yml @@ -35,12 +35,8 @@ jobs: os: [ubuntu-latest, macos-latest] steps: - uses: actions/checkout@v2 - # In the checkout@v2, it doesn't support git submodule. Execute the commands manually. - - name: checkout submodules - shell: bash - run: | - git submodule sync --recursive - git -c protocol.version=2 submodule update --init --force --recursive --depth=1 + with: + submodule: true - name: Set up Node.js uses: actions/setup-node@v1 with: @@ -52,19 +48,3 @@ jobs: npm install npm run lint npm run build - License-check: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - # In the checkout@v2, it doesn't support git submodule. Execute the commands manually. - - name: checkout submodules - shell: bash - run: | - git submodule sync --recursive - git -c protocol.version=2 submodule update --init --force --recursive --depth=1 - - name: Set up JDK 1.8 - uses: actions/setup-java@v1 - with: - java-version: 1.8 - - name: Check - run: mvn -B apache-rat:check \ No newline at end of file diff --git a/.github/workflows/ci_ut.yml b/.github/workflows/ci_ut.yml index 739c9be7fa..09542d97f1 100644 --- a/.github/workflows/ci_ut.yml +++ b/.github/workflows/ci_ut.yml @@ -33,12 +33,12 @@ jobs: steps: - uses: actions/checkout@v2 - # In the checkout@v2, it doesn't support git submodule. Execute the commands manually. - - name: checkout submodules - shell: bash - run: | - git submodule sync --recursive - git -c protocol.version=2 submodule update --init --force --recursive --depth=1 + with: + submodule: true + - name: Check License Header + uses: apache/skywalking-eyes@9bd5feb + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Only enable review / suggestion here - uses: actions/cache@v1 with: path: ~/.m2/repository @@ -98,12 +98,8 @@ jobs: steps: - name: Checkout uses: actions/checkout@v2 - # In the checkout@v2, it doesn't support git submodule. Execute the commands manually. - - name: checkout submodules - shell: bash - run: | - git submodule sync --recursive - git -c protocol.version=2 submodule update --init --force --recursive --depth=1 + with: + submodule: true - name: check code style env: WORKDIR: ./ @@ -117,4 +113,4 @@ jobs: | /opt/reviewdog -f=checkstyle \ -reporter="${INPUT_REPORTER:-github-pr-check}" \ -filter-mode="${INPUT_FILTER_MODE:-added}" \ - -fail-on-error="${INPUT_FAIL_ON_ERROR:-false}" \ No newline at end of file + -fail-on-error="${INPUT_FAIL_ON_ERROR:-false}" diff --git a/.licenserc.yaml b/.licenserc.yaml new file mode 100644 index 0000000000..ea6909e240 --- /dev/null +++ b/.licenserc.yaml @@ -0,0 +1,43 @@ +# Licensed to Apache Software Foundation (ASF) under one or more contributor +# license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright +# ownership. Apache Software Foundation (ASF) licenses this file to you under +# the Apache License, Version 2.0 (the "License"); you may +# not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. + +header: + license: + spdx-id: Apache-2.0 + copyright-owner: Apache Software Foundation + + paths-ignore: + - dist + - NOTICE + - LICENSE + - DISCLAIMER + - dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/utils/ScriptRunner.java + - mvnw.cmd + - sql/soft_version + - .mvn + - .gitattributes + - '**/licenses/**/LICENSE-*' + - '**/*.md' + - '**/*.json' + - '**/*.iml' + - '**/.babelrc' + - '**/.eslintignore' + - '**/.gitignore' + - '**/LICENSE' + - '**/NOTICE' + + comment: on-failure diff --git a/dolphinscheduler-ui/src/js/module/visibility/index.js b/dolphinscheduler-ui/src/js/module/visibility/index.js index 666ffaaf03..c3b50c60d0 100644 --- a/dolphinscheduler-ui/src/js/module/visibility/index.js +++ b/dolphinscheduler-ui/src/js/module/visibility/index.js @@ -3,7 +3,7 @@ * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License") you may not use this file except in compliance with + * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 diff --git a/pom.xml b/pom.xml index 721cdc84d6..be9e85a7ab 100644 --- a/pom.xml +++ b/pom.xml @@ -97,7 +97,6 @@ 0.238.1 3.1.12 3.0.0 - 0.13 3.4.14 1.6 3.3 @@ -924,49 +923,6 @@ - - org.apache.rat - apache-rat-plugin - ${apache.rat.version} - - false - false - - - AL20 - Apache License, 2.0 - - Licensed to the Apache Software Foundation (ASF) - - - - - - Apache License, 2.0 - - - - **/node_modules/** - **/node/** - **/dist/** - **/licenses/** - .github/** - **/sql/soft_version - **/common/utils/ScriptRunner.java - **/*.json - - **/*.md - **/*.MD - **/*.txt - **/docs/** - **/*.babelrc - **/*.eslint* - **/.mvn/jvm.config - **/.mvn/wrapper/** - - true - - com.github.spotbugs spotbugs-maven-plugin