make WOODPECKER_MIGRATIONS_ALLOW_LONG have an actuall effect (#2251)

close #2079

as we sett the global vars **after** migrations we did never had a
chance to propagate a **true** in WOODPECKER_MIGRATIONS_ALLOW_LONG to
the migrations ...

---------

Co-authored-by: qwerty287 <80460567+qwerty287@users.noreply.github.com>
This commit is contained in:
6543 2023-08-21 09:29:45 +02:00 committed by GitHub
parent 35baaa8224
commit 350282ce29
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 1 deletions

View file

@ -354,7 +354,6 @@ func setupEvilGlobals(c *cli.Context, v store.Store, f forge.Forge) {
server.Config.Pipeline.Networks = c.StringSlice("network")
server.Config.Pipeline.Volumes = c.StringSlice("volume")
server.Config.Pipeline.Privileged = c.StringSlice("escalate")
server.Config.Server.Migrations.AllowLong = c.Bool("migrations-allow-long")
server.Config.Server.EnableSwagger = c.Bool("enable-swagger")
// prometheus

View file

@ -52,6 +52,8 @@ import (
)
func setupStore(c *cli.Context) (store.Store, error) {
// TODO: find a better way than global var to pass down to allow long migrations
server.Config.Server.Migrations.AllowLong = c.Bool("migrations-allow-long")
datasource := c.String("datasource")
driver := c.String("driver")
xorm := store.XORM{