1
0
mirror of https://github.com/woodpecker-ci/woodpecker.git synced 2024-11-24 08:02:18 +02:00

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...),