1
0
mirror of https://github.com/woodpecker-ci/woodpecker.git synced 2024-11-24 08:02:18 +02:00

Merge pull request #1670 from josmo/initializemap

update to initialize the Environment map
This commit is contained in:
Brad Rydzewski 2016-06-10 23:22:23 -07:00 committed by GitHub
commit 8179e8c324

View File

@ -16,7 +16,11 @@ var (
// Environ transforms the steps in the Yaml pipeline to include runtime // Environ transforms the steps in the Yaml pipeline to include runtime
// environment variables. // environment variables.
func Environ(c *yaml.Config, envs map[string]string) error { func Environ(c *yaml.Config, envs map[string]string) error {
for _, p := range c.Pipeline { var images []*yaml.Container
images = append(images, c.Pipeline...)
images = append(images, c.Services...)
for _, p := range images {
if p.Environment == nil { if p.Environment == nil {
p.Environment = map[string]string{} p.Environment = map[string]string{}
} }