make WOODPECKER_MIGRATIONS_ALLOW_LONG have an actuall effect (#2251) (#2309)

This commit is contained in:
qwerty287
2023-08-21 11:13:20 +02:00
committed by GitHub
parent c96faa43f7
commit 3fba8e38bf
2 changed files with 2 additions and 1 deletions

View File

@@ -367,7 +367,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")
// prometheus
server.Config.Prometheus.AuthToken = c.String("prometheus-auth-token")

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{