Skip to content

Commit

Permalink
Merge beabf10 into ec63e99
Browse files Browse the repository at this point in the history
  • Loading branch information
ray-milkey committed Jan 29, 2021
2 parents ec63e99 + beabf10 commit f01406e
Show file tree
Hide file tree
Showing 15 changed files with 281 additions and 234 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,6 @@ modelplugin/TestDevice-1.0.0/testdevice.so.1.0.0
modelplugin/TestDevice-2.0.0/testdevice.so.2.0.0
modelplugin/Devicesim-1.0.0/devicesim.so.1.0.0
onit
*report*.xml
*coverage*.xml
*-output.out
4 changes: 4 additions & 0 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,3 +43,7 @@ issues:
- path: pkg/store/device/store.go
linters:
- scopelint
- path: pkg/manager
text: "is unused"
- path: pkg/northbound/gnmi/subscribe_test.go
text: "is unused"
26 changes: 18 additions & 8 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
export CGO_ENABLED=0
export CGO_ENABLED=1
export GO111MODULE=on

.PHONY: build
Expand All @@ -11,12 +11,16 @@ ONOS_PROTOC_VERSION := v0.6.3

build: # @HELP build the Go binaries and run all validations (default)
build:
CGO_ENABLED=1 go build -o build/_output/onos-config ./cmd/onos-config
go build -o build/_output/onos-config ./cmd/onos-config

test: # @HELP run the unit tests and source code validation
test: # @HELP run the unit tests and source code validation producing a golang style report
test: build deps linters license_check
CGO_ENABLED=1 go test -race github.com/onosproject/onos-config/pkg/...
CGO_ENABLED=1 go test -race github.com/onosproject/onos-config/cmd/...
go test -race github.com/onosproject/onos-config/...


jenkins-test: build-tools # @HELP run the unit tests and source code validation producing a junit style report for Jenkins
jenkins-test: build deps license_check linters
TEST_PACKAGES=github.com/onosproject/onos-config/... ./../build-tools/build/jenkins/make-unit

coverage: # @HELP generate unit test coverage data
coverage: build deps linters license_check
Expand All @@ -27,10 +31,16 @@ deps: # @HELP ensure that the required dependencies are in place
bash -c "diff -u <(echo -n) <(git diff go.mod)"
bash -c "diff -u <(echo -n) <(git diff go.sum)"

linters: # @HELP examines Go source code and reports coding problems
golangci-lint run --timeout 30m
linters: golang-ci # @HELP examines Go source code and reports coding problems
golangci-lint run --timeout 5m

build-tools: # @HELP install the ONOS build tools if needed
@if [ ! -d "../build-tools" ]; then cd .. && git clone https://github.com/onosproject/build-tools.git; fi

golang-ci: # @HELP install golang-ci if not present
golangci-lint --version || curl -sfL https://install.goreleaser.com/github.com/golangci/golangci-lint.sh | sh -s -- -b `go env GOPATH`/bin v1.36.0

license_check: # @HELP examine and ensure license headers exist
license_check: build-tools # @HELP examine and ensure license headers exist
@if [ ! -d "../build-tools" ]; then cd .. && git clone https://github.com/onosproject/build-tools.git; fi
./../build-tools/licensing/boilerplate.py -v --rootdir=${CURDIR}

Expand Down
4 changes: 4 additions & 0 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,19 @@ module github.com/onosproject/onos-config
go 1.14

require (
cloud.google.com/go v0.43.0 // indirect
github.com/Pallinder/go-randomdata v1.2.0
github.com/atomix/go-client v0.4.1
github.com/cenkalti/backoff v2.2.1+incompatible
github.com/docker/docker v1.13.1 // indirect
github.com/gogo/protobuf v1.3.1
github.com/golang/mock v1.4.4
github.com/golang/protobuf v1.4.3
github.com/google/pprof v0.0.0-20190723021845-34ac40c74b70 // indirect
github.com/google/uuid v1.1.2
github.com/googleapis/gnostic v0.3.0 // indirect
github.com/gregjones/httpcache v0.0.0-20190611155906-901d90724c79 // indirect
github.com/kr/pty v1.1.8 // indirect
github.com/mattn/go-colorable v0.1.4 // indirect
github.com/mattn/go-isatty v0.0.12 // indirect
github.com/onosproject/config-models/modelplugin/devicesim-1.0.0 v0.0.0-20201130213019-492043aed0df
Expand All @@ -33,6 +36,7 @@ require (
github.com/spf13/viper v1.6.2
github.com/stretchr/testify v1.5.1
go.uber.org/multierr v1.4.0 // indirect
golang.org/x/mobile v0.0.0-20190806162312-597adff16ade // indirect
golang.org/x/tools v0.0.0-20200522201501-cb1345f3a375 // indirect
google.golang.org/grpc v1.33.2
gopkg.in/yaml.v2 v2.2.8
Expand Down

0 comments on commit f01406e

Please sign in to comment.