mirror of
https://github.com/woodpecker-ci/woodpecker.git
synced 2024-11-23 02:11:01 +00:00
Allowing for services with no environment defined.
This commit is contained in:
parent
fd2b4b71ba
commit
7e5a6ec9fb
2 changed files with 5 additions and 4 deletions
|
@ -210,9 +210,6 @@ func (a *Agent) exec(spec *yaml.Config, payload *queue.Work, cancel <-chan bool)
|
|||
}
|
||||
// updates the build status passed into each container. I realize this is
|
||||
// a bit out of place and will work to resolve.
|
||||
if pipeline.Head().Environment == nil {
|
||||
pipeline.Head().Environment = make(map[string]string)
|
||||
}
|
||||
pipeline.Head().Environment["DRONE_BUILD_STATUS"] = status
|
||||
|
||||
if !pipeline.Head().Constraints.Match(
|
||||
|
|
|
@ -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