Skip to content

Commit

Permalink
init commit
Browse files Browse the repository at this point in the history
  • Loading branch information
ecrupper committed Apr 30, 2024
1 parent f24f795 commit 18713cc
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 3 additions & 1 deletion pipeline/container.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ type (
Volumes VolumeSlice `json:"volumes,omitempty" yaml:"volumes,omitempty"`
User string `json:"user,omitempty" yaml:"user,omitempty"`
ReportAs string `json:"report_as,omitempty" yaml:"report_as,omitempty"`
IDRequest string `json:"id_request,omitempty" yaml:"id_request,omitempty"`
}
)

Expand Down Expand Up @@ -135,7 +136,8 @@ func (c *Container) Empty() bool {
len(c.Ulimits) == 0 &&
len(c.Volumes) == 0 &&
len(c.User) == 0 &&
len(c.ReportAs) == 0 {
len(c.ReportAs) == 0 &&
len(c.IDRequest) == 0 {
return true
}

Expand Down
2 changes: 2 additions & 0 deletions yaml/step.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ type (
Privileged bool `yaml:"privileged,omitempty" json:"privileged,omitempty" jsonschema:"description=Run the container with extra privileges.\nReference: https://go-vela.github.io/docs/reference/yaml/steps/#the-privileged-tag"`
User string `yaml:"user,omitempty" json:"user,omitempty" jsonschema:"description=Set the user for the container.\nReference: https://go-vela.github.io/docs/reference/yaml/steps/#the-user-tag"`
ReportAs string `yaml:"report_as,omitempty" json:"report_as,omitempty" jsonschema:"description=Set the name of the step to report as.\nReference: https://go-vela.github.io/docs/reference/yaml/steps/#the-report_as-tag"`
IDRequest string `yaml:"id_request,omitempty" json:"id_request,omitempty" jsonschema:"description=Request ID Request Token for the step.\nReference: https://go-vela.github.io/docs/reference/yaml/steps/#the-id_request-tag"`
}
)

Expand Down Expand Up @@ -62,6 +63,7 @@ func (s *StepSlice) ToPipeline() *pipeline.ContainerSlice {
Volumes: *step.Volumes.ToPipeline(),
User: step.User,
ReportAs: step.ReportAs,
IDRequest: step.IDRequest,
})
}

Expand Down

0 comments on commit 18713cc

Please sign in to comment.