update to initialize the Environment map

This commit is contained in:
Joachim Hill-Grannec 2016-06-10 17:02:00 -07:00
parent ecc2728d9f
commit fd2b4b71ba

View file

@ -210,6 +210,9 @@ 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(