Skip to content
This repository has been archived by the owner on Aug 2, 2023. It is now read-only.

Commit

Permalink
Update license checker for modules
Browse files Browse the repository at this point in the history
  • Loading branch information
kaczyns committed Jan 2, 2020
1 parent be35954 commit d192a17
Show file tree
Hide file tree
Showing 3 changed files with 108 additions and 75 deletions.
153 changes: 83 additions & 70 deletions 3RD_PARTY
Original file line number Diff line number Diff line change
@@ -1,70 +1,83 @@
Apache License 2.0
github.com/PuerkitoBio/purell BSD 3-clause "New" or "Revised" License
github.com/PuerkitoBio/urlesc BSD 3-clause "New" or "Revised" License (96%)
github.com/appscode/jsonpatch Apache License 2.0
github.com/beorn7/perks/quantile MIT License (98%)
github.com/blang/semver MIT License
github.com/coreos/go-semver/semver Apache License 2.0
github.com/davecgh/go-spew/spew ISC License (98%)
github.com/emicklei/go-restful/log MIT License
github.com/evanphx/json-patch BSD 3-clause "New" or "Revised" License (97%)
github.com/go-logr/logr Apache License 2.0
github.com/go-logr/zapr Apache License 2.0
github.com/go-openapi/jsonpointer Apache License 2.0
github.com/go-openapi/jsonreference Apache License 2.0
github.com/go-openapi/spec Apache License 2.0
github.com/go-openapi/swag Apache License 2.0
github.com/gogo/protobuf BSD 3-clause "New" or "Revised" License (91%)
github.com/golang/groupcache/lru Apache License 2.0
github.com/golang/protobuf BSD 3-clause "New" or "Revised" License (96%)
github.com/google/btree Apache License 2.0
github.com/google/go-cmp/cmp/internal BSD 3-clause "New" or "Revised" License (96%)
github.com/google/gofuzz Apache License 2.0
github.com/google/uuid BSD 3-clause "New" or "Revised" License (96%)
github.com/googleapis/gnostic Apache License 2.0
github.com/gregjones/httpcache/diskcache MIT License (98%)
github.com/hashicorp/golang-lru/simplelru Mozilla Public License 2.0
github.com/imdario/mergo BSD 3-clause "New" or "Revised" License (96%)
github.com/json-iterator/go MIT License
github.com/kabanero-io/manifestival Apache License 2.0
github.com/knative/pkg/apis Apache License 2.0
github.com/knative/serving-operator/pkg/apis/serving/v1alpha1 Apache License 2.0
github.com/mailru/easyjson MIT License (98%)
github.com/mattbaird/jsonpatch Apache License 2.0
github.com/matttproud/golang_protobuf_extensions/pbutil Apache License 2.0
github.com/modern-go/concurrent Apache License 2.0
github.com/modern-go/reflect2 Apache License 2.0
github.com/openshift-knative/knative-eventing-operator/pkg/apis/eventing/v1alpha1 Apache License 2.0
github.com/openshift/api/route/v1 Apache License 2.0
github.com/operator-framework/operator-lifecycle-manager/pkg/api/apis/operators/v1alpha1 Apache License 2.0
github.com/pborman/uuid BSD 3-clause "New" or "Revised" License (96%)
github.com/peterbourgon/diskv MIT License (98%)
github.com/pkg/errors BSD 2-clause "Simplified" License
github.com/prometheus/client_golang/prometheus Apache License 2.0
github.com/prometheus/client_model/go Apache License 2.0
github.com/prometheus/common Apache License 2.0
github.com/prometheus/procfs/internal/fs Apache License 2.0
github.com/spf13/pflag BSD 3-clause "New" or "Revised" License (96%)
github.com/tektoncd/operator/pkg/apis/operator/v1alpha1 Apache License 2.0
github.com/tektoncd/pipeline/pkg Apache License 2.0
go.uber.org/atomic MIT License (98%)
go.uber.org/multierr MIT License (98%)
go.uber.org/zap MIT License (98%)
golang.org/x/crypto/ssh/terminal BSD 3-clause "New" or "Revised" License (96%)
golang.org/x/net BSD 3-clause "New" or "Revised" License (96%)
golang.org/x/oauth2/internal BSD 3-clause "New" or "Revised" License (96%)
golang.org/x/sys/unix BSD 3-clause "New" or "Revised" License (96%)
golang.org/x/text BSD 3-clause "New" or "Revised" License (96%)
golang.org/x/time/rate BSD 3-clause "New" or "Revised" License (96%)
golang.org/x/xerrors/internal BSD 3-clause "New" or "Revised" License (96%)
gopkg.in/inf.v0 BSD 3-clause "New" or "Revised" License (97%)
gopkg.in/yaml.v2 Apache License 2.0
k8s.io/api Apache License 2.0
k8s.io/apiextensions-apiserver/pkg Apache License 2.0
k8s.io/apimachinery Apache License 2.0
k8s.io/client-go Apache License 2.0
k8s.io/klog Apache License 2.0
k8s.io/kube-openapi/pkg Apache License 2.0
knative.dev/pkg Apache License 2.0
sigs.k8s.io/controller-runtime/pkg Apache License 2.0
sigs.k8s.io/yaml ? (BSD 3-clause "New" or "Revised" License, 83%)
github.com/mailru/easyjson MIT License
github.com/PuerkitoBio/purell BSD 3-Clause "New" or "Revised" License
github.com/googleapis/gnostic Apache License 2.0
github.com/PuerkitoBio/urlesc BSD 3-Clause "New" or "Revised" License
github.com/go-logr/zapr Apache License 2.0
github.com/tektoncd/operator Apache License 2.0
github.com/go-openapi/jsonpointer Apache License 2.0
go.opencensus.io Apache License 2.0
github.com/golang/groupcache Apache License 2.0
github.com/go-logr/logr Apache License 2.0
github.com/tektoncd/pipeline Apache License 2.0
github.com/modern-go/reflect2 Apache License 2.0
github.com/prometheus/client_model Apache License 2.0
golang.org/x/xerrors BSD 3-Clause "New" or "Revised" License
google.golang.org/api <license not found or detected>
contrib.go.opencensus.io/exporter/ocagent Apache License 2.0
github.com/google/uuid BSD 3-Clause "New" or "Revised" License
github.com/knative/serving-operator Apache License 2.0
golang.org/x/sync BSD 3-Clause "New" or "Revised" License
gopkg.in/fsnotify.v1 <license not found or detected>
github.com/golang/protobuf BSD 3-Clause "New" or "Revised" License
github.com/pborman/uuid BSD 3-Clause "New" or "Revised" License
golang.org/x/text BSD 3-Clause "New" or "Revised" License
github.com/openshift/api Apache License 2.0
github.com/census-instrumentation/opencensus-proto Apache License 2.0
k8s.io/utils Apache License 2.0
golang.org/x/time BSD 3-Clause "New" or "Revised" License
github.com/davecgh/go-spew ISC License
github.com/operator-framework/operator-lifecycle-manager Apache License 2.0
github.com/emicklei/go-restful MIT License
github.com/prometheus/common Apache License 2.0
github.com/coreos/go-semver Apache License 2.0
github.com/coreos/prometheus-operator Apache License 2.0
k8s.io/apiextensions-apiserver Apache License 2.0
go.uber.org/zap MIT License
google.golang.org/genproto Apache License 2.0
github.com/matttproud/golang_protobuf_extensions Apache License 2.0
k8s.io/kube-state-metrics Apache License 2.0
github.com/blang/semver MIT License
k8s.io/kube-openapi Apache License 2.0
go.uber.org/multierr MIT License
github.com/mattbaird/jsonpatch Apache License 2.0
go.uber.org/atomic MIT License
github.com/kabanero-io/manifestival Apache License 2.0
google.golang.org/grpc Apache License 2.0
github.com/gophercloud/gophercloud Apache License 2.0
github.com/evanphx/json-patch BSD 3-Clause "New" or "Revised" License
github.com/openshift-knative/knative-eventing-operator Apache License 2.0
golang.org/x/oauth2 BSD 3-Clause "New" or "Revised" License
github.com/beorn7/perks MIT License
github.com/modern-go/concurrent Apache License 2.0
gomodules.xyz/jsonpatch Apache License 2.0
github.com/dgrijalva/jwt-go MIT License
cloud.google.com/go <license not found or detected>
golang.org/x/crypto BSD 3-Clause "New" or "Revised" License
k8s.io/apimachinery Apache License 2.0
github.com/google/go-cmp BSD 3-Clause "New" or "Revised" License
github.com/go-openapi/jsonreference Apache License 2.0
github.com/go-openapi/swag Apache License 2.0
github.com/pkg/errors BSD 2-Clause "Simplified" License
gopkg.in/inf.v0 BSD 3-Clause "New" or "Revised" License
knative.dev/pkg Apache License 2.0
sigs.k8s.io/controller-runtime Apache License 2.0
github.com/google/gofuzz Apache License 2.0
github.com/spf13/pflag BSD 3-Clause "New" or "Revised" License
k8s.io/klog Apache License 2.0
k8s.io/client-go Apache License 2.0
github.com/hashicorp/golang-lru Mozilla Public License 2.0
github.com/Azure/go-autorest Apache License 2.0
github.com/imdario/mergo BSD 3-Clause "New" or "Revised" License
github.com/operator-framework/operator-sdk Apache License 2.0
github.com/json-iterator/go MIT License
github.com/grpc-ecosystem/grpc-gateway BSD 3-Clause "New" or "Revised" License
github.com/prometheus/procfs Apache License 2.0
golang.org/x/net BSD 3-Clause "New" or "Revised" License
github.com/prometheus/client_golang Apache License 2.0
k8s.io/api Apache License 2.0
github.com/gogo/protobuf <license not found or detected>
sigs.k8s.io/yaml <license not found or detected>
golang.org/x/sys BSD 3-Clause "New" or "Revised" License
github.com/knative/pkg Apache License 2.0
gopkg.in/yaml.v2 Apache License 2.0
github.com/go-openapi/spec Apache License 2.0
26 changes: 21 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,15 @@ COLLECTION_CTRLR_REPOSITORY=$(firstword $(subst :, ,${COLLECTION_CTRLR_IMAGE}))
# Current release (used for CSV management)
CURRENT_RELEASE=0.5.0

