Skip to content

Commit

Permalink
kie-issues#1613: Add CI :: License headers GitHub Actions workflow (a…
Browse files Browse the repository at this point in the history
…pache#3714)

* Add license header

* Revert "Add license header"

This reverts commit 00cfcc5.

* Add license header

* revert beans.xml

* .rat-excludes and rat check action

* remove checkstyle.header.template

* OMG BPMN SPEC files license

* .rat-excludes fix format - escaping

* .rat-excludes

* storage-jpa license

* apache rat 17

* fix exit logic

* print rat check output

* align with other PRs of kie-issues#1613

* license text placeholder

* LICENSE SPEC

* Revert "LICENSE SPEC"

This reverts commit 3e4e2f8.

* List explicitely all files in the .rat-excludes

* Use apache-rat v0.16.1

* Everthing -> Everything

* BPMN LICENSE text

* CI :: License headers

* kogito-codegen-modules/kogito-codegen-processes-integration-tests/src/test/resources

* .bpmn[2] files
  • Loading branch information
jomarko committed Nov 29, 2024
1 parent da8c292 commit d213840
Show file tree
Hide file tree
Showing 13 changed files with 580 additions and 62 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."
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

0 comments on commit d213840

Please sign in to comment.