diff --git a/.drone.star b/.drone.star index 67b0760d6..afe2a42ae 100644 --- a/.drone.star +++ b/.drone.star @@ -43,22 +43,22 @@ DEFAULT_NODEJS_VERSION = "14" config = { "modules": [ # if you add a module here please also add it to the root level Makefile - "accounts", - "audit", - "glauth", - "graph-explorer", - "graph", - "idp", + "extensions/accounts", + "extensions/audit", + "extensions/glauth", + "extensions/graph-explorer", + "extensions/graph", + "extensions/idp", + "extensions/ocs", + "extensions/proxy", + "extensions/settings", + "extensions/storage", + "extensions/store", + "extensions/thumbnails", + "extensions/web", + "extensions/webdav", "ocis-pkg", "ocis", - "ocs", - "proxy", - "settings", - "storage", - "store", - "thumbnails", - "web", - "webdav", ], "cs3ApiTests": { "skip": False, @@ -301,7 +301,7 @@ def testOcisModule(ctx, module): "commands": [ "mkdir -p cache/checkstyle", "make -C %s ci-golangci-lint" % (module), - "mv %s/checkstyle.xml cache/checkstyle/%s_checkstyle.xml" % (module, module), + "mv %s/checkstyle.xml cache/checkstyle/$(basename %s)_checkstyle.xml" % (module, module), ], "volumes": [stepVolumeGo], }, @@ -311,7 +311,7 @@ def testOcisModule(ctx, module): "commands": [ "mkdir -p cache/coverage", "make -C %s test" % (module), - "mv %s/coverage.out cache/coverage/%s_coverage.out" % (module, module), + "mv %s/coverage.out cache/coverage/$(basename %s)_coverage.out" % (module, module), ], "volumes": [stepVolumeGo], }, diff --git a/.gitignore b/.gitignore index 9e2dea6b7..60b195e66 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,7 @@ */coverage.out +extensions/*/coverage.out */checkstyle.xml +extensions/*/checkstyle.xml */package-lock.json ocis/config/identifier-registration.yaml diff --git a/.make/docs.mk b/.make/docs.mk index 1b1ea2e9a..b7adfd437 100644 --- a/.make/docs.mk +++ b/.make/docs.mk @@ -1,6 +1,6 @@ SKIP_CONFIG_DOCS_GENERATE ?= 0 -CONFIG_DOCS_BASE_PATH ?= ../docs/extensions +CONFIG_DOCS_BASE_PATH ?= ../../docs/extensions .PHONY: config-docs-generate config-docs-generate: #$(FLAEX) diff --git a/.make/protobuf.mk b/.make/protobuf.mk index dc7ef6450..5db6495b6 100644 --- a/.make/protobuf.mk +++ b/.make/protobuf.mk @@ -20,5 +20,5 @@ buf-generate: $(BUF) protoc-deps $(SHA1_LOCK_FILE) $(SHA1_LOCK_FILE): @echo "generating protobuf content" - cd ../protogen/proto && $(BUF) generate + cd ../../protogen/proto && $(BUF) generate find $(abspath $(CURDIR)/../../protogen/proto/) -type f -print0 | sort -z | xargs -0 sha1sum > $(SHA1_LOCK_FILE) diff --git a/docs/.gitignore b/docs/.gitignore index baf62f090..02053cc82 100644 --- a/docs/.gitignore +++ b/docs/.gitignore @@ -1,3 +1,4 @@ hugo/ grpc_apis/ mutagen.yml.lock +helpers/output/* \ No newline at end of file diff --git a/docs/helpers/configenvextractor.go b/docs/helpers/configenvextractor.go index 1d5b9f6f8..bde518bcc 100644 --- a/docs/helpers/configenvextractor.go +++ b/docs/helpers/configenvextractor.go @@ -19,7 +19,7 @@ var targets = map[string]string{ func main() { fmt.Println("Getting relevant packages") - paths, err := filepath.Glob("../../*/pkg/config/defaults/defaultconfig.go") + paths, err := filepath.Glob("../../extensions/*/pkg/config/defaults/defaultconfig.go") if err != nil { log.Fatal(err) } diff --git a/docs/helpers/example-config-generator.go.tmpl b/docs/helpers/example-config-generator.go.tmpl index 705a5e875..6e40721c1 100644 --- a/docs/helpers/example-config-generator.go.tmpl +++ b/docs/helpers/example-config-generator.go.tmpl @@ -15,7 +15,7 @@ import ( func main() { replacer := strings.NewReplacer( - "github.com/owncloud/ocis/", "", + "github.com/owncloud/ocis/extensions/", "", "/pkg/config/defaults", "", ) cfg := map[string]string{ diff --git a/docs/helpers/extractor.go.tmpl b/docs/helpers/extractor.go.tmpl index 76ec507b3..501e1938b 100644 --- a/docs/helpers/extractor.go.tmpl +++ b/docs/helpers/extractor.go.tmpl @@ -28,7 +28,7 @@ if err != nil { log.Fatal(err) } replacer := strings.NewReplacer( - "github.com/owncloud/ocis/", "", + "github.com/owncloud/ocis/extensions/", "", "/pkg/config/defaults", "", ) var fields []ConfigField diff --git a/sonar-project.properties b/sonar-project.properties index 52ef9a9c5..0c614f72d 100644 --- a/sonar-project.properties +++ b/sonar-project.properties @@ -33,7 +33,7 @@ sonar.go.coverage.reportPaths=cache/coverage/* # golangci-lint does not support wildcard # https://github.com/SonarSource/slang/blob/85b05160bc1b31c6072a35f8818da4376b107afa/sonar-go-plugin/src/main/java/org/sonar/go/externalreport/GolangCILintReportSensor.java#L37 # https://github.com/SonarSource/slang/blob/85b05160bc1b31c6072a35f8818da4376b107afa/sonar-go-plugin/src/main/java/org/sonar/go/externalreport/AbstractReportSensor.java#L76-L90 -sonar.go.golangci-lint.reportPaths=cache/checkstyle/accounts_checkstyle.xml,cache/checkstyle/glauth_checkstyle.xml,cache/checkstyle/graph_checkstyle.xml,cache/checkstyle/graph-explorer_checkstyle.xml,cache/checkstyle/idp_checkstyle.xml,cache/checkstyle/ocis_checkstyle.xml,cache/checkstyle/ocis-pkg_checkstyle.xml,cache/checkstyle/ocs_checkstyle.xml,cache/checkstyle/proxy_checkstyle.xml,cache/checkstyle/settings_checkstyle.xml,cache/checkstyle/storage_checkstyle.xml,cache/checkstyle/store_checkstyle.xml,cache/checkstyle/thumbnails_checkstyle.xml,cache/checkstyle/web_checkstyle.xml,cache/checkstyle/webdav_checkstyle.xml +sonar.go.golangci-lint.reportPaths=cache/checkstyle/accounts_checkstyle.xml,cache/checkstyle/audit_checkstyle.xml,cache/checkstyle/glauth_checkstyle.xml,cache/checkstyle/graph_checkstyle.xml,cache/checkstyle/graph-explorer_checkstyle.xml,cache/checkstyle/idm_checkstyle.xml,cache/checkstyle/idp_checkstyle.xml,cache/checkstyle/nats_checkstyle.xml,cache/checkstyle/notifications_checkstyle.xml,cache/checkstyle/ocis_checkstyle.xml,cache/checkstyle/ocis-pkg_checkstyle.xml,cache/checkstyle/ocs_checkstyle.xml,cache/checkstyle/proxy_checkstyle.xml,cache/checkstyle/settings_checkstyle.xml,cache/checkstyle/storage_checkstyle.xml,cache/checkstyle/store_checkstyle.xml,cache/checkstyle/thumbnails_checkstyle.xml,cache/checkstyle/web_checkstyle.xml,cache/checkstyle/webdav_checkstyle.xml # Exclude files sonar.exclusions=**/third_party,docs/**,changelog/**,*/pkg/assets/embed.go,idp/assets/identifier/**,**/package.json,**/rollup.config.js,CHANGELOG.md,**/pkg/proto/**/*.pb.*,deployments/**,tests/**,vendor-bin/**,README.md,**/mocks/