# OS detection
ifeq ($(OS),Windows_NT)
detected_OS := windows
else
detected_OS := $(shell uname)
ifeq ($(detected_OS),Darwin)
detected_OS := macos
endif
endif

.PHONY: build deploy deploy-olm build-image push-image int-test-install int-test-collections int-test-uninstall int-test-lifecycle

Expand Down Expand Up @@ -180,11 +189,18 @@ endif
rm vendor/golang.org/x/net/http2/h2demo/tmpl.go
rm -r vendor/golang.org/x/text/internal/testtext

# Requires https://github.com/pmezard/licenses
dependency-report:
GO111MODULE=on go get -u github.com/pmezard/licenses
licenses ./pkg/... | cut -c49- > 3RD_PARTY

# Requires https://github.com/mitchellh/golicense
# Note that the tool currently fails when a license is not found. Since
# this is currently the case for several dependencies, the file must be
# inspected manually, and we append || true to the command.
dependency-report:
ifndef GITHUB_TOKEN
$(error GITHUB_TOKEN must be set to a PAT to run the license check)
endif
mkdir -p build/bin
curl -L https://github.com/mitchellh/golicense/releases/download/v0.2.0/golicense_0.2.0_$(detected_OS)_x86_64.tar.gz | tar -C build/bin -xzf - golicense
build/bin/golicense -plain ./license-rules.json build/_output/bin/admission-webhook build/_output/bin/kabanero-operator build/_output/bin/kabanero-operator-collection-controller > 3RD_PARTY || true
rm build/bin/golicense

# Integration Tests
# Requires kube login context an existing cluster
Expand Down
4 changes: 4 additions & 0 deletions license-rules.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"allow": ["Apache-2.0", "BSD-3-Clause", "BSD-2-Clause", "ISC", "MIT", "MPL-2.0"],
"deny": ["GPL-1.0-or-later", "LGPL-2.1-or-later"]
}

0 comments on commit d192a17

Please sign in to comment.