Revert "Do not run clone step if no pipeline step will run (#877)"

This reverts commit f05f918b8d.
This commit is contained in:
6543
2022-05-20 05:20:17 +02:00
parent 328eb98109
commit e2e094cfda
3 changed files with 20 additions and 39 deletions

View File

@@ -183,7 +183,6 @@ func (c *Compiler) Compile(conf *yaml.Config) *backend.Config {
config.Stages = append(config.Stages, stage)
}
var stages []*backend.Stage
// add pipeline steps. 1 pipeline step per stage, at the moment
var stage *backend.Stage
var group string
@@ -203,7 +202,7 @@ func (c *Compiler) Compile(conf *yaml.Config) *backend.Config {
stage = new(backend.Stage)
stage.Name = fmt.Sprintf("%s_stage_%v", c.prefix, i)
stage.Alias = container.Name
stages = append(stages, stage)
config.Stages = append(config.Stages, stage)
}
name := fmt.Sprintf("%s_step_%d", c.prefix, i)
@@ -211,13 +210,6 @@ func (c *Compiler) Compile(conf *yaml.Config) *backend.Config {
stage.Steps = append(stage.Steps, step)
}
if len(stages) == 0 {
// nothing will run, remove services and clone step
config.Stages = []*backend.Stage{}
} else {
config.Stages = append(config.Stages, stages...)
}
c.setupCacheRebuild(conf, config)
return config