From c4d86703c5c67e56620d04609021f96c9f230eab Mon Sep 17 00:00:00 2001 From: Daniel Sanche Date: Wed, 15 Jul 2020 11:56:37 -0700 Subject: [PATCH] Add licenses (#367) --- .github/workflows/README.md | 13 +++++++++++ .github/workflows/ci.yml | 22 +++++++++++++++++++ cloudbuild.yaml | 14 ++++++++++++ pb/demo.proto | 14 ++++++++++++ src/adservice/Dockerfile | 14 ++++++++++++ src/adservice/src/main/proto/demo.proto | 14 ++++++++++++ src/adservice/src/main/resources/log4j2.xml | 16 ++++++++++++++ src/cartservice/Dockerfile | 14 ++++++++++++ src/cartservice/HealthImpl.cs | 14 ++++++++++++ src/cartservice/grpc_generated/Demo.cs | 14 ++++++++++++ src/cartservice/grpc_generated/DemoGrpc.cs | 14 ++++++++++++ src/checkoutservice/Dockerfile | 14 ++++++++++++ src/checkoutservice/genproto/demo.pb.go | 14 ++++++++++++ src/currencyservice/Dockerfile | 14 ++++++++++++ src/currencyservice/proto/demo.proto | 14 ++++++++++++ src/emailservice/Dockerfile | 14 ++++++++++++ src/emailservice/templates/confirmation.html | 16 ++++++++++++++ src/frontend/Dockerfile | 14 ++++++++++++ src/frontend/genproto/demo.pb.go | 14 ++++++++++++ src/frontend/static/styles/cart.css | 16 ++++++++++++++ src/frontend/static/styles/order.css | 16 ++++++++++++++ src/frontend/static/styles/styles.css | 16 ++++++++++++++ src/frontend/templates/ad.html | 16 ++++++++++++++ src/frontend/templates/cart.html | 16 ++++++++++++++ src/frontend/templates/error.html | 16 ++++++++++++++ src/frontend/templates/footer.html | 16 ++++++++++++++ src/frontend/templates/header.html | 16 ++++++++++++++ src/frontend/templates/home.html | 16 ++++++++++++++ src/frontend/templates/order.html | 16 ++++++++++++++ src/frontend/templates/product.html | 16 ++++++++++++++ src/frontend/templates/recommendations.html | 16 ++++++++++++++ src/loadgenerator/Dockerfile | 14 ++++++++++++ src/paymentservice/Dockerfile | 14 ++++++++++++ src/paymentservice/proto/demo.proto | 14 ++++++++++++ src/productcatalogservice/Dockerfile | 14 ++++++++++++ src/productcatalogservice/genproto/demo.pb.go | 14 ++++++++++++ src/recommendationservice/Dockerfile | 14 ++++++++++++ src/recommendationservice/demo_pb2.py | 14 ++++++++++++ src/recommendationservice/demo_pb2_grpc.py | 14 ++++++++++++ src/shippingservice/Dockerfile | 14 ++++++++++++ src/shippingservice/genproto/demo.pb.go | 14 ++++++++++++ 41 files changed, 609 insertions(+) diff --git a/.github/workflows/README.md b/.github/workflows/README.md index 43af343..7299882 100644 --- a/.github/workflows/README.md +++ b/.github/workflows/README.md @@ -13,6 +13,19 @@ # install kubectl sudo apt-get install kubectl + # install go + curl -O https://storage.googleapis.com/golang/go1.12.9.linux-amd64.tar.gz + tar -xvf go1.12.9.linux-amd64.tar.gz + sudo chown -R root:root ./go + sudo mv go /usr/local + echo 'export GOPATH=$HOME/go' >> ~/.profile + echo 'export PATH=$PATH:/usr/local/go/bin:$GOPATH/bin' >> ~/.profile + source ~/.profile + + # install addlicense + go get -u github.com/google/addlicense + sudo ln -s $HOME/go/bin/addlicense /bin + # install kind curl -Lo ./kind "https://github.com/kubernetes-sigs/kind/releases/download/v0.7.0/kind-$(uname)-amd64" && \ chmod +x ./kind && \ diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 4574b62..ca15143 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,3 +1,17 @@ +# Copyright 2020 Google LLC +# +# 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. + name: "Continuous Integration" on: push: @@ -14,6 +28,14 @@ jobs: runs-on: self-hosted steps: - uses: actions/checkout@v2 + - name: License Check + run: | + set -x + git init + git add --all + git -c user.name="CI Bot" -c user.email="<>" commit -m "initial state" + addlicense ./ + test -z $(git diff --name-only | tee /dev/stderr) - name: Setup Cluster run: | set -x diff --git a/cloudbuild.yaml b/cloudbuild.yaml index 2d031ce..793f452 100644 --- a/cloudbuild.yaml +++ b/cloudbuild.yaml @@ -1,3 +1,17 @@ +# Copyright 2020 Google LLC +# +# 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. + # This configuration file is used to build and deploy the app into a # GKE cluster using Google Cloud Build. # diff --git a/pb/demo.proto b/pb/demo.proto index 46e6b7c..e5981af 100644 --- a/pb/demo.proto +++ b/pb/demo.proto @@ -1,3 +1,17 @@ +// Copyright 2020 Google LLC +// +// 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. + syntax = "proto3"; package hipstershop; diff --git a/src/adservice/Dockerfile b/src/adservice/Dockerfile index e8fb46f..96cc2c8 100644 --- a/src/adservice/Dockerfile +++ b/src/adservice/Dockerfile @@ -1,3 +1,17 @@ +# Copyright 2020 Google LLC +# +# 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. + FROM openjdk:8-slim as builder WORKDIR /app diff --git a/src/adservice/src/main/proto/demo.proto b/src/adservice/src/main/proto/demo.proto index 46e6b7c..e5981af 100644 --- a/src/adservice/src/main/proto/demo.proto +++ b/src/adservice/src/main/proto/demo.proto @@ -1,3 +1,17 @@ +// Copyright 2020 Google LLC +// +// 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. + syntax = "proto3"; package hipstershop; diff --git a/src/adservice/src/main/resources/log4j2.xml b/src/adservice/src/main/resources/log4j2.xml index dbb8cb1..2a87a5c 100644 --- a/src/adservice/src/main/resources/log4j2.xml +++ b/src/adservice/src/main/resources/log4j2.xml @@ -1,4 +1,20 @@ + + diff --git a/src/cartservice/Dockerfile b/src/cartservice/Dockerfile index ad2b1c3..331deb0 100644 --- a/src/cartservice/Dockerfile +++ b/src/cartservice/Dockerfile @@ -1,3 +1,17 @@ +# Copyright 2020 Google LLC +# +# 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. + FROM microsoft/dotnet:2.1-sdk-alpine as builder WORKDIR /app COPY . . diff --git a/src/cartservice/HealthImpl.cs b/src/cartservice/HealthImpl.cs index 44290d1..72deebb 100644 --- a/src/cartservice/HealthImpl.cs +++ b/src/cartservice/HealthImpl.cs @@ -1,3 +1,17 @@ +// Copyright 2020 Google LLC +// +// 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. + using System; using System.Threading.Tasks; using cartservice.interfaces; diff --git a/src/cartservice/grpc_generated/Demo.cs b/src/cartservice/grpc_generated/Demo.cs index f196131..cf5e684 100644 --- a/src/cartservice/grpc_generated/Demo.cs +++ b/src/cartservice/grpc_generated/Demo.cs @@ -1,3 +1,17 @@ +// Copyright 2020 Google LLC +// +// 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. + // // Generated by the protocol buffer compiler. DO NOT EDIT! // source: demo.proto diff --git a/src/cartservice/grpc_generated/DemoGrpc.cs b/src/cartservice/grpc_generated/DemoGrpc.cs index fa263ae..65db2d1 100644 --- a/src/cartservice/grpc_generated/DemoGrpc.cs +++ b/src/cartservice/grpc_generated/DemoGrpc.cs @@ -1,3 +1,17 @@ +// Copyright 2020 Google LLC +// +// 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. + // // Generated by the protocol buffer compiler. DO NOT EDIT! // source: demo.proto diff --git a/src/checkoutservice/Dockerfile b/src/checkoutservice/Dockerfile index 8f0ea6d..9433f14 100644 --- a/src/checkoutservice/Dockerfile +++ b/src/checkoutservice/Dockerfile @@ -1,3 +1,17 @@ +# Copyright 2020 Google LLC +# +# 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. + FROM golang:1.12-alpine as builder RUN apk add --no-cache ca-certificates git && \ wget -qO/go/bin/dep https://github.com/golang/dep/releases/download/v0.5.0/dep-linux-amd64 && \ diff --git a/src/checkoutservice/genproto/demo.pb.go b/src/checkoutservice/genproto/demo.pb.go index f59af20..838624d 100644 --- a/src/checkoutservice/genproto/demo.pb.go +++ b/src/checkoutservice/genproto/demo.pb.go @@ -1,3 +1,17 @@ +// Copyright 2020 Google LLC +// +// 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. + // Code generated by protoc-gen-go. DO NOT EDIT. // source: demo.proto diff --git a/src/currencyservice/Dockerfile b/src/currencyservice/Dockerfile index 1e60cab..b7b0c09 100644 --- a/src/currencyservice/Dockerfile +++ b/src/currencyservice/Dockerfile @@ -1,3 +1,17 @@ +# Copyright 2020 Google LLC +# +# 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. + FROM node:8-alpine as base FROM base as builder diff --git a/src/currencyservice/proto/demo.proto b/src/currencyservice/proto/demo.proto index 46e6b7c..e5981af 100644 --- a/src/currencyservice/proto/demo.proto +++ b/src/currencyservice/proto/demo.proto @@ -1,3 +1,17 @@ +// Copyright 2020 Google LLC +// +// 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. + syntax = "proto3"; package hipstershop; diff --git a/src/emailservice/Dockerfile b/src/emailservice/Dockerfile index 725ea9d..59a86aa 100644 --- a/src/emailservice/Dockerfile +++ b/src/emailservice/Dockerfile @@ -1,3 +1,17 @@ +# Copyright 2020 Google LLC +# +# 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. + FROM python:3.7-slim as base FROM base as builder diff --git a/src/emailservice/templates/confirmation.html b/src/emailservice/templates/confirmation.html index 8e56fc6..4b1c7c8 100644 --- a/src/emailservice/templates/confirmation.html +++ b/src/emailservice/templates/confirmation.html @@ -1,4 +1,20 @@ + + Your Order Confirmation diff --git a/src/frontend/Dockerfile b/src/frontend/Dockerfile index 591a3ae..7716b50 100644 --- a/src/frontend/Dockerfile +++ b/src/frontend/Dockerfile @@ -1,3 +1,17 @@ +# Copyright 2020 Google LLC +# +# 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. + FROM golang:1.12-alpine as builder RUN apk add --no-cache ca-certificates git && \ wget -qO/go/bin/dep https://github.com/golang/dep/releases/download/v0.5.0/dep-linux-amd64 && \ diff --git a/src/frontend/genproto/demo.pb.go b/src/frontend/genproto/demo.pb.go index f59af20..838624d 100644 --- a/src/frontend/genproto/demo.pb.go +++ b/src/frontend/genproto/demo.pb.go @@ -1,3 +1,17 @@ +// Copyright 2020 Google LLC +// +// 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. + // Code generated by protoc-gen-go. DO NOT EDIT. // source: demo.proto diff --git a/src/frontend/static/styles/cart.css b/src/frontend/static/styles/cart.css index 5ec006f..9a1fbc9 100755 --- a/src/frontend/static/styles/cart.css +++ b/src/frontend/static/styles/cart.css @@ -1,3 +1,19 @@ +/** + * Copyright 2020 Google LLC + * + * 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. + */ + .cart-bg { background: #f0f0f0; } diff --git a/src/frontend/static/styles/order.css b/src/frontend/static/styles/order.css index 27b0b75..c6170f6 100755 --- a/src/frontend/static/styles/order.css +++ b/src/frontend/static/styles/order.css @@ -1,3 +1,19 @@ +/** + * Copyright 2020 Google LLC + * + * 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. + */ + .order { background: #f0f0f0; } diff --git a/src/frontend/static/styles/styles.css b/src/frontend/static/styles/styles.css index a3e3c23..c51a90f 100755 --- a/src/frontend/static/styles/styles.css +++ b/src/frontend/static/styles/styles.css @@ -1,3 +1,19 @@ +/** + * Copyright 2020 Google LLC + * + * 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. + */ + /* general */ html, body { diff --git a/src/frontend/templates/ad.html b/src/frontend/templates/ad.html index 56fe321..fe2af19 100755 --- a/src/frontend/templates/ad.html +++ b/src/frontend/templates/ad.html @@ -1,3 +1,19 @@ + + {{ define "text_ad" }}