From 83f812f0b95e5a2224a51ffb6a907307dcb2ace4 Mon Sep 17 00:00:00 2001 From: ajanikow Date: Mon, 30 Mar 2020 20:31:02 +0000 Subject: [PATCH 1/9] Add TRAVIS CI script --- .travis.yml | 12 ++++++++++++ Makefile | 13 +++++++++++++ go.mod | 2 +- go.sum | 13 +++++++++++++ 4 files changed, 39 insertions(+), 1 deletion(-) create mode 100644 .travis.yml diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 000000000..9bfc78eb5 --- /dev/null +++ b/.travis.yml @@ -0,0 +1,12 @@ +language: go + +go: + - "1.13" + +go_import_path: github.com/arangodb/kube-arangodb + +install: + - make init + +script: + - exit 0 \ No newline at end of file diff --git a/Makefile b/Makefile index 9976384cb..7122044fe 100644 --- a/Makefile +++ b/Makefile @@ -556,3 +556,16 @@ ifdef PUSHIMAGES docker push $(ARANGOSYNCIMAGE) endif $(ROOTDIR)/scripts/kube_run_sync_tests.sh $(DEPLOYMENTNAMESPACE) '$(ARANGODIMAGE)' '$(ARANGOSYNCIMAGE)' '$(ARANGOSYNCTESTIMAGE)' '$(ARANGOSYNCTESTCTRLIMAGE)' '$(TESTOPTIONS)' + +.PHONY: init +init: tools vendor + +.PHONY: tools +tools: + @echo ">> Fetching goimports" + @go get -u golang.org/x/tools/cmd/goimports + +.PHONY: vendor +vendor: + @echo ">> Updating vendor" + @go mod vendor \ No newline at end of file diff --git a/go.mod b/go.mod index 8f9e2ce18..c0024299a 100644 --- a/go.mod +++ b/go.mod @@ -45,9 +45,9 @@ require ( github.com/ugorji/go/codec v0.0.0-20181209151446-772ced7fd4c2 // indirect github.com/voxelbrain/goptions v0.0.0-20180630082107-58cddc247ea2 // indirect golang.org/x/sys v0.0.0-20200116001909-b77594299b42 + golang.org/x/tools v0.0.0-20200330191527-657a652153b5 // indirect gopkg.in/go-playground/assert.v1 v1.2.1 // indirect gopkg.in/go-playground/validator.v8 v8.18.2 // indirect - gopkg.in/yaml.v2 v2.2.8 k8s.io/api v0.17.3 k8s.io/apiextensions-apiserver v0.17.3 k8s.io/apimachinery v0.17.3 diff --git a/go.sum b/go.sum index 7d95d86d3..3547b8c6a 100644 --- a/go.sum +++ b/go.sum @@ -598,6 +598,7 @@ github.com/voxelbrain/goptions v0.0.0-20180630082107-58cddc247ea2/go.mod h1:DGCI github.com/xiang90/probing v0.0.0-20160813154853-07dd2e8dfe18/go.mod h1:UETIi67q53MR2AWcXfiuqkDkRtnGDLqkBTpCHuJHxtU= github.com/xlab/treeprint v0.0.0-20180616005107-d6fb6747feb6/go.mod h1:ce1O1j6UtZfjr22oyGxGLbauSBp2YVXpARAosm7dHBg= github.com/xordataexchange/crypt v0.0.3-0.20170626215501-b2862e3d0a77/go.mod h1:aYKd//L2LvnjZzWKhF00oedf4jCCReLcmhLdhm1A27Q= +github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/zenazn/goji v0.9.0/go.mod h1:7S9M489iMyHBNxwZnk9/EHS098H4/F6TATF2mIxtB1Q= go.elastic.co/apm v1.5.0/go.mod h1:OdB9sPtM6Vt7oz3VXt7+KR96i9li74qrxBGHTQygFvk= go.elastic.co/apm/module/apmhttp v1.5.0/go.mod h1:1FbmNuyD3ddauwzgVwFB0fqY6KbZt3JkV187tGCYYhY= @@ -629,6 +630,7 @@ golang.org/x/crypto v0.0.0-20190513172903-22d7a77e9e5f h1:R423Cnkcp5JABoeemiGEPl golang.org/x/crypto v0.0.0-20190513172903-22d7a77e9e5f/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190923035154-9ee001bba392/go.mod h1:/lpIB1dKB+9EgE3H3cr1v9wB50oz8l4C4h62xy7jSTY= +golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20191112222119-e1110fd1c708 h1:pXVtWnwHkrWD9ru3sDxY/qFK/bfc0egRovX91EjWjf4= golang.org/x/crypto v0.0.0-20191112222119-e1110fd1c708/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= @@ -651,6 +653,8 @@ golang.org/x/mobile v0.0.0-20190312151609-d3739f865fa6/go.mod h1:z+o9i4GpDbdi3rU golang.org/x/mobile v0.0.0-20190719004257-d2bd2a29d028/go.mod h1:E/iHnbuqvinMTCcRqshq8CkpyQDoeVncDDYHnLhea+o= golang.org/x/mod v0.0.0-20190513183733-4bf6d317e70e/go.mod h1:mXi4GBBbnImb6dmsKGUJ2LatrhH/nqhxcFungHvyanc= golang.org/x/mod v0.1.0/go.mod h1:0QHyrYULN0/3qlju5TqG8bIK38QM8yzMo5ekMj3DlcY= +golang.org/x/mod v0.2.0 h1:KU7oHjnv3XNWfa5COkzUifxZmxp1TyI7ImMXqFxLwvQ= +golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/net v0.0.0-20170114055629-f2499483f923/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= @@ -681,6 +685,8 @@ golang.org/x/net v0.0.0-20190923162816-aa69164e4478/go.mod h1:z5CRVTTTmAJ677TzLL golang.org/x/net v0.0.0-20191002035440-2ec189313ef0/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20191112182307-2180aed22343 h1:00ohfJ4K98s3m6BGUoBd8nyfp4Yl0GoIKvw5abItTjI= golang.org/x/net v0.0.0-20191112182307-2180aed22343/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200226121028-0de0cce0169b h1:0mm1VjtFUOIlE1SbDlwjYaDxZVDP2S5ou6y0gSgXHu8= +golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190402181905-9f3314589c9a h1:tImsplftrFpALCYumobsd0K86vlAs/eXGFms2txfJfA= @@ -773,8 +779,15 @@ golang.org/x/tools v0.0.0-20191012152004-8de300cfc20a/go.mod h1:b+2E5dAYhXwXZwtn golang.org/x/tools v0.0.0-20191029041327-9cc4af7d6b2c/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191111182352-50fa39b762bc/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191113191852-77e3bb0ad9e7/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191115202509-3a792d9c32b2 h1:EtTFh6h4SAKemS+CURDMTDIANuduG5zKEXShyy18bGA= golang.org/x/tools v0.0.0-20191115202509-3a792d9c32b2/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20200330191527-657a652153b5 h1:7sj6C3QSz8on3bTqq1p5fRO8OsxudjkW0BPXZoc/S30= +golang.org/x/tools v0.0.0-20200330191527-657a652153b5/go.mod h1:Sl4aGygMT6LrqrWclx+PTx3U+LnKx/seiNR+3G19Ar8= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543 h1:E7g+9GITq07hpfrRu66IVDexMakfv52eLZ2CXBWiKr4= +golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= gonum.org/v1/gonum v0.0.0-20190331200053-3d26580ed485/go.mod h1:2ltnJ7xHfj0zHS40VVPYEAAMTa3ZGguvHGBSJeRWqE0= gonum.org/v1/netlib v0.0.0-20190313105609-8cb42192e0e0/go.mod h1:wa6Ws7BG/ESfp6dHfk7C6KdzKA7wR7u/rKwOGE66zvw= gonum.org/v1/netlib v0.0.0-20190331212654-76723241ea4e/go.mod h1:kS+toOQn6AQKjmKJ7gzohV1XkqsFehRA2FbsbkopSuQ= From 69d5ec87eea14b009a6758cb14c0aee849a4d80b Mon Sep 17 00:00:00 2001 From: ajanikow Date: Mon, 30 Mar 2020 20:34:43 +0000 Subject: [PATCH 2/9] Add build and UnitTests steps --- .travis.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 9bfc78eb5..b6255eeb7 100644 --- a/.travis.yml +++ b/.travis.yml @@ -9,4 +9,5 @@ install: - make init script: - - exit 0 \ No newline at end of file + - make run-unit-tests + - make bin \ No newline at end of file From 49eaad0251f026ba34ccdb2b636d5993ce625ba6 Mon Sep 17 00:00:00 2001 From: ajanikow Date: Tue, 31 Mar 2020 05:54:12 +0000 Subject: [PATCH 3/9] Check with failed FMT --- .travis.yml | 2 ++ Makefile | 6 ++++++ main.go | 2 +- 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index b6255eeb7..38a897363 100644 --- a/.travis.yml +++ b/.travis.yml @@ -2,6 +2,7 @@ language: go go: - "1.13" + - "1.14" go_import_path: github.com/arangodb/kube-arangodb @@ -9,5 +10,6 @@ install: - make init script: + - make fmt-verify - make run-unit-tests - make bin \ No newline at end of file diff --git a/Makefile b/Makefile index 7122044fe..961cbf51e 100644 --- a/Makefile +++ b/Makefile @@ -167,8 +167,14 @@ GOLANGCI_ENABLED=deadcode gocyclo golint varcheck structcheck maligned errcheck .PHONY: fmt fmt: + @echo ">> ensuring style of files" @goimports -w $(SOURCES) +.PHONY: fmt-verify +fmt-verify: + @echo ">> Verify files style" + @if [ X"$$(goimports -l $(SOURCES) | wc -l)" != X"0" ]; then echo ">> Style errors"; goimports -l $(SOURCES); exit 1; fi + .PHONY: linter linter: fmt @golangci-lint run --no-config --issues-exit-code=1 --deadline=30m --disable-all \ diff --git a/main.go b/main.go index 42f02d426..92c14329a 100644 --- a/main.go +++ b/main.go @@ -65,7 +65,7 @@ const ( defaultServerHost = "0.0.0.0" defaultServerPort = 8528 defaultLogLevel = "debug" - defaultAdminSecretName = "arangodb-operator-dashboard" + defaultAdminSecretName = "arangodb-operator-dashboard" defaultAlpineImage = "alpine:3.7" defaultMetricsExporterImage = "arangodb/arangodb-exporter:0.1.6" defaultArangoImage = "arangodb/arangodb:latest" From 52c809713b791eab4afc80ce8f9983aa89cb6ce7 Mon Sep 17 00:00:00 2001 From: ajanikow Date: Tue, 31 Mar 2020 06:30:13 +0000 Subject: [PATCH 4/9] Disable modules --- .travis.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.travis.yml b/.travis.yml index 38a897363..668cc82c1 100644 --- a/.travis.yml +++ b/.travis.yml @@ -6,6 +6,9 @@ go: go_import_path: github.com/arangodb/kube-arangodb +env: + - GO111MODULES=off + install: - make init From 8f365414c312e977b66063070194a237eae0641d Mon Sep 17 00:00:00 2001 From: ajanikow Date: Tue, 31 Mar 2020 06:33:17 +0000 Subject: [PATCH 5/9] Run imports from command --- Makefile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index 961cbf51e..ba281a5eb 100644 --- a/Makefile +++ b/Makefile @@ -167,13 +167,13 @@ GOLANGCI_ENABLED=deadcode gocyclo golint varcheck structcheck maligned errcheck .PHONY: fmt fmt: - @echo ">> ensuring style of files" - @goimports -w $(SOURCES) + @echo ">> Ensuring style of files" + @go run golang.org/x/tools/cmd/goimports -w $(SOURCES) .PHONY: fmt-verify fmt-verify: @echo ">> Verify files style" - @if [ X"$$(goimports -l $(SOURCES) | wc -l)" != X"0" ]; then echo ">> Style errors"; goimports -l $(SOURCES); exit 1; fi + @if [ X"$$(go run golang.org/x/tools/cmd/goimports -l $(SOURCES) | wc -l)" != X"0" ]; then echo ">> Style errors"; go run golang.org/x/tools/cmd/goimports -l $(SOURCES); exit 1; fi .PHONY: linter linter: fmt From dd3dc64e9aebe0ca545b882eb8496f71f51bcec4 Mon Sep 17 00:00:00 2001 From: ajanikow Date: Tue, 31 Mar 2020 21:22:39 +0000 Subject: [PATCH 6/9] Fix FMT for tests --- main.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main.go b/main.go index 92c14329a..42f02d426 100644 --- a/main.go +++ b/main.go @@ -65,7 +65,7 @@ const ( defaultServerHost = "0.0.0.0" defaultServerPort = 8528 defaultLogLevel = "debug" - defaultAdminSecretName = "arangodb-operator-dashboard" + defaultAdminSecretName = "arangodb-operator-dashboard" defaultAlpineImage = "alpine:3.7" defaultMetricsExporterImage = "arangodb/arangodb-exporter:0.1.6" defaultArangoImage = "arangodb/arangodb:latest" From 08af690163853de31825f0ae277c7cdfdf62cda1 Mon Sep 17 00:00:00 2001 From: ajanikow Date: Wed, 1 Apr 2020 06:53:43 +0000 Subject: [PATCH 7/9] Add license check --- Makefile | 9 ++++++++- go.mod | 4 +++- go.sum | 8 ++++++++ 3 files changed, 19 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index ba281a5eb..7b3623ad5 100644 --- a/Makefile +++ b/Makefile @@ -165,13 +165,18 @@ GOLANGCI_ENABLED=deadcode gocyclo golint varcheck structcheck maligned errcheck #GOLANGCI_ENABLED+=dupl - disable dupl check +.PHONY: license-verify +license-verify: + @echo ">> Verify license of files" + @go run github.com/google/addlicense -f "./tools/codegen/boilerplate.go.txt" -check $(SOURCES) + .PHONY: fmt fmt: @echo ">> Ensuring style of files" @go run golang.org/x/tools/cmd/goimports -w $(SOURCES) .PHONY: fmt-verify -fmt-verify: +fmt-verify: license-verify @echo ">> Verify files style" @if [ X"$$(go run golang.org/x/tools/cmd/goimports -l $(SOURCES) | wc -l)" != X"0" ]; then echo ">> Style errors"; go run golang.org/x/tools/cmd/goimports -l $(SOURCES); exit 1; fi @@ -570,6 +575,8 @@ init: tools vendor tools: @echo ">> Fetching goimports" @go get -u golang.org/x/tools/cmd/goimports + @echo ">> Fetching license check" + @go get -u github.com/google/addlicense .PHONY: vendor vendor: diff --git a/go.mod b/go.mod index c0024299a..a5ab346bd 100644 --- a/go.mod +++ b/go.mod @@ -29,6 +29,7 @@ require ( github.com/ghodss/yaml v1.0.0 github.com/gin-contrib/sse v0.0.0-20190301062529-5545eab6dad3 // indirect github.com/gin-gonic/gin v1.3.0 + github.com/google/addlicense v0.0.0-20200301095109-7c013a14f2e2 // indirect github.com/jessevdk/go-assets v0.0.0-20160921144138-4f4301a06e15 github.com/jessevdk/go-assets-builder v0.0.0-20130903091706-b8483521738f github.com/julienschmidt/httprouter v1.3.0 @@ -44,8 +45,9 @@ require ( github.com/tomnomnom/linkheader v0.0.0-20180905144013-02ca5825eb80 // indirect github.com/ugorji/go/codec v0.0.0-20181209151446-772ced7fd4c2 // indirect github.com/voxelbrain/goptions v0.0.0-20180630082107-58cddc247ea2 // indirect + golang.org/x/sync v0.0.0-20200317015054-43a5402ce75a // indirect golang.org/x/sys v0.0.0-20200116001909-b77594299b42 - golang.org/x/tools v0.0.0-20200330191527-657a652153b5 // indirect + golang.org/x/tools v0.0.0-20200331202046-9d5940d49312 // indirect gopkg.in/go-playground/assert.v1 v1.2.1 // indirect gopkg.in/go-playground/validator.v8 v8.18.2 // indirect k8s.io/api v0.17.3 diff --git a/go.sum b/go.sum index 3547b8c6a..b0ee93d2a 100644 --- a/go.sum +++ b/go.sum @@ -256,6 +256,8 @@ github.com/golang/protobuf v1.3.2 h1:6nsPYzhq5kReh6QImI3k5qWzO4PEbvbIW2cwSfR/6xs github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/snappy v0.0.0-20180518054509-2e65f85255db/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/golang/snappy v0.0.1/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= +github.com/google/addlicense v0.0.0-20200301095109-7c013a14f2e2 h1:N/H6+jLLYNoskSbyRaph9ttbcaGEw4AWpAZw+1VqIGs= +github.com/google/addlicense v0.0.0-20200301095109-7c013a14f2e2/go.mod h1:EMjYTRimagHs1FwlIqKyX3wAM0u3rA+McvlIIWmSamA= github.com/google/btree v0.0.0-20160524151835-7d79101e329e/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= @@ -599,6 +601,7 @@ github.com/xiang90/probing v0.0.0-20160813154853-07dd2e8dfe18/go.mod h1:UETIi67q github.com/xlab/treeprint v0.0.0-20180616005107-d6fb6747feb6/go.mod h1:ce1O1j6UtZfjr22oyGxGLbauSBp2YVXpARAosm7dHBg= github.com/xordataexchange/crypt v0.0.3-0.20170626215501-b2862e3d0a77/go.mod h1:aYKd//L2LvnjZzWKhF00oedf4jCCReLcmhLdhm1A27Q= github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= +github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/zenazn/goji v0.9.0/go.mod h1:7S9M489iMyHBNxwZnk9/EHS098H4/F6TATF2mIxtB1Q= go.elastic.co/apm v1.5.0/go.mod h1:OdB9sPtM6Vt7oz3VXt7+KR96i9li74qrxBGHTQygFvk= go.elastic.co/apm/module/apmhttp v1.5.0/go.mod h1:1FbmNuyD3ddauwzgVwFB0fqY6KbZt3JkV187tGCYYhY= @@ -699,7 +702,10 @@ golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190423024810-112230192c58 h1:8gQV6CLnAEikrhgkHFbMAEhagSSnXWGV915qUMm9mrU= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e h1:vcxGaoTs7kV8m5Np9uUNQin4BrLOthgV7252N8V+FwY= golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20200317015054-43a5402ce75a h1:WXEvlFVvvGxCJLG6REjsT03iWnKLEWinaScsxF2Vm2o= +golang.org/x/sync v0.0.0-20200317015054-43a5402ce75a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sys v0.0.0-20170830134202-bb24a47a89ea/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= @@ -784,6 +790,8 @@ golang.org/x/tools v0.0.0-20191115202509-3a792d9c32b2/go.mod h1:b+2E5dAYhXwXZwtn golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20200330191527-657a652153b5 h1:7sj6C3QSz8on3bTqq1p5fRO8OsxudjkW0BPXZoc/S30= golang.org/x/tools v0.0.0-20200330191527-657a652153b5/go.mod h1:Sl4aGygMT6LrqrWclx+PTx3U+LnKx/seiNR+3G19Ar8= +golang.org/x/tools v0.0.0-20200331202046-9d5940d49312 h1:2PHG+Ia3gK1K2kjxZnSylizb//eyaMG8gDFbOG7wLV8= +golang.org/x/tools v0.0.0-20200331202046-9d5940d49312/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543 h1:E7g+9GITq07hpfrRu66IVDexMakfv52eLZ2CXBWiKr4= From d7ebf0454af6ab939a8e25515e37dec2ec8fb0f7 Mon Sep 17 00:00:00 2001 From: ajanikow Date: Wed, 1 Apr 2020 06:56:23 +0000 Subject: [PATCH 8/9] Add license headers --- dashboard/assets.go | 20 +++++++++++++++++++ pkg/apis/deployment/v1/license_spec_test.go | 20 +++++++++++++++++++ pkg/backup/operator/prometheus.go | 20 +++++++++++++++++++ .../action_disable_scaling_cluster.go | 20 +++++++++++++++++++ .../action_enable_scaling_cluster.go | 20 +++++++++++++++++++ pkg/deployment/resources/pdbs.go | 20 +++++++++++++++++++ pkg/util/k8sutil/mocks/core.go | 20 +++++++++++++++++++ pkg/util/k8sutil/mocks/mock.go | 20 +++++++++++++++++++ pkg/util/k8sutil/mocks/rest_client.go | 20 +++++++++++++++++++ pkg/util/k8sutil/mocks/secrets.go | 20 +++++++++++++++++++ 10 files changed, 200 insertions(+) diff --git a/dashboard/assets.go b/dashboard/assets.go index f37a89eeb..c427b1a7e 100644 --- a/dashboard/assets.go +++ b/dashboard/assets.go @@ -1,3 +1,23 @@ +// +// DISCLAIMER +// +// Copyright 2020 ArangoDB GmbH, Cologne, Germany +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Copyright holder is ArangoDB GmbH, Cologne, Germany +// + package dashboard import ( diff --git a/pkg/apis/deployment/v1/license_spec_test.go b/pkg/apis/deployment/v1/license_spec_test.go index acef3c074..85a540d31 100644 --- a/pkg/apis/deployment/v1/license_spec_test.go +++ b/pkg/apis/deployment/v1/license_spec_test.go @@ -1,3 +1,23 @@ +// +// DISCLAIMER +// +// Copyright 2020 ArangoDB GmbH, Cologne, Germany +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Copyright holder is ArangoDB GmbH, Cologne, Germany +// + package v1 import ( diff --git a/pkg/backup/operator/prometheus.go b/pkg/backup/operator/prometheus.go index 0b85acd77..f9f665068 100644 --- a/pkg/backup/operator/prometheus.go +++ b/pkg/backup/operator/prometheus.go @@ -1,3 +1,23 @@ +// +// DISCLAIMER +// +// Copyright 2020 ArangoDB GmbH, Cologne, Germany +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Copyright holder is ArangoDB GmbH, Cologne, Germany +// + package operator import ( diff --git a/pkg/deployment/reconcile/action_disable_scaling_cluster.go b/pkg/deployment/reconcile/action_disable_scaling_cluster.go index faddcf7ae..eff097270 100644 --- a/pkg/deployment/reconcile/action_disable_scaling_cluster.go +++ b/pkg/deployment/reconcile/action_disable_scaling_cluster.go @@ -1,3 +1,23 @@ +// +// DISCLAIMER +// +// Copyright 2020 ArangoDB GmbH, Cologne, Germany +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Copyright holder is ArangoDB GmbH, Cologne, Germany +// + package reconcile import ( diff --git a/pkg/deployment/reconcile/action_enable_scaling_cluster.go b/pkg/deployment/reconcile/action_enable_scaling_cluster.go index ac4f83b17..ad46397f1 100644 --- a/pkg/deployment/reconcile/action_enable_scaling_cluster.go +++ b/pkg/deployment/reconcile/action_enable_scaling_cluster.go @@ -1,3 +1,23 @@ +// +// DISCLAIMER +// +// Copyright 2020 ArangoDB GmbH, Cologne, Germany +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Copyright holder is ArangoDB GmbH, Cologne, Germany +// + package reconcile import ( diff --git a/pkg/deployment/resources/pdbs.go b/pkg/deployment/resources/pdbs.go index ecf852ea7..2dce488fc 100644 --- a/pkg/deployment/resources/pdbs.go +++ b/pkg/deployment/resources/pdbs.go @@ -1,3 +1,23 @@ +// +// DISCLAIMER +// +// Copyright 2020 ArangoDB GmbH, Cologne, Germany +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Copyright holder is ArangoDB GmbH, Cologne, Germany +// + package resources import ( diff --git a/pkg/util/k8sutil/mocks/core.go b/pkg/util/k8sutil/mocks/core.go index e56b689ac..c6c5afcbd 100644 --- a/pkg/util/k8sutil/mocks/core.go +++ b/pkg/util/k8sutil/mocks/core.go @@ -1,3 +1,23 @@ +// +// DISCLAIMER +// +// Copyright 2020 ArangoDB GmbH, Cologne, Germany +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Copyright holder is ArangoDB GmbH, Cologne, Germany +// + package mocks import ( diff --git a/pkg/util/k8sutil/mocks/mock.go b/pkg/util/k8sutil/mocks/mock.go index 1156d776b..d89fb9389 100644 --- a/pkg/util/k8sutil/mocks/mock.go +++ b/pkg/util/k8sutil/mocks/mock.go @@ -1,3 +1,23 @@ +// +// DISCLAIMER +// +// Copyright 2020 ArangoDB GmbH, Cologne, Germany +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Copyright holder is ArangoDB GmbH, Cologne, Germany +// + package mocks import "github.com/stretchr/testify/mock" diff --git a/pkg/util/k8sutil/mocks/rest_client.go b/pkg/util/k8sutil/mocks/rest_client.go index 406ed5445..922c22bb8 100644 --- a/pkg/util/k8sutil/mocks/rest_client.go +++ b/pkg/util/k8sutil/mocks/rest_client.go @@ -1,3 +1,23 @@ +// +// DISCLAIMER +// +// Copyright 2020 ArangoDB GmbH, Cologne, Germany +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Copyright holder is ArangoDB GmbH, Cologne, Germany +// + package mocks import "k8s.io/client-go/rest" diff --git a/pkg/util/k8sutil/mocks/secrets.go b/pkg/util/k8sutil/mocks/secrets.go index d2a301849..6767ea238 100644 --- a/pkg/util/k8sutil/mocks/secrets.go +++ b/pkg/util/k8sutil/mocks/secrets.go @@ -1,3 +1,23 @@ +// +// DISCLAIMER +// +// Copyright 2020 ArangoDB GmbH, Cologne, Germany +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Copyright holder is ArangoDB GmbH, Cologne, Germany +// + package mocks import ( From 43e5b6314cedd42a44be56cd14ad2e78e7886f6f Mon Sep 17 00:00:00 2001 From: ajanikow Date: Wed, 1 Apr 2020 06:57:11 +0000 Subject: [PATCH 9/9] Add Travis license check --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 668cc82c1..3a203b139 100644 --- a/.travis.yml +++ b/.travis.yml @@ -13,6 +13,6 @@ install: - make init script: - - make fmt-verify + - make license-verify fmt-verify - make run-unit-tests - make bin \ No newline at end of file