File tree Expand file tree Collapse file tree 12 files changed +75
-11
lines changed
Expand file tree Collapse file tree 12 files changed +75
-11
lines changed Original file line number Diff line number Diff line change @@ -366,6 +366,24 @@ Use this command to export ingest pipelines with referenced pipelines from the E
366366
367367Use this command to download selected ingest pipelines and its referenced processor pipelines from Elasticsearch. Select data stream or the package root directories to download the pipelines. Pipelines are downloaded as is and will need adjustment to meet your package needs.
368368
369+ ### ` elastic-package filter [flags] `
370+
371+ _ Context: package_
372+
373+ This command gives you a list of all packages based on the given query
374+
375+ ### ` elastic-package foreach [flags] -- <SUBCOMMAND> `
376+
377+ _ Context: package_
378+
379+ Execute a command for each package matching the given filter criteria.
380+
381+ This command combines filtering capabilities with command execution, allowing you to run
382+ any elastic-package subcommand across multiple packages in a single operation.
383+
384+ The command uses the same filter flags as the 'filter' command to select packages,
385+ then executes the specified subcommand for each matched package.
386+
369387### ` elastic-package format `
370388
371389_ Context: package_
Original file line number Diff line number Diff line change @@ -11,10 +11,11 @@ import (
1111 "os"
1212 "slices"
1313
14+ "github.com/spf13/cobra"
15+
1416 "github.com/elastic/elastic-package/internal/cobraext"
1517 "github.com/elastic/elastic-package/internal/filter"
1618 "github.com/elastic/elastic-package/internal/packages"
17- "github.com/spf13/cobra"
1819)
1920
2021const filterLongDescription = `This command gives you a list of all packages based on the given query`
Original file line number Diff line number Diff line change @@ -14,12 +14,13 @@ import (
1414 "strings"
1515 "sync"
1616
17+ "github.com/spf13/cobra"
18+
1719 "github.com/elastic/elastic-package/internal/cobraext"
1820 "github.com/elastic/elastic-package/internal/filter"
1921 "github.com/elastic/elastic-package/internal/logger"
2022 "github.com/elastic/elastic-package/internal/multierror"
2123 "github.com/elastic/elastic-package/internal/packages"
22- "github.com/spf13/cobra"
2324)
2425
2526const foreachLongDescription = `Execute a command for each package matching the given filter criteria.
Original file line number Diff line number Diff line change 1+ // Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
2+ // or more contributor license agreements. Licensed under the Elastic License;
3+ // you may not use this file except in compliance with the Elastic License.
4+
15package filter
26
37import (
8+ "github.com/spf13/cobra"
9+
410 "github.com/elastic/elastic-package/internal/cobraext"
511 "github.com/elastic/elastic-package/internal/packages"
6- "github.com/spf13/cobra"
712)
813
914type CategoryFlag struct {
Original file line number Diff line number Diff line change 1+ // Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
2+ // or more contributor license agreements. Licensed under the Elastic License;
3+ // you may not use this file except in compliance with the Elastic License.
4+
15package filter
26
37import (
48 "fmt"
59
10+ "github.com/spf13/cobra"
11+
612 "github.com/elastic/elastic-package/internal/cobraext"
713 "github.com/elastic/elastic-package/internal/packages"
814 "github.com/elastic/elastic-package/internal/tui"
9- "github.com/spf13/cobra"
1015)
1116
1217type CodeOwnerFlag struct {
Original file line number Diff line number Diff line change 1+ // Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
2+ // or more contributor license agreements. Licensed under the Elastic License;
3+ // you may not use this file except in compliance with the Elastic License.
4+
15package filter
26
37import (
8+ "github.com/spf13/cobra"
9+
410 "github.com/elastic/elastic-package/internal/cobraext"
511 "github.com/elastic/elastic-package/internal/packages"
6- "github.com/spf13/cobra"
712)
813
914type InputFlag struct {
Original file line number Diff line number Diff line change 1+ // Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
2+ // or more contributor license agreements. Licensed under the Elastic License;
3+ // you may not use this file except in compliance with the Elastic License.
4+
15package filter
26
37import (
8+ "github.com/spf13/cobra"
9+
410 "github.com/elastic/elastic-package/internal/cobraext"
511 "github.com/elastic/elastic-package/internal/packages"
6- "github.com/spf13/cobra"
712)
813
914type IntegrationTypeFlag struct {
Original file line number Diff line number Diff line change 1+ // Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
2+ // or more contributor license agreements. Licensed under the Elastic License;
3+ // you may not use this file except in compliance with the Elastic License.
4+
15package filter
26
37import (
48 "fmt"
59
6- "github.com/elastic/elastic-package/internal/cobraext"
7- "github.com/elastic/elastic-package/internal/packages"
810 "github.com/gobwas/glob"
911 "github.com/spf13/cobra"
12+
13+ "github.com/elastic/elastic-package/internal/cobraext"
14+ "github.com/elastic/elastic-package/internal/packages"
1015)
1116
1217type PackageNameFlag struct {
Original file line number Diff line number Diff line change 1+ // Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
2+ // or more contributor license agreements. Licensed under the Elastic License;
3+ // you may not use this file except in compliance with the Elastic License.
4+
15package filter
26
37import (
48 "fmt"
59
10+ "github.com/spf13/cobra"
11+
612 "github.com/elastic/elastic-package/internal/logger"
713 "github.com/elastic/elastic-package/internal/multierror"
814 "github.com/elastic/elastic-package/internal/packages"
9- "github.com/spf13/cobra"
1015)
1116
1217var registry = []Filter {
Original file line number Diff line number Diff line change 1+ // Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
2+ // or more contributor license agreements. Licensed under the Elastic License;
3+ // you may not use this file except in compliance with the Elastic License.
4+
15package filter
26
37import (
48 "fmt"
59
610 "github.com/Masterminds/semver/v3"
11+ "github.com/spf13/cobra"
12+
713 "github.com/elastic/elastic-package/internal/cobraext"
814 "github.com/elastic/elastic-package/internal/packages"
9- "github.com/spf13/cobra"
1015)
1116
1217type SpecVersionFlag struct {
You can’t perform that action at this time.
0 commit comments