Various enhancements in configuration (#1645)

- backends: move to cli flags instead of os.Getenv
- ssh: support 2fa with key and password
- allow to set grpc jwt secret (solves todo)
- allow to set default and max timeout (solves todo)

Closes https://github.com/woodpecker-ci/woodpecker/issues/896
Closes https://github.com/woodpecker-ci/woodpecker/issues/1131
This commit is contained in:
qwerty287
2023-03-19 20:24:43 +01:00
committed by GitHub
parent 56e6639396
commit f582ad3159
19 changed files with 221 additions and 104 deletions

View File

@@ -203,14 +203,15 @@ func execWithAxis(c *cli.Context, file, repoPath string, axis matrix.Axis) error
return err
}
backend.Init(context.WithValue(c.Context, types.CliContext, c))
backendCtx := context.WithValue(c.Context, types.CliContext, c)
backend.Init(backendCtx)
engine, err := backend.FindEngine(c.String("backend-engine"))
engine, err := backend.FindEngine(backendCtx, c.String("backend-engine"))
if err != nil {
return err
}
if err = engine.Load(); err != nil {
if err = engine.Load(backendCtx); err != nil {
return err
}