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:
commit
8179e8c324
@ -16,7 +16,11 @@ var (
|
||||
// Environ transforms the steps in the Yaml pipeline to include runtime
|
||||
// environment variables.
|
||||
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 {
|
||||
p.Environment = map[string]string{}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user