diff --git a/.buildkite/pull-requests.json b/.buildkite/pull-requests.json index bb074620ff65..5b631c82254a 100644 --- a/.buildkite/pull-requests.json +++ b/.buildkite/pull-requests.json @@ -96,22 +96,6 @@ "skip_ci_on_only_changed": [ ], "always_require_ci_on_changed": ["^x-pack/libbeat/.*", "^.buildkite/.*", "^go.mod", "^pytest.ini", "^dev-tools/.*", "^libbeat/.*", "^testing/.*", "^x-pack/libbeat/.*"] }, - { - "enabled": true, - "pipelineSlug": "beats-xpack-auditbeat", - "allow_org_users": true, - "allowed_repo_permissions": ["admin", "write"], - "allowed_list": [ ], - "set_commit_status": true, - "build_on_commit": true, - "build_on_comment": true, - "trigger_comment_regex": "^/test x-pack/auditbeat$", - "always_trigger_comment_regex": "^/test x-pack/auditbeat$", - "skip_ci_labels": [ ], - "skip_target_branches": [ ], - "skip_ci_on_only_changed": [ ], - "always_require_ci_on_changed": ["^x-pack/auditbeat/.*", "^.buildkite/.*", "^go.mod", "^pytest.ini", "^dev-tools/.*", "^libbeat/.*", "^testing/.*", "^x-pack/libbeat/.*"] - }, { "enabled": true, "pipelineSlug": "beats-xpack-heartbeat", diff --git a/x-pack/metricbeat/cmd/root.go b/x-pack/metricbeat/cmd/root.go index 76ac09294408..e62ccd33c6cc 100644 --- a/x-pack/metricbeat/cmd/root.go +++ b/x-pack/metricbeat/cmd/root.go @@ -5,14 +5,11 @@ package cmd import ( - "flag" "fmt" "github.com/spf13/cobra" - "github.com/spf13/pflag" "github.com/elastic/beats/v7/libbeat/cmd" - "github.com/elastic/beats/v7/libbeat/cmd/instance" "github.com/elastic/beats/v7/libbeat/ecs" "github.com/elastic/beats/v7/libbeat/processors" "github.com/elastic/beats/v7/libbeat/publisher/processing" @@ -47,19 +44,13 @@ var withECSVersion = processing.WithFields(mapstr.M{ }) func init() { - var runFlags = pflag.NewFlagSet(Name, pflag.ExitOnError) - runFlags.AddGoFlag(flag.CommandLine.Lookup("system.hostfs")) globalProcs, err := processors.NewPluginConfigFromList(defaultProcessors()) if err != nil { // these are hard-coded, shouldn't fail panic(fmt.Errorf("error creating global processors: %w", err)) } - settings := instance.Settings{ - RunFlags: runFlags, - Name: Name, - HasDashboards: true, - ElasticLicensed: true, - Processing: processing.MakeDefaultSupport(true, globalProcs, withECSVersion, processing.WithHost, processing.WithAgentMeta()), - } + settings := mbcmd.MetricbeatSettings() + settings.ElasticLicensed = true + settings.Processing = processing.MakeDefaultSupport(true, globalProcs, withECSVersion, processing.WithHost, processing.WithAgentMeta()) RootCmd = cmd.GenRootCmdWithSettings(beater.DefaultCreator(), settings) RootCmd.AddCommand(cmd.GenModulesCmd(Name, "", mbcmd.BuildModulesManager)) RootCmd.TestCmd.AddCommand(test.GenTestModulesCmd(Name, "", beater.DefaultTestModulesCreator()))