Skip to content

Commit

Permalink
Merge pull request #1456 from jonjohnsonjr/replace-pipeline
Browse files Browse the repository at this point in the history
config: Replace pipelines at top level
  • Loading branch information
jonjohnsonjr authored Aug 26, 2024
2 parents 12eca93 + 01fb1f7 commit d3ba4be
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 2 additions & 0 deletions pkg/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -1061,6 +1061,8 @@ func ParseConfiguration(ctx context.Context, configurationFilePath string, opts

cfg.Package = replacePackage(replacer, detectedCommit, cfg.Package)

cfg.Pipeline = replacePipelines(replacer, cfg.Pipeline)

datas := make(map[string]DataItems, len(cfg.Data))
for _, d := range cfg.Data {
datas[d.Name] = d.Items
Expand Down
3 changes: 2 additions & 1 deletion pkg/config/config_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -311,7 +311,7 @@ pipeline:
- runs: pwd
- uses: fetch
with:
uri: https://example.com/foo.zip
uri: https://example.com/foo-${{package.version}}.zip
expected-sha256: 123456
`), 0644); err != nil {
t.Fatal(err)
Expand All @@ -328,6 +328,7 @@ pipeline:
require.Equal(t, "/home/build/baz", cfg.Pipeline[1].Pipeline[0].Pipeline[0].WorkDir)
require.Equal(t, "/home/build/baz", cfg.Pipeline[1].Pipeline[0].Pipeline[1].WorkDir)
require.Equal(t, "/home/build/baz", cfg.Pipeline[1].Pipeline[0].Pipeline[2].WorkDir)
require.Equal(t, "https://example.com/foo-0.0.1.zip", cfg.Pipeline[1].Pipeline[0].Pipeline[2].With["uri"])
}

func TestDuplicateSubpackage(t *testing.T) {
Expand Down

0 comments on commit d3ba4be

Please sign in to comment.