From 98910b373900335ef925f32ce14c423640d24e24 Mon Sep 17 00:00:00 2001 From: jkoberg Date: Wed, 21 Dec 2022 15:24:22 +0100 Subject: [PATCH] use new extended notation and also sh Signed-off-by: jkoberg --- docs/helpers/extended_vars.yaml | 81 +++++++++++++++++++++++++++++++++ docs/helpers/global_vars.yaml | 73 ----------------------------- docs/helpers/rogueEnv.go | 6 +-- 3 files changed, 84 insertions(+), 76 deletions(-) create mode 100644 docs/helpers/extended_vars.yaml delete mode 100644 docs/helpers/global_vars.yaml diff --git a/docs/helpers/extended_vars.yaml b/docs/helpers/extended_vars.yaml new file mode 100644 index 000000000..9808b5260 --- /dev/null +++ b/docs/helpers/extended_vars.yaml @@ -0,0 +1,81 @@ +variables: +- rawname: CS3_GATEWAY + path: services/idp/pkg/backends/cs3/bootstrap/cs3.go:76 + foundincode: true + name: CS3_GATEWAY + type: "" + default_value: "" + description: "" + do_ignore: true +- rawname: CS3_MACHINE_AUTH_API_KEY + path: services/idp/pkg/backends/cs3/bootstrap/cs3.go:77 + foundincode: true + name: CS3_MACHINE_AUTH_API_KEY + type: "" + default_value: "" + description: "" + do_ignore: true +- rawname: MICRO_LOG_LEVEL + path: ocis-pkg/log/log.go:34 + foundincode: true + name: MICRO_LOG_LEVEL + type: string + default_value: Error + description: Set the log level for the internal go micro framework. Only change + on supervision of ownCloud Support. + do_ignore: false +- rawname: MICRO_LOG_LEVEL + path: ocis-pkg/log/log.go:30 + foundincode: true + name: MICRO_LOG_LEVEL + type: "" + default_value: "" + description: "" + do_ignore: true +- rawname: registryEnv + path: ocis-pkg/registry/registry.go:44 + foundincode: true + name: MICRO_REGISTRY + type: string + default_value: "" + description: 'Go micro registry type to use. Supported types are: ''nats'', ''kubernetes'', + ''etcd'', ''consul'' and ''memory''. Will be selected automatically. Only change + on supervision of ownCloud Support.' + do_ignore: false +- rawname: registryAddressEnv + path: ocis-pkg/registry/registry.go:42 + foundincode: true + name: MICRO_REGISTRY_ADDRESS + type: string + default_value: "" + description: The bind address of the internal go micro framework. Only change on + supervision of ownCloud Support. + do_ignore: false +- rawname: OCIS_BASE_DATA_PATH + path: ocis-pkg/config/defaults/paths.go:23 + foundincode: true + name: OCIS_BASE_DATA_PATH + type: string + default_value: '''/var/lib/ocis'' or ''$HOME/.ocis/''' + description: The base directory location used by several services and for user data. + Predefined to '/var/lib/ocis' for container images (inside the container) or '$HOME/.ocis/' + for binary releases. Can be adapted for services individually. + do_ignore: false +- rawname: OCIS_CONFIG_DIR + path: ocis-pkg/config/defaults/paths.go:56 + foundincode: true + name: OCIS_CONFIG_DIR + type: string + default_value: '''/etc/ocis'' or ''$HOME/.ocis/config''' + description: The default directory location for config files. Predefined to '/etc/ocis' + for container images (inside the container) or '$HOME/.ocis/config' for binary + releases. + do_ignore: false +- rawname: parts[0] + path: ocis-pkg/config/envdecode/envdecode.go:382 + foundincode: true + name: parts[0] + type: "" + default_value: "" + description: false positive - code that extract envvars for config structs + do_ignore: true diff --git a/docs/helpers/global_vars.yaml b/docs/helpers/global_vars.yaml deleted file mode 100644 index 25f11a915..000000000 --- a/docs/helpers/global_vars.yaml +++ /dev/null @@ -1,73 +0,0 @@ -variables: -- rawname: CS3_GATEWAY - path: services/idp/pkg/backends/cs3/bootstrap/cs3.go:76 - foundincode: true - name: "CS3_GATEWAY" - type: "" - default_value: "" - description: "" - do_ignore: true -- rawname: CS3_MACHINE_AUTH_API_KEY - path: services/idp/pkg/backends/cs3/bootstrap/cs3.go:77 - foundincode: true - name: "CS3_MACHINE_AUTH_API_KEY" - type: "" - default_value: "" - description: "" - do_ignore: true -- rawname: MICRO_LOG_LEVEL - path: ocis-pkg/log/log.go:34 - foundincode: true - name: "MICRO_LOG_LEVEL" - type: "string" - default_value: "Error" - description: "Set the log level for the internal go micro framework. Only change on supervision of ownCloud Support." - do_ignore: false -- rawname: MICRO_LOG_LEVEL - path: ocis-pkg/log/log.go:30 - foundincode: true - name: "MICRO_LOG_LEVEL" - type: "" - default_value: "" - description: "" - do_ignore: true -- rawname: registryEnv - path: ocis-pkg/registry/registry.go:44 - foundincode: true - name: "MICRO_REGISTRY" - type: "string" - default_value: "" - description: "Go micro registry type to use. Supported types are: 'nats', 'kubernetes', 'etcd', 'consul' and 'memory'. Will be selected automatically. Only change on supervision of ownCloud Support." - do_ignore: false -- rawname: registryAddressEnv - path: ocis-pkg/registry/registry.go:42 - foundincode: true - name: "MICRO_REGISTRY_ADDRESS" - type: "string" - default_value: "" - description: "The bind address of the internal go micro framework. Only change on supervision of ownCloud Support." - do_ignore: false -- rawname: OCIS_BASE_DATA_PATH - path: ocis-pkg/config/defaults/paths.go:23 - foundincode: true - name: "OCIS_BASE_DATA_PATH" - type: "string" - default_value: "'/var/lib/ocis' or '$HOME/.ocis/'" - description: "The base directory location used by several services and for user data. Predefined to '/var/lib/ocis' for container images (inside the container) or '$HOME/.ocis/' for binary releases. Can be adapted for services individually." - do_ignore: false -- rawname: OCIS_CONFIG_DIR - path: ocis-pkg/config/defaults/paths.go:56 - foundincode: true - name: "OCIS_CONFIG_DIR" - type: "string" - default_value: "'/etc/ocis' or '$HOME/.ocis/config'" - description: "The default directory location for config files. Predefined to '/etc/ocis' for container images (inside the container) or '$HOME/.ocis/config' for binary releases." - do_ignore: false -- rawname: parts[0] - path: ocis-pkg/config/envdecode/envdecode.go:382 - foundincode: true - name: parts[0] - type: "" - default_value: "" - description: false positive - code that extract envvars for config structs - do_ignore: true diff --git a/docs/helpers/rogueEnv.go b/docs/helpers/rogueEnv.go index ec177bd4c..1b6bcd988 100644 --- a/docs/helpers/rogueEnv.go +++ b/docs/helpers/rogueEnv.go @@ -15,7 +15,7 @@ import ( "gopkg.in/yaml.v2" ) -const yamlSource = "global_vars.yaml" +const yamlSource = "extended_vars.yaml" // ConfigVars is the main yaml source type ConfigVars struct { @@ -70,7 +70,7 @@ func GetRogueEnvs() { log.Fatal(err) } fmt.Println("Gathering variable definitions from source") - out, err := exec.Command("bash", "-c", "grep -RHn os.Getenv | grep -v rogueEnv.go |grep \\.go").Output() + out, err := exec.Command("sh", "-c", "grep -RHn os.Getenv | grep -v rogueEnv.go |grep \\.go").Output() if err != nil { log.Fatal(err) } @@ -164,7 +164,7 @@ func RenderGlobalVarsTemplate() { log.Fatal(err) } - targetFile, err := os.Create(filepath.Join(targetFolder, "global_configvars.adoc")) + targetFile, err := os.Create(filepath.Join(targetFolder, "extended_configvars.adoc")) if err != nil { log.Fatalf("Failed to create target file: %s", err) }