From 72a59f5826b8decf4395cd0b79896b4785a7bee8 Mon Sep 17 00:00:00 2001 From: Jeff Grafton Date: Thu, 15 Feb 2018 18:02:24 -0800 Subject: [PATCH] Require boilerplate on Bazel Skylark source files --- build/openapi.bzl | 15 +++++++++++++++ hack/boilerplate/boilerplate.bzl.txt | 14 ++++++++++++++ pkg/generated/openapi/def.bzl | 14 ++++++++++++++ pkg/version/def.bzl | 14 ++++++++++++++ staging/src/k8s.io/client-go/pkg/version/def.bzl | 14 ++++++++++++++ 5 files changed, 71 insertions(+) create mode 100644 hack/boilerplate/boilerplate.bzl.txt diff --git a/build/openapi.bzl b/build/openapi.bzl index 4b673e28ac..455baaff95 100644 --- a/build/openapi.bzl +++ b/build/openapi.bzl @@ -1,3 +1,17 @@ +# Copyright 2017 The Kubernetes Authors. +# +# Licensed 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. + # A project wanting to generate openapi code for vendored # k8s.io/kubernetes will need to set the following variables in # //build/openapi.bzl in their project and customize the go prefix: @@ -6,4 +20,5 @@ # openapi_vendor_prefix = "vendor/k8s.io/kubernetes/" openapi_go_prefix = "k8s.io/kubernetes/" + openapi_vendor_prefix = "" diff --git a/hack/boilerplate/boilerplate.bzl.txt b/hack/boilerplate/boilerplate.bzl.txt new file mode 100644 index 0000000000..384f325abf --- /dev/null +++ b/hack/boilerplate/boilerplate.bzl.txt @@ -0,0 +1,14 @@ +# Copyright YEAR The Kubernetes Authors. +# +# Licensed 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. + diff --git a/pkg/generated/openapi/def.bzl b/pkg/generated/openapi/def.bzl index 87fa23acd1..dcb894282f 100644 --- a/pkg/generated/openapi/def.bzl +++ b/pkg/generated/openapi/def.bzl @@ -1,3 +1,17 @@ +# Copyright 2017 The Kubernetes Authors. +# +# Licensed 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. + load("@io_bazel_rules_go//go:def.bzl", "go_library") load("@io_kubernetes_build//defs:go.bzl", "go_genrule") diff --git a/pkg/version/def.bzl b/pkg/version/def.bzl index bca85ab4b5..9c018a4ef7 100644 --- a/pkg/version/def.bzl +++ b/pkg/version/def.bzl @@ -1,3 +1,17 @@ +# Copyright 2017 The Kubernetes Authors. +# +# Licensed 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. + # Implements hack/lib/version.sh's kube::version::ldflags() for Bazel. def version_x_defs(): # This should match the list of packages in kube::version::ldflag diff --git a/staging/src/k8s.io/client-go/pkg/version/def.bzl b/staging/src/k8s.io/client-go/pkg/version/def.bzl index bca85ab4b5..9c018a4ef7 100644 --- a/staging/src/k8s.io/client-go/pkg/version/def.bzl +++ b/staging/src/k8s.io/client-go/pkg/version/def.bzl @@ -1,3 +1,17 @@ +# Copyright 2017 The Kubernetes Authors. +# +# Licensed 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. + # Implements hack/lib/version.sh's kube::version::ldflags() for Bazel. def version_x_defs(): # This should match the list of packages in kube::version::ldflag