fix todo for missing env variables from api

This commit is contained in:
Brad Rydzewski 2017-05-23 20:08:06 +02:00
parent 0b4dbf86a4
commit 076dc0c3b9
2 changed files with 3 additions and 1 deletions

View file

@ -494,8 +494,8 @@ func PostBuild(c *gin.Context) {
Regs: regs,
Link: httputil.GetURL(c.Request),
Yaml: conf.Data,
Envs: buildParams,
}
// TODO inject environment varibles !!!!!! buildParams
items, err := b.Build()
if err != nil {
build.Status = model.StatusError

View file

@ -394,6 +394,7 @@ type builder struct {
Regs []*model.Registry
Link string
Yaml string
Envs map[string]string
}
type buildItem struct {
@ -481,6 +482,7 @@ func (b *builder) Build() ([]*buildItem, error) {
ir := compiler.New(
compiler.WithEnviron(environ),
compiler.WithEnviron(b.Envs),
compiler.WithEscalated(Config.Pipeline.Privileged...),
compiler.WithVolumes(Config.Pipeline.Volumes...),
compiler.WithNetworks(Config.Pipeline.Networks...),