This is an automated email from the ASF dual-hosted git repository. tison pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/curator.git
commit 89df142a0509c5371f49ba80fd55157483daf75b Author: tison <[email protected]> AuthorDate: Mon Mar 13 13:52:01 2023 +0800 CURATOR-661: Use license header checker and add required status Signed-off-by: tison <[email protected]> --- .asf.yaml | 46 +++++++++++++++++++++++++++++++++++++++ .github/workflows/ci.yml | 39 +++++++++++++++++++-------------- licenserc.toml | 25 +++++++++++++++++++++ pom.xml | 56 ++---------------------------------------------- 4 files changed, 96 insertions(+), 70 deletions(-) diff --git a/.asf.yaml b/.asf.yaml new file mode 100644 index 00000000..54e12d52 --- /dev/null +++ b/.asf.yaml @@ -0,0 +1,46 @@ +# Licensed to the 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. 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 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. + +github: + description: "Apache Curator" + homepage: https://curator.apache.org/ + labels: + - java + - database + - curator + - zookeeper + - consensus + features: + wiki: false + issues: false + projects: false + enabled_merge_buttons: + squash: true + merge: false + rebase: true + protected_branches: + master: + required_status_checks: + strict: false + contexts: + - Required + required_signatures: false + +notifications: + commits: [email protected] + pullrequests: [email protected] + jira_options: link label diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e131fed8..06f80891 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -30,28 +30,17 @@ jobs: name: Check runs-on: ubuntu-latest steps: - - name: Checkout - uses: actions/checkout@v3 - - - name: Set up JDK 11 - uses: actions/setup-java@v3 - with: - java-version: 11 - distribution: 'temurin' - - - name: RAT check - run: ./mvnw apache-rat:check + - uses: actions/checkout@v3 + - name: Check license header + run: docker run --rm -v $(pwd):/github/workspace -u $(id -u):$(id -g) ghcr.io/korandoru/hawkeye-native:v1 check - test: + unittest: name: Unit tests runs-on: ubuntu-latest timeout-minutes: 120 strategy: matrix: - java: - - '8' - - '11' - + java: [8, 11] steps: - uses: actions/checkout@v3 @@ -74,3 +63,21 @@ jobs: - name: Test with ${{ matrix.java }} run: ./mvnw verify + + required: + name: Required + runs-on: ubuntu-latest + if: ${{ always() }} + needs: + - check + - unittest + steps: + - name: Guardian + run: | + if [[ ! ( \ + "${{ needs.check.result }}" == "success" \ + && "${{ needs.unittest.result }}" == "success" \ + ) ]]; then + echo "Required jobs haven't been completed successfully." + exit -1 + fi diff --git a/licenserc.toml b/licenserc.toml new file mode 100644 index 00000000..09593513 --- /dev/null +++ b/licenserc.toml @@ -0,0 +1,25 @@ +# Licensed to the 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. 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 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. + +headerPath = "Apache-2.0-ASF.txt" + +excludes = [ + "DEPENDENCIES", + "doap.rdf", + "**/NOTICE", + "**/*.confluence", +] diff --git a/pom.xml b/pom.xml index ab8a5891..01b3708d 100644 --- a/pom.xml +++ b/pom.xml @@ -73,10 +73,10 @@ <maven-bundle-plugin-version>5.1.4</maven-bundle-plugin-version> <maven-compiler-plugin-version>3.10.0</maven-compiler-plugin-version> <maven-dependency-plugin-version>3.2.0</maven-dependency-plugin-version> + <maven-project-info-reports-plugin-version>3.0.0</maven-project-info-reports-plugin-version> <maven-javadoc-plugin-version>3.3.2</maven-javadoc-plugin-version> <maven-surefire-plugin-version>3.0.0-M5</maven-surefire-plugin-version> <doxia-module-confluence-version>1.11.1</doxia-module-confluence-version> - <directory-maven-plugin-version>1.0</directory-maven-plugin-version> <javassist-version>3.24.1-GA</javassist-version> <commons-math-version>2.2</commons-math-version> <jackson-mapper-asl-version>1.9.13</jackson-mapper-asl-version> @@ -662,6 +662,7 @@ <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-project-info-reports-plugin</artifactId> + <version>${maven-project-info-reports-plugin-version}</version> </plugin> <plugin> @@ -697,12 +698,6 @@ <version>${maven-bundle-plugin-version}</version> </plugin> - <plugin> - <groupId>org.commonjava.maven.plugins</groupId> - <artifactId>directory-maven-plugin</artifactId> - <version>${directory-maven-plugin-version}</version> - </plugin> - <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-release-plugin</artifactId> @@ -855,24 +850,6 @@ </executions> </plugin> - <!-- Directory plugin to find parent root directory absolute path --> - <plugin> - <groupId>org.commonjava.maven.plugins</groupId> - <artifactId>directory-maven-plugin</artifactId> - <executions> - <execution> - <id>directories</id> - <goals> - <goal>highest-basedir</goal> - </goals> - <phase>validate</phase> - <configuration> - <property>main.basedir</property> - </configuration> - </execution> - </executions> - </plugin> - <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-release-plugin</artifactId> @@ -882,35 +859,6 @@ </configuration> </plugin> - <plugin> - <groupId>org.apache.rat</groupId> - <artifactId>apache-rat-plugin</artifactId> - <configuration> - <numUnapprovedLicenses>0</numUnapprovedLicenses> - <excludeSubProjects>false</excludeSubProjects> - <excludes> - <exclude>**/*.confluence</exclude> - <exclude>**/*.iml</exclude> - <exclude>**/*.rdf</exclude> - <exclude>**/help.txt</exclude> - <exclude>**/.gitignore</exclude> - <exclude>**/*.thrift</exclude> - <exclude>**/*.json</exclude> - <exclude>**/.idea/**</exclude> - <exclude>**/DISCLAIMER</exclude> - <exclude>**/DEPENDENCIES</exclude> - <exclude>**/KEYS</exclude> - <exclude>**/LICENSE</exclude> - <exclude>**/NOTICE</exclude> - <exclude>**/README</exclude> - <exclude>**/CHANGES</exclude> - <exclude>**/RELEASE-NOTES</exclude> - <exclude>**/target/**</exclude> - <exclude>**/generated/**</exclude> - </excludes> - </configuration> - </plugin> - <plugin> <groupId>org.codehaus.mojo</groupId> <artifactId>clirr-maven-plugin</artifactId>
