|
|
|
|
@ -34,6 +34,9 @@ var buildSchema = &hcl.BodySchema{
|
|
|
|
|
// post-processor "" { ... }
|
|
|
|
|
// }
|
|
|
|
|
type BuildBlock struct {
|
|
|
|
|
// Name is a string representing the named build to show in the logs
|
|
|
|
|
Name string
|
|
|
|
|
|
|
|
|
|
// Sources is the list of sources that we want to start in this build block.
|
|
|
|
|
Sources []SourceRef
|
|
|
|
|
|
|
|
|
|
@ -56,6 +59,7 @@ func (p *Parser) decodeBuildConfig(block *hcl.Block) (*BuildBlock, hcl.Diagnosti
|
|
|
|
|
build := &BuildBlock{}
|
|
|
|
|
|
|
|
|
|
var b struct {
|
|
|
|
|
Name string `hcl:"name,optional"`
|
|
|
|
|
FromSources []string `hcl:"sources"`
|
|
|
|
|
Config hcl.Body `hcl:",remain"`
|
|
|
|
|
}
|
|
|
|
|
@ -64,6 +68,8 @@ func (p *Parser) decodeBuildConfig(block *hcl.Block) (*BuildBlock, hcl.Diagnosti
|
|
|
|
|
return nil, diags
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
build.Name = b.Name
|
|
|
|
|
|
|
|
|
|
for _, buildFrom := range b.FromSources {
|
|
|
|
|
ref := sourceRefFromString(buildFrom)
|
|
|
|
|
|
|
|
|
|
|