From a7a38e205896e26b92c52cc239d18feb0b47ca8d Mon Sep 17 00:00:00 2001 From: Blake Bender Date: Thu, 14 Jan 2021 13:12:28 -0800 Subject: [PATCH] Add license and/or exclusion as appropriate to pass RAT check (#4) Co-authored-by: Blake Bender --- .ratignore | 3 +++ ci/lib/templates.lib.txt | 9 +++++++++ ci/lib/templates.lib.yml | 2 ++ docker/windows/Dockerfile | 16 ++++++++++++++++ packer/windows/2016/aws/startup.ps1 | 15 +++++++++++++++ packer/windows/2019/aws/startup.ps1 | 15 +++++++++++++++ 6 files changed, 60 insertions(+) diff --git a/.ratignore b/.ratignore index dbf556f412..c40208a894 100644 --- a/.ratignore +++ b/.ratignore @@ -23,6 +23,9 @@ package-list .*\.md .*\.md.erb +# docker/ +bellsoft.repo + # contrib/pdxautoserializer # public domain sources CPPDictionary.hpp diff --git a/ci/lib/templates.lib.txt b/ci/lib/templates.lib.txt index d76c74cae7..07f4b7c4fc 100644 --- a/ci/lib/templates.lib.txt +++ b/ci/lib/templates.lib.txt @@ -128,6 +128,15 @@ cmake ../source -DCMAKE_EXPORT_COMPILE_COMMANDS=ON >>${log} 2>&1 || (cat ${log}; jq -r '.[].file' compile_commands.json | sort | uniq | grep -v $(pwd) | xargs clang-format --dry-run -Werror (@- end @) +(@ def rat_check_bash_task(): -@) +set -ueo pipefail +export GEODE_HOME=$(pwd)/geode/expanded/apache-geode-$(cat geode/version) +log=$(mktemp) +cd build +cmake ../source -DUSE_RAT=ON >>${log} 2>&1 || (cat ${log}; exit 1) +cmake --build . --target rat-check +(@- end @) + (@ def packer_build_bash_task(build): -@) set -ueo pipefail cd source/packer diff --git a/ci/lib/templates.lib.yml b/ci/lib/templates.lib.yml index 1b07bce736..553853e852 100644 --- a/ci/lib/templates.lib.yml +++ b/ci/lib/templates.lib.yml @@ -32,6 +32,7 @@ #@ "run_net_legacy_integration_tests", #@ "clang_tidy_bash_task", #@ "clang_format_bash_task", +#@ "rat_check_bash_task", #@ "packer_build_bash_task", #@ "instance_create_bash_task", #@ "instance_delete_bash_task", @@ -442,6 +443,7 @@ plan: steps: - #@ bash_task("clang-tidy", [{"name":"source"}, {"name":"geode"}], [{"name":"build"}], clang_tidy_bash_task(), "clang-tools-image") - #@ bash_task("clang-format", [{"name":"source"}, {"name":"geode"}], [{"name":"build"}], clang_format_bash_task(), "clang-tools-image") + - #@ bash_task("rat-check", [{"name":"source"}, {"name":"geode"}], [{"name":"build"}], rat_check_bash_task(), "clang-tools-image") #@ end --- diff --git a/docker/windows/Dockerfile b/docker/windows/Dockerfile index e021a395d8..f9c8e66de2 100644 --- a/docker/windows/Dockerfile +++ b/docker/windows/Dockerfile @@ -1,3 +1,19 @@ +# 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. + # escape=` # .NET 3.5 is required for NUnit 2.6 only. diff --git a/packer/windows/2016/aws/startup.ps1 b/packer/windows/2016/aws/startup.ps1 index 68755b06e3..86ba8fabcf 100644 --- a/packer/windows/2016/aws/startup.ps1 +++ b/packer/windows/2016/aws/startup.ps1 @@ -1,4 +1,19 @@ +# 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. write-output "Running User Data Script" write-host "(host) Running User Data Script" diff --git a/packer/windows/2019/aws/startup.ps1 b/packer/windows/2019/aws/startup.ps1 index bfeb680cff..fbec752b17 100644 --- a/packer/windows/2019/aws/startup.ps1 +++ b/packer/windows/2019/aws/startup.ps1 @@ -1,4 +1,19 @@ +# 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. write-output "Running User Data Script" write-host "(host) Running User Data Script"