Skip to content

Commit

Permalink
Merge branch 'main' into renovate/all-minor-patch-digest-pin
Browse files Browse the repository at this point in the history
  • Loading branch information
plyr4 authored Sep 20, 2024
2 parents 9c85bca + f318118 commit 9e168db
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions compiler/native/compile.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ import (
yml "gopkg.in/yaml.v3"

api "github.com/go-vela/server/api/types"
"github.com/go-vela/server/internal"
"github.com/go-vela/types/constants"
"github.com/go-vela/types/library"
"github.com/go-vela/types/pipeline"
Expand Down Expand Up @@ -61,6 +62,11 @@ func (c *client) Compile(ctx context.Context, v interface{}) (*pipeline.Build, *
event = event + ":" + action
}

// populate metadata when not provided using compiler.WithMetadata
if c.metadata == nil {
c.metadata = &internal.Metadata{Database: &internal.Database{}, Queue: &internal.Queue{}, Source: &internal.Source{}, Vela: &internal.Vela{}}
}

// create the ruledata to purge steps
r := &pipeline.RuleData{
Branch: c.build.GetBranch(),
Expand Down

0 comments on commit 9e168db

Please sign in to comment.