Skip to content

Commit

Permalink
enhance(pipeline/exec): include changeset for ruleset matching (#495)
Browse files Browse the repository at this point in the history
  • Loading branch information
ecrupper authored Oct 19, 2023
1 parent 0c01e2b commit 44e8896
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 0 deletions.
1 change: 1 addition & 0 deletions action/pipeline/exec.go
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ func (c *Config) Exec(client compiler.Engine) error {
Duplicate().
WithBuild(b).
WithComment(c.Comment).
WithFiles(c.FileChangeset).
WithLocal(true).
WithRepo(r).
WithLocalTemplates(c.TemplateFiles).
Expand Down
1 change: 1 addition & 0 deletions action/pipeline/pipeline.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ type Config struct {
Repo string
Ref string
File string
FileChangeset []string
Path string
Type string
Stages bool
Expand Down
7 changes: 7 additions & 0 deletions command/pipeline/exec.go
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,12 @@ var CommandExec = &cli.Command{
Name: "target",
Usage: "provide the build target for the pipeline",
},
&cli.StringSliceFlag{
EnvVars: []string{"VELA_FILE_CHANGESET", "FILE_CHANGESET"},
Name: "file-changeset",
Aliases: []string{"fcs"},
Usage: "provide a list of files changed for ruleset matching",
},

// Output Flags

Expand Down Expand Up @@ -259,6 +265,7 @@ func exec(c *cli.Context) error {
Org: c.String(internal.FlagOrg),
Repo: c.String(internal.FlagRepo),
File: c.String("file"),
FileChangeset: c.StringSlice("file-changeset"),
TemplateFiles: c.StringSlice("template-file"),
Local: c.Bool("local"),
Path: c.String("path"),
Expand Down

0 comments on commit 44e8896

Please sign in to comment.