Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

kie-issues#1613: Add CI :: License headers GitHub Actions workflow #3714

Open
wants to merge 27 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
00cfcc5
Add license header
jomarko Oct 10, 2024
eb60175
Revert "Add license header"
jomarko Oct 10, 2024
5727aeb
Add license header
jomarko Oct 10, 2024
2dd019c
revert beans.xml
jomarko Oct 11, 2024
012973d
Merge branch 'main' into runtimes-license
jomarko Nov 15, 2024
a83d727
.rat-excludes and rat check action
jomarko Nov 15, 2024
1361fed
remove checkstyle.header.template
jomarko Nov 15, 2024
8ac99a2
OMG BPMN SPEC files license
jomarko Nov 15, 2024
ab721ea
.rat-excludes fix format - escaping
jomarko Nov 15, 2024
360aa1e
.rat-excludes
jomarko Nov 15, 2024
bcd348d
storage-jpa license
jomarko Nov 15, 2024
906228d
apache rat 17
jomarko Nov 15, 2024
f4d6031
fix exit logic
jomarko Nov 15, 2024
ee0d2e9
print rat check output
jomarko Nov 15, 2024
3a59917
align with other PRs of kie-issues#1613
jomarko Nov 18, 2024
46927e6
license text placeholder
jomarko Nov 18, 2024
3e4e2f8
LICENSE SPEC
jomarko Nov 18, 2024
28d419e
Revert "LICENSE SPEC"
jomarko Nov 18, 2024
0a6bcaa
List explicitely all files in the .rat-excludes
jomarko Nov 21, 2024
8e0651d
Use apache-rat v0.16.1
jomarko Nov 21, 2024
62e9a72
Everthing -> Everything
jomarko Nov 21, 2024
b78016f
BPMN LICENSE text
jomarko Nov 21, 2024
4780813
Merge branch 'main' into runtimes-license
jomarko Nov 22, 2024
a217085
CI :: License headers
jomarko Nov 22, 2024
d0e2f80
kogito-codegen-modules/kogito-codegen-processes-integration-tests/src…
jomarko Nov 22, 2024
e376fd9
.bpmn[2] files
jomarko Nov 25, 2024
a6cac6b
Merge branch 'main' into runtimes-license
jomarko Nov 26, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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."
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -40,4 +40,7 @@ target/
.run/
.checkstyle

*.log
*.log

