Skip to content
This repository has been archived by the owner on May 30, 2022. It is now read-only.

CI: add job for checking licenses from dependencies #741

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions .github/workflows/ci-cd.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,16 @@ jobs:
- name: trento checks ID sanity test
run: python3 hack/id_checker.py

check-licenses:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- uses: actions/setup-go@v2
with:
go-version: 1.16
- name: Run check
run: make check-licenses

test-e2e:
needs: build-static-binary
runs-on: ubuntu-20.04
Expand Down
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,5 @@
/packaging/helm/trento-server/charts/*.tgz
/hack/helm/trento-dev/charts/*.tgz
/test/e2e/cypress/videos
/test/e2e/cypress/screenshots/
/test/e2e/cypress/screenshots/
/vendor
7 changes: 7 additions & 0 deletions .wwhrd.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
allowlist:
- Apache-2.0
- BSD-2-Clause
- BSD-3-Clause
- ISC
- MIT
- MPL-2.0
9 changes: 9 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -148,3 +148,12 @@ web/frontend/assets/images:
.PHONY: helm-lint
helm-lint:
docker run --rm -ti --name trento-chart-test -w /workdir -v $(shell pwd):/workdir quay.io/helmpack/chart-testing:v3.4.0 ct lint

.PHONY: install-wwhrd
install-wwhrd:
which wwhrd || go install github.com/frapposelli/wwhrd@latest
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't know that much about golang dependencies, but I wonder if there is some option to define this dependency as a development dependency

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am not aware of such option. Did some research and could not find it either.

Copy link
Contributor

@dottorblaster dottorblaster Jan 27, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would ask @fabriziosestito since he is the lord of that pattern but I think we can actually declare wwhrd in the tools/tools.go file having it fetched inside deps


.PHONY: check-licenses
check-licenses: install-wwhrd
go mod vendor
wwhrd check -q -f .wwhrd.yaml