Skip to content

Commit

Permalink
fix todo for missing env variables from api
Browse files Browse the repository at this point in the history
  • Loading branch information
bradrydzewski committed May 23, 2017
1 parent 0b4dbf8 commit 076dc0c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion server/build.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 2 additions & 0 deletions server/hook.go
Original file line number Diff line number Diff line change
Expand Up @@ -394,6 +394,7 @@ type builder struct {
Regs []*model.Registry
Link string
Yaml string
Envs map[string]string
}

type buildItem struct {
Expand Down Expand Up @@ -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...),
Expand Down

0 comments on commit 076dc0c

Please sign in to comment.