Skip to content

Commit

Permalink
Merge pull request #122 from Juniper/task/121
Browse files Browse the repository at this point in the history
Update CI for license compliance validation; add docs/compliance convenience functions
  • Loading branch information
bwJuniper authored May 26, 2023
2 parents 368cfe1 + 97258e4 commit 563f2d4
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 3 deletions.
5 changes: 4 additions & 1 deletion .github/workflows/go_tools.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,7 @@ jobs:
run: make govet

- name: tfplugindocs
run: make docs
run: make docs-check

- name: compliance
run: make compliance-check
16 changes: 14 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,18 @@
all: docs gofmt govet unit-tests integration-tests device-integration-tests
all: compliance-check docs-check gofmt govet unit-tests integration-tests device-integration-tests

check-repo-clean:
git update-index --refresh && git diff-index --quiet HEAD --

compliance:
go run github.com/chrismarget-j/go-licenses save --ignore terraform-provider-apstra --ignore github.com/Juniper/apstra-go-sdk --save_path=./Third_Party_Code --force ./... || exit 1 ;\
go run github.com/chrismarget-j/go-licenses report ./... --ignore terraform-provider-apstra --ignore github.com/Juniper/apstra-go-sdk/apstra --template .notices.tpl > Third_Party_Code/NOTICES.md || exit 1 ;\

compliance-check: compliance check-repo-clean

docs:
go run github.com/hashicorp/terraform-plugin-docs/cmd/tfplugindocs

docs-check:
@sh -c "$(CURDIR)/scripts/tfplugindocs.sh"

gofmt:
Expand All @@ -18,4 +30,4 @@ integration-tests:
device-integration-tests:
go test -tags device-integration -v ./...

.PHONY: all docs gofmt govet unit-tests integration-tests device-integration-tests
.PHONY: all compliance compliance-check docs docs-check gofmt govet unit-tests integration-tests device-integration-tests

0 comments on commit 563f2d4

Please sign in to comment.