feat(cmd/joj3): trigger old conf on new stages empty
All checks were successful
build / build (push) Successful in 1m5s
build / trigger-build-image (push) Has been skipped
build / build (pull_request) Successful in 1m5s
build / trigger-build-image (pull_request) Has been skipped

This commit is contained in:
张泊明518370910136 2024-10-12 01:18:25 -04:00
parent 40fc67a60d
commit 459d1bf53d
GPG Key ID: D47306D7062CDA9D

View File

@ -160,22 +160,24 @@ func parseConfFile(path string) (conf Conf, err error) {
return return
} }
// TODO: remove the following backward compatibility codes // TODO: remove the following backward compatibility codes
conf.Stage.SandboxExecServer = conf.SandboxExecServer if len(conf.Stage.Stages) == 0 {
conf.Stage.SandboxToken = conf.SandboxToken conf.Stage.SandboxExecServer = conf.SandboxExecServer
conf.Stage.OutputPath = conf.OutputPath conf.Stage.SandboxToken = conf.SandboxToken
conf.Stage.Stages = make([]ConfStage, len(conf.Stages)) conf.Stage.OutputPath = conf.OutputPath
for i, stage := range conf.Stages { conf.Stage.Stages = make([]ConfStage, len(conf.Stages))
conf.Stage.Stages[i].Name = stage.Name for i, stage := range conf.Stages {
conf.Stage.Stages[i].Group = stage.Group conf.Stage.Stages[i].Name = stage.Name
conf.Stage.Stages[i].Executor = stage.Executor conf.Stage.Stages[i].Group = stage.Group
conf.Stage.Stages[i].Parsers = []struct { conf.Stage.Stages[i].Executor = stage.Executor
Name string conf.Stage.Stages[i].Parsers = []struct {
With interface{} Name string
}{ With interface{}
{ }{
Name: stage.Parser.Name, {
With: stage.Parser.With, Name: stage.Parser.Name,
}, With: stage.Parser.With,
},
}
} }
} }
return return