Skip to content

Commit

Permalink
[10.0.x] kie-issues#1613: Add CI :: License headers / check GitHub …
Browse files Browse the repository at this point in the history
…Actions workflow (#2154)

* kie-issues#1613: Add `CI :: License headers / check` GitHub Actions workflow (#2111)

* Add license header

* rat-excludes

* print rat-check output

* rename the yaml file

* Try to fix tests

* List explicitely all files in .rat-excludes

* Use apache-rat v0.16.1

* revert newline at the EOF

* Everthing -> Everything

* Add ./jitexecutor/jitexecutor-dmn/src/main/resources/META-INF/resources/bundle.js into LICENSE

* CI :: License headers

* Exclude bundle.js from license header check

The bundle.js license header was added inappropriately by #2043

* data-index orm.xml license

* Trigger build
  • Loading branch information
jomarko authored Dec 4, 2024
1 parent a2beeb3 commit d612491
Show file tree
Hide file tree
Showing 5 changed files with 161 additions and 18 deletions.
40 changes: 40 additions & 0 deletions .github/workflows/ci_check_license_headers.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
#
# 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.
#

name: "CI :: License headers"

on:
pull_request:
types: [opened, synchronize, reopened, ready_for_review]

jobs:
check:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v3

- name: Download Apache RAT
run: |
curl -LO https://repo1.maven.org/maven2/org/apache/rat/apache-rat/0.16.1/apache-rat-0.16.1.jar
- name: Run Apache RAT
run: |
java -jar apache-rat-0.16.1.jar -d . -E .rat-excludes | grep "== File:" && echo "The files listed above are missing license headers." && exit 1 || echo "All files have license headers."
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -52,3 +52,6 @@ package-lock.json
/cypress*

.factorypath

# Apache RAT check excludes file
!.rat-excludes
100 changes: 100 additions & 0 deletions .rat-excludes
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
# .rat-excludes
.rat-excludes
# DISCLAIMER-WIP
DISCLAIMER-WIP
# apps-integration-tests/integration-tests-data-index-service/integration-tests-data-index-service-common/src/main/resources/approval.bpmn
approval.bpmn
# apps-integration-tests/integration-tests-data-index-service/integration-tests-data-index-service-quarkus/src/main/resources/META-INF/processSVG/approvals.svg
approvals.svg
# apps-integration-tests/integration-tests-data-index-service/integration-tests-data-index-service-quarkus/src/test/resources/approval.bpmn
approval.bpmn
# apps-integration-tests/integration-tests-jobs-service/integration-tests-jobs-service-common/src/main/resources/org/acme/processes/MultipleTimerInstancesBoundaryTimerEvent.bpmn
MultipleTimerInstancesBoundaryTimerEvent.bpmn
# apps-integration-tests/integration-tests-jobs-service/integration-tests-jobs-service-common/src/main/resources/org/acme/processes/MultipleTimerInstancesTimerEvent.bpmn
MultipleTimerInstancesTimerEvent.bpmn
# apps-integration-tests/integration-tests-jobs-service/integration-tests-jobs-service-common/src/main/resources/org/acme/travels/async.bpmn
async.bpmn
# apps-integration-tests/integration-tests-jobs-service/integration-tests-jobs-service-common/src/main/resources/org/acme/travels/timer-on-task.bpmn
timer-on-task.bpmn
# apps-integration-tests/integration-tests-jobs-service/integration-tests-jobs-service-common/src/main/resources/org/acme/travels/timers.bpmn
timers.bpmn
# apps-integration-tests/integration-tests-jobs-service/integration-tests-jobs-service-common/src/main/resources/org/acme/travels/timersCycle.bpmn
timersCycle.bpmn
# apps-integration-tests/integration-tests-trusty-service/integration-tests-trusty-service-common/src/main/resources/TrafficViolation.dmn
TrafficViolation.dmn
# data-audit/data-audit-common/src/main/resources/META-INF/data-audit-job-query.graphqls
data-audit-job-query.graphqls
# data-audit/data-audit-common/src/main/resources/META-INF/data-audit-process-query.graphqls
data-audit-process-query.graphqls
# data-audit/data-audit-common/src/main/resources/META-INF/data-audit-types.graphqls
data-audit-types.graphqls
# data-audit/data-audit-common/src/main/resources/META-INF/data-audit-usertask-query.graphqls
data-audit-usertask-query.graphqls
# data-audit/kogito-addons-data-audit-jpa/kogito-addons-data-audit-jpa-common/src/main/resources/META-INF/data-audit-orm.xml
data-audit-orm.xml
# data-audit/kogito-addons-data-audit-jpa/kogito-addons-data-audit-jpa-common/src/main/resources/META-INF/services/org.kie.kogito.app.audit.spi.DataAuditStore
org.kie.kogito.app.audit.spi.DataAuditStore
# data-audit/kogito-addons-data-audit-jpa/kogito-addons-data-audit-jpa-common/src/main/resources/META-INF/services/org.kie.kogito.app.audit.spi.GraphQLSchemaQueryProvider
org.kie.kogito.app.audit.spi.GraphQLSchemaQueryProvider
# data-audit/kogito-addons-data-audit-springboot/src/test/resources/application.properties
application.properties
# data-index/data-index-graphql/src/main/resources/basic.schema.graphqls
basic.schema.graphqls
# data-index/data-index-service/data-index-service-common/src/main/resources/domain.schema.graphqls
domain.schema.graphqls
# data-index/kogito-addons-quarkus-data-index/kogito-addons-quarkus-data-index-infinispan/integration-tests-process/src/main/resources/hello.bpmn
hello.bpmn
# data-index/kogito-addons-quarkus-data-index/kogito-addons-quarkus-data-index-infinispan/integration-tests-process/src/main/resources/META-INF/processSVG/hello.svg
hello.svg
# data-index/kogito-addons-quarkus-data-index/kogito-addons-quarkus-data-index-inmemory/integration-tests-process/src/main/resources/hello.bpmn
hello.bpmn
# data-index/kogito-addons-quarkus-data-index/kogito-addons-quarkus-data-index-inmemory/integration-tests-process/src/main/resources/META-INF/processSVG/hello.svg
hello.svg
# data-index/kogito-addons-quarkus-data-index/kogito-addons-quarkus-data-index-jpa/integration-tests-process/src/main/resources/hello.bpmn
hello.bpmn
# data-index/kogito-addons-quarkus-data-index/kogito-addons-quarkus-data-index-jpa/integration-tests-process/src/main/resources/META-INF/processSVG/hello.svg
hello.svg
# data-index/kogito-addons-quarkus-data-index/kogito-addons-quarkus-data-index-mongodb/integration-tests-process/src/main/resources/hello.bpmn
hello.bpmn
# data-index/kogito-addons-quarkus-data-index/kogito-addons-quarkus-data-index-mongodb/integration-tests-process/src/main/resources/META-INF/processSVG/hello.svg
hello.svg
# data-index/kogito-addons-quarkus-data-index/kogito-addons-quarkus-data-index-postgresql/integration-tests-process/src/main/resources/hello.bpmn
hello.bpmn
# data-index/kogito-addons-quarkus-data-index/kogito-addons-quarkus-data-index-postgresql/integration-tests-process/src/main/resources/META-INF/processSVG/hello.svg
hello.svg
# data-index/kogito-addons-quarkus-data-index-persistence/kogito-addons-quarkus-data-index-persistence-infinispan/integration-tests-process/src/main/resources/hello.bpmn
hello.bpmn
# data-index/kogito-addons-quarkus-data-index-persistence/kogito-addons-quarkus-data-index-persistence-jpa/integration-tests-process/src/main/resources/hello.bpmn
hello.bpmn
# data-index/kogito-addons-quarkus-data-index-persistence/kogito-addons-quarkus-data-index-persistence-jpa/integration-tests-process/src/main/resources/META-INF/processSVG/hello.svg
hello.svg
# data-index/kogito-addons-quarkus-data-index-persistence/kogito-addons-quarkus-data-index-persistence-mongodb/integration-tests-process/src/main/resources/hello.bpmn
hello.bpmn
# data-index/kogito-addons-quarkus-data-index-persistence/kogito-addons-quarkus-data-index-persistence-postgresql/integration-tests-process/src/main/resources/hello.bpmn
hello.bpmn
# explainability/explainability-service/src/test/resources/mockito-extensions/org.mockito.plugins.MockMaker
org.mockito.plugins.MockMaker
# jitexecutor/jitexecutor-bpmn/src/test/resources/MultipleInvalidModel.bpmn2
MultipleInvalidModel.bpmn2
# jitexecutor/jitexecutor-bpmn/src/test/resources/MultipleProcess.bpmn2
MultipleProcess.bpmn2
# jitexecutor/jitexecutor-bpmn/src/test/resources/SingleInvalidModel.bpmn2
SingleInvalidModel.bpmn2
# jitexecutor/jitexecutor-bpmn/src/test/resources/SingleProcess.bpmn
SingleProcess.bpmn
# jitexecutor/jitexecutor-bpmn/src/test/resources/SingleProcess.bpmn2
SingleProcess.bpmn2
# jitexecutor/jitexecutor-bpmn/src/test/resources/SingleUnparsableModel.bpmn2
SingleUnparsableModel.bpmn2
# jitexecutor/jitexecutor-bpmn/src/test/resources/UnparsableModel.bpmn2
UnparsableModel.bpmn2
# jitexecutor/jitexecutor-bpmn/src/test/resources/ValidModel.bpmn
ValidModel.bpmn
# jitexecutor/jitexecutor-dmn/src/main/resources/META-INF/resources/bundle.js
bundle.js
# jobs-service/kogito-addons-jobs-service/kogito-addons-quarkus-jobs/src/test/resources/application.properties
application.properties
# jobs-service/kogito-addons-jobs-service/kogito-addons-quarkus-jobs-service-embedded/runtime/src/main/resources/META-INF/services/org.eclipse.microprofile.config.spi.ConfigSource
org.eclipse.microprofile.config.spi.ConfigSource
# trusty/trusty-service/trusty-service-common/src/test/resources/mockito-extensions/org.mockito.plugins.MockMaker
org.mockito.plugins.MockMaker
Original file line number Diff line number Diff line change
@@ -1,4 +1,22 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!--
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.
-->
<entity-mappings xmlns="http://xmlns.jcp.org/xml/ns/persistence/orm"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/persistence/orm http://xmlns.jcp.org/xml/ns/persistence/orm_2_2.xsd"
Expand Down
Loading

0 comments on commit d612491

Please sign in to comment.