mirror of
https://github.com/woodpecker-ci/woodpecker.git
synced 2024-12-25 09:50:31 +00:00
Merge pull request #1670 from josmo/initializemap
update to initialize the Environment map
This commit is contained in:
commit
8179e8c324
1 changed files with 5 additions and 1 deletions
|
@ -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 a new issue