# Apache RAT check excludes file
!.rat-excludes
220 changes: 220 additions & 0 deletions .rat-excludes
Original file line number Diff line number Diff line change
@@ -0,0 +1,220 @@
# .rat-excludes
.rat-excludes
# DISCLAIMER-WIP
DISCLAIMER-WIP
# addons/common/jbpm-usertask-storage-jpa/src/main/resources/META-INF/beans.xml
beans.xml
# addons/common/marshallers/avro/src/main/resources/jsonNode.avsc
jsonNode.avsc
# addons/common/marshallers/avro/src/main/resources/spec.avsc
spec.avsc
# addons/common/marshallers/avro/src/test/avro/pojo.avsc
pojo.avsc
# addons/common/monitoring/prometheus/src/main/resources/META-INF/kogito.addon
kogito.addon
# addons/common/persistence/filesystem/src/main/resources/META-INF/kogito.addon
kogito.addon
# addons/common/persistence/infinispan/src/main/resources/META-INF/kogito.addon
kogito.addon
# addons/common/persistence/jdbc/src/main/resources/META-INF/kogito.addon
kogito.addon
# addons/common/persistence/mongodb/src/main/resources/META-INF/kogito.addon
kogito.addon
# addons/common/persistence/postgresql/src/main/resources/META-INF/kogito.addon
kogito.addon
# addons/common/persistence/rocksdb/src/main/resources/META-INF/kogito.addon
kogito.addon
# api/kogito-events-core/src/main/resources/META-INF/services/com.fasterxml.jackson.databind.Module
com.fasterxml.jackson.databind.Module
# api/kogito-events-core/src/main/resources/META-INF/services/org.kie.kogito.event.impl.adapter.DataEventAdapter
org.kie.kogito.event.impl.adapter.DataEventAdapter
# jbpm/jbpm-bpmn2/src/main/resources/META-INF/BPMN20.xsd
BPMN20.xsd
# jbpm/jbpm-bpmn2/src/main/resources/META-INF/BPMNDI.xsd
BPMNDI.xsd
# jbpm/jbpm-bpmn2/src/main/resources/META-INF/DC.xsd
DC.xsd
# jbpm/jbpm-bpmn2/src/main/resources/META-INF/DI.xsd
DI.xsd
# jbpm/jbpm-bpmn2/src/main/resources/META-INF/DiagramDefinition.xsd
DiagramDefinition.xsd
# jbpm/jbpm-bpmn2/src/main/resources/META-INF/DiagramInterchange.xsd
DiagramInterchange.xsd
# jbpm/jbpm-bpmn2/src/main/resources/META-INF/Semantic.xsd
Semantic.xsd
# jbpm/jbpm-bpmn2/src/main/resources/META-INF/bpsim.xsd
bpsim.xsd
# jbpm/jbpm-bpmn2/src/main/xsd/BPMN20.xsd
BPMN20.xsd
# jbpm/jbpm-bpmn2/src/main/xsd/BPMNDI.xsd
BPMNDI.xsd
# jbpm/jbpm-bpmn2/src/main/xsd/DC.xsd
DC.xsd
# jbpm/jbpm-bpmn2/src/main/xsd/DI.xsd
DI.xsd
# jbpm/jbpm-bpmn2/src/main/xsd/DiagramDefinition.xsd
DiagramDefinition.xsd
# jbpm/jbpm-bpmn2/src/main/xsd/DiagramInterchange.xsd
DiagramInterchange.xsd
# jbpm/jbpm-bpmn2/src/main/xsd/Semantic.xsd
Semantic.xsd
# jbpm/jbpm-bpmn2/src/main/xsd/bpsim.xsd
bpsim.xsd
# jbpm/jbpm-flow/src/main/resources/META-INF/services/org.jbpm.ruleflow.core.factory.provider.NodeFactoryProvider
org.jbpm.ruleflow.core.factory.provider.NodeFactoryProvider
# jbpm/jbpm-flow-builder/src/main/resources/META-INF/services/org.jbpm.compiler.canonical.builtin.ReturnValueEvaluatorBuilder
org.jbpm.compiler.canonical.builtin.ReturnValueEvaluatorBuilder
# jbpm/jbpm-flow-builder/src/main/resources/META-INF/services/org.jbpm.compiler.canonical.node.NodeVisitorBuilder
org.jbpm.compiler.canonical.node.NodeVisitorBuilder
# jbpm/jbpm-flow-builder/src/main/resources/META-INF/services/org.jbpm.process.builder.transformation.DataTransformerCompiler
org.jbpm.process.builder.transformation.DataTransformerCompiler
# jbpm/jbpm-flow-migration/src/test/resources/META-INF/migration-plan/simple_invalid_migration.invalid
simple_invalid_migration.invalid
# jbpm/jbpm-flow-migration/src/test/resources/META-INF/migration-plan/simple_migration.mpf
simple_migration.mpf
# jbpm/jbpm-flow-migration/src/test/resources/META-INF/migration-plan/simple_migration_version.mpf
simple_migration_version.mpf
# jbpm/jbpm-tests/src/test/resources/calendar.properties
calendar.properties
# jbpm/jbpm-tests/src/test/resources/xxe-protection/Text1.txt
Text1.txt
# jbpm/jbpm-tests/src/test/resources/xxe-protection/Text2.txt
Text2.txt
# jbpm/jbpm-usertask-workitem/src/main/resources/META-INF/services/org.kie.kogito.internal.process.workitem.KogitoWorkItemHandlerFactory
org.kie.kogito.internal.process.workitem.KogitoWorkItemHandlerFactory
# jbpm/process-workitems/src/main/resources/META-INF/services/org.kie.kogito.internal.process.workitem.KogitoWorkItemHandlerFactory
org.kie.kogito.internal.process.workitem.KogitoWorkItemHandlerFactory
# kogito-codegen-modules/kogito-codegen-core/src/test/resources/.a-hidden-file.txt
.a-hidden-file.txt
# kogito-codegen-modules/kogito-codegen-processes-integration-tests/src/test/resources/META-INF/kogito.addon
kogito.addon
# kogito-codegen-modules/kogito-codegen-processes-integration-tests/src/test/resources/org/kie/kogito/codegen/process/process-generation-test.skip.txt
process-generation-test.skip.txt
# kogito-codegen-modules/kogito-codegen-sample/kogito-codegen-sample-generator/src/test/resources/sampleFile1.txt
sampleFile1.txt
# kogito-codegen-modules/kogito-codegen-sample/kogito-codegen-sample-generator/src/test/resources/sampleFile2.txt
sampleFile2.txt
# kogito-serverless-workflow/kogito-serverless-workflow-builder/src/test/resources/pepe a pepa.txt
pepe a pepa.txt
# kogito-serverless-workflow/kogito-serverless-workflow-executor-python/requirements.txt
requirements.txt
# kogito-serverless-workflow/kogito-serverless-workflow-executor-tests/src/test/resources/logback.xml
logback.xml
# quarkus/addons/dynamic/integration-tests/src/main/resources/application.properties
application.properties
# quarkus/addons/dynamic/runtime/src/main/resources/META-INF/kogito.addon
kogito.addon
# quarkus/addons/events/decisions/runtime/src/main/resources/META-INF/kogito.addon
kogito.addon
# quarkus/addons/events/predictions/runtime/src/main/resources/META-INF/kogito.addon
kogito.addon
# quarkus/addons/events/rules/runtime/src/main/resources/META-INF/kogito.addon
kogito.addon
# quarkus/addons/explainability/runtime/src/main/resources/META-INF/kogito.addon
kogito.addon
# quarkus/addons/jbpm-usertask-storage-jpa/runtime/src/test/resources/META-INF/beans.xml
beans.xml
# quarkus/addons/jobs/knative-eventing/runtime/src/main/resources/META-INF/kogito.addon
kogito.addon
# quarkus/addons/jobs/management/runtime/src/main/resources/META-INF/kogito.addon
kogito.addon
# quarkus/addons/jobs/messaging/runtime/src/main/resources/META-INF/kogito.addon
kogito.addon
# quarkus/addons/knative/eventing/runtime/src/main/resources/META-INF/kogito.addon
kogito.addon
# quarkus/addons/knative/serving/runtime/src/main/resources/META-INF/kogito.addon
kogito.addon
# quarkus/addons/kubernetes/runtime/src/main/resources/META-INF/kogito.addon
kogito.addon
# quarkus/addons/mail/runtime/src/main/resources/META-INF/kogito.addon
kogito.addon
# quarkus/addons/messaging/common/src/main/resources/META-INF/kogito.addon
kogito.addon
# quarkus/addons/messaging/runtime/src/main/resources/META-INF/kogito.addon
kogito.addon
# quarkus/addons/microprofile-config-service-catalog/runtime/src/main/resources/META-INF/kogito.addon
kogito.addon
# quarkus/addons/monitoring/core/src/main/resources/META-INF/kogito.addon
kogito.addon
# quarkus/addons/monitoring/elastic/runtime/src/main/resources/META-INF/kogito.addon
kogito.addon
# quarkus/addons/monitoring/prometheus/runtime/src/main/resources/META-INF/kogito.addon
kogito.addon
# quarkus/addons/persistence/kafka/runtime/src/main/resources/META-INF/kogito.addon
kogito.addon
# quarkus/addons/process-definitions/runtime/src/main/resources/META-INF/kogito.addon
kogito.addon
# quarkus/addons/process-management/runtime/src/main/resources/META-INF/kogito.addon
kogito.addon
# quarkus/addons/process-svg/runtime/src/main/resources/META-INF/kogito.addon
kogito.addon
# quarkus/addons/python/integration-tests/requirements.txt
requirements.txt
# quarkus/addons/source-files/runtime/src/main/resources/META-INF/kogito.addon
kogito.addon
# quarkus/addons/task-management/runtime/src/main/resources/META-INF/kogito.addon
kogito.addon
# quarkus/addons/task-notification/runtime/src/main/resources/META-INF/kogito.addon
kogito.addon
# quarkus/addons/tracing-decision/runtime/src/main/resources/META-INF/kogito.addon
kogito.addon
# quarkus/extensions/kogito-quarkus-decisions-extension/kogito-quarkus-decisions-integration-test-hot-reload/src/test/resources/TrafficViolation.txt
TrafficViolation.txt
# quarkus/extensions/kogito-quarkus-decisions-extension/kogito-quarkus-decisions-integration-test-hot-reload/src/test/resources/adult.txt
adult.txt
# quarkus/extensions/kogito-quarkus-rules-extension/kogito-quarkus-rules-integration-test-hot-reload/src/test/resources/adult.txt
adult.txt
# quarkus/extensions/kogito-quarkus-rules-extension/kogito-quarkus-rules-integration-test-hot-reload/src/test/resources/drl1.txt
drl1.txt
# quarkus/extensions/kogito-quarkus-serverless-workflow-extension/kogito-quarkus-serverless-workflow-integration-test/src/main/resources/long-call.sw.yaml
long-call.sw.yaml
# quarkus/extensions/kogito-quarkus-serverless-workflow-extension/kogito-quarkus-serverless-workflow-integration-test/src/test/resources/__snapshots__/ServerlessWorkflowCodestartTest/testContent/src_test_resources_application.yml
src_test_resources_application.yml
# quarkus/integration-tests/integration-tests-quarkus-rules/src/test/resources/LoanUnit.xls.properties.test
LoanUnit.xls.properties.test
# springboot/addons/events/decisions/src/main/resources/META-INF/kogito.addon
kogito.addon
# springboot/addons/events/predictions/src/main/resources/META-INF/kogito.addon
kogito.addon
# springboot/addons/explainability/src/main/resources/META-INF/kogito.addon
kogito.addon
# springboot/addons/flyway/src/main/resources/META-INF/beans.xml
beans.xml
# springboot/addons/jbpm-usertask-storage-jpa/src/main/resources/META-INF/beans.xml
beans.xml
# springboot/addons/jobs/src/main/resources/META-INF/kogito.addon
kogito.addon
# springboot/addons/kubernetes/src/main/resources/META-INF/kogito.addon
kogito.addon
# springboot/addons/mail/src/main/resources/META-INF/kogito.addon
kogito.addon
# springboot/addons/messaging/implementation/src/main/resources/META-INF/kogito.addon
kogito.addon
# springboot/addons/monitoring/core/src/main/resources/META-INF/kogito.addon
kogito.addon
# springboot/addons/monitoring/elastic/src/main/resources/META-INF/kogito.addon
kogito.addon
# springboot/addons/monitoring/prometheus/src/main/resources/META-INF/kogito.addon
kogito.addon
# springboot/addons/process-management/src/main/resources/META-INF/kogito.addon
kogito.addon
# springboot/addons/process-svg/src/main/resources/META-INF/kogito.addon
kogito.addon
# springboot/addons/task-management/src/main/resources/META-INF/kogito.addon
kogito.addon
# springboot/addons/task-notification/src/main/resources/META-INF/kogito.addon
kogito.addon
# springboot/addons/tracing-decision/src/main/resources/META-INF/kogito.addon
kogito.addon
# springboot/archetype/src/test/resources/projects/it-basic/goal.txt
goal.txt
# springboot/archetype/src/test/resources/projects/it-custom-decisions/goal.txt
goal.txt
# springboot/archetype/src/test/resources/projects/it-custom-process/goal.txt
goal.txt
# springboot/integration-tests/integration-tests-springboot-kafka-it/.gitignore
.gitignore
# springboot/integration-tests/integration-tests-springboot-processes-it/.gitignore
.gitignore
# springboot/integration-tests/integration-tests-springboot-processes-persistence-it/integration-tests-springboot-processes-persistence-common/.gitignore
.gitignore
Loading