mirror of
https://github.com/woodpecker-ci/woodpecker.git
synced 2024-11-27 12:21:03 +00:00
Removing transformations that aren't needed.
This commit is contained in:
parent
aaa702dab6
commit
72e960e46a
2 changed files with 0 additions and 20 deletions
|
@ -138,7 +138,6 @@ func (a *Agent) prep(w *queue.Work) (*yaml.Config, error) {
|
|||
}
|
||||
|
||||
transform.Clone(conf, w.Repo.Kind)
|
||||
transform.Labels(conf)
|
||||
transform.Environ(conf, envs)
|
||||
transform.DefaultFilter(conf)
|
||||
if w.BuildLast != nil {
|
||||
|
|
|
@ -1,19 +0,0 @@
|
|||
package transform
|
||||
|
||||
import (
|
||||
"github.com/drone/drone/yaml"
|
||||
)
|
||||
|
||||
// Labels transforms the steps in the Yaml pipeline to include a Labels if it doens't exist
|
||||
func Labels(c *yaml.Config) error {
|
||||
var images []*yaml.Container
|
||||
images = append(images, c.Pipeline...)
|
||||
images = append(images, c.Services...)
|
||||
|
||||
for _, p := range images {
|
||||
if p.Labels == nil {
|
||||
p.Labels = map[string]string{}
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
Loading…
Reference in a new issue