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

Commit

Permalink
CI: add job for checking licenses from dependencies
Browse files Browse the repository at this point in the history
The check is implemented using wwhrd [1] and the allowed
licenses are listed on the `.wwhrd.yml` file.

1. https://github.com/frapposelli/wwhrd
  • Loading branch information
flaviodsr committed Jan 26, 2022
1 parent 8d2d02b commit 0a8a6eb
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 1 deletion.
12 changes: 12 additions & 0 deletions .github/workflows/ci-cd.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,18 @@ 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: Install WWHRD
run: make install-wwhrd
- 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.yml
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

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

0 comments on commit 0a8a6eb

Please sign in to comment.