mirror of
https://github.com/woodpecker-ci/woodpecker.git
synced 2025-09-25 19:35:07 +00:00
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:
@@ -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.Networks = c.StringSlice("network")
|
||||||
server.Config.Pipeline.Volumes = c.StringSlice("volume")
|
server.Config.Pipeline.Volumes = c.StringSlice("volume")
|
||||||
server.Config.Pipeline.Privileged = c.StringSlice("escalate")
|
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")
|
server.Config.Server.EnableSwagger = c.Bool("enable-swagger")
|
||||||
|
|
||||||
// prometheus
|
// prometheus
|
||||||
|
@@ -52,6 +52,8 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
func setupStore(c *cli.Context) (store.Store, error) {
|
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")
|
datasource := c.String("datasource")
|
||||||
driver := c.String("driver")
|
driver := c.String("driver")
|
||||||
xorm := store.XORM{
|
xorm := store.XORM{
|
||||||
|
Reference in New Issue
Block a user