From 9abd0002d75d29471ddacf8e76b3f13675979bfb Mon Sep 17 00:00:00 2001 From: 6543 <6543@obermui.de> Date: Mon, 22 Jul 2024 21:23:59 +0200 Subject: [PATCH 1/4] Removed `WOODPECKER_DEV_OAUTH_HOST` and `WOODPECKER_DEV_GITEA_OAUTH_URL` use `WOODPECKER_DEV_OAUTH_HOST` --- cmd/server/flags.go | 10 +--------- docs/docs/91-migrations.md | 2 +- 2 files changed, 2 insertions(+), 10 deletions(-) diff --git a/cmd/server/flags.go b/cmd/server/flags.go index 697ff455fc..a1fc44c7ca 100644 --- a/cmd/server/flags.go +++ b/cmd/server/flags.go @@ -378,7 +378,7 @@ var flags = append([]cli.Flag{ "WOODPECKER_BITBUCKET_SKIP_VERIFY"), }, &cli.StringFlag{ - Sources: cli.EnvVars("WOODPECKER_EXPERT_FORGE_OAUTH_HOST", "WOODPECKER_DEV_GITEA_OAUTH_URL"), // TODO: remove WOODPECKER_DEV_GITEA_OAUTH_URL in next major release + Sources: cli.EnvVars("WOODPECKER_EXPERT_FORGE_OAUTH_HOST"), Name: "forge-oauth-host", Usage: "!!!for experts!!! fully qualified public forge url. Use it if your forge url WOODPECKER_FORGE_URL or WOODPECKER_GITEA_URL, ... isn't a public url. Format: ://[/]", }, @@ -481,14 +481,6 @@ var flags = append([]cli.Flag{ Name: "server-webhook-host", Usage: "!!!for experts!!! fully qualified woodpecker server url called by forge's webhooks. Format: ://[/]", }, - // TODO: remove in next major release - &cli.StringFlag{ - Sources: cli.EnvVars("WOODPECKER_DEV_OAUTH_HOST"), - Name: "server-dev-oauth-host-deprecated", - Usage: "DEPRECATED: use WOODPECKER_EXPERT_FORGE_OAUTH_HOST instead\nfully qualified url used for oauth redirects. Format: ://[/]", - Value: "", - Hidden: true, - }, // // secrets encryption in DB // diff --git a/docs/docs/91-migrations.md b/docs/docs/91-migrations.md index 84a79ac5e1..3bf9ae8f21 100644 --- a/docs/docs/91-migrations.md +++ b/docs/docs/91-migrations.md @@ -11,6 +11,7 @@ Some versions need some changes to the server configuration or the pipeline conf ## `next` +- Removed `WOODPECKER_DEV_OAUTH_HOST` and `WOODPECKER_DEV_GITEA_OAUTH_URL` use `WOODPECKER_DEV_OAUTH_HOST` - Deprecated `steps.[name].group` in favor of `steps.[name].depends_on` (see [workflow syntax](./20-usage/20-workflow-syntax.md#depends_on) to learn how to set dependencies) - Removed `WOODPECKER_ROOT_PATH` and `WOODPECKER_ROOT_URL` config variables. Use `WOODPECKER_HOST` with a path instead - Pipelines without a config file will now be skipped instead of failing @@ -19,7 +20,6 @@ Some versions need some changes to the server configuration or the pipeline conf - Deprecated alternative names for secrets, use `environment` with `from_secret` - Deprecated slice definition for env vars - Deprecated `environment` filter, use `when.evaluate` -- Use `WOODPECKER_EXPERT_FORGE_OAUTH_HOST` instead of `WOODPECKER_DEV_GITEA_OAUTH_URL` or `WOODPECKER_DEV_OAUTH_HOST` - Deprecated `WOODPECKER_WEBHOOK_HOST` in favor of `WOODPECKER_EXPERT_WEBHOOK_HOST` ## 2.0.0 From f8ef453de5669cb24660ae9d6b0b70f42e91a6c2 Mon Sep 17 00:00:00 2001 From: 6543 <6543@obermui.de> Date: Tue, 23 Jul 2024 13:03:06 +0200 Subject: [PATCH 2/4] Update docs/docs/91-migrations.md Co-authored-by: qwerty287 <80460567+qwerty287@users.noreply.github.com> --- docs/docs/91-migrations.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/docs/91-migrations.md b/docs/docs/91-migrations.md index 3bf9ae8f21..35ff2a9779 100644 --- a/docs/docs/91-migrations.md +++ b/docs/docs/91-migrations.md @@ -11,7 +11,7 @@ Some versions need some changes to the server configuration or the pipeline conf ## `next` -- Removed `WOODPECKER_DEV_OAUTH_HOST` and `WOODPECKER_DEV_GITEA_OAUTH_URL` use `WOODPECKER_DEV_OAUTH_HOST` +- Removed `WOODPECKER_DEV_OAUTH_HOST` and `WOODPECKER_DEV_GITEA_OAUTH_URL` use ` WOODPECKER_EXPERT_FORGE_OAUTH_HOST` - Deprecated `steps.[name].group` in favor of `steps.[name].depends_on` (see [workflow syntax](./20-usage/20-workflow-syntax.md#depends_on) to learn how to set dependencies) - Removed `WOODPECKER_ROOT_PATH` and `WOODPECKER_ROOT_URL` config variables. Use `WOODPECKER_HOST` with a path instead - Pipelines without a config file will now be skipped instead of failing From a0d11cf2f9cd6b59e5738809797a2a8dc82f33de Mon Sep 17 00:00:00 2001 From: 6543 <6543@obermui.de> Date: Tue, 23 Jul 2024 13:41:09 +0200 Subject: [PATCH 3/4] rm --- cmd/server/setup.go | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/cmd/server/setup.go b/cmd/server/setup.go index 71c2ac71d4..f394c07770 100644 --- a/cmd/server/setup.go +++ b/cmd/server/setup.go @@ -206,11 +206,7 @@ func setupEvilGlobals(ctx context.Context, c *cli.Command, s store.Store) error } else { server.Config.Server.WebhookHost = serverHost } - if c.IsSet("server-dev-oauth-host-deprecated") { - server.Config.Server.OAuthHost = c.String("server-dev-oauth-host-deprecated") - } else { - server.Config.Server.OAuthHost = serverHost - } + server.Config.Server.OAuthHost = serverHost server.Config.Server.Port = c.String("server-addr") server.Config.Server.PortTLS = c.String("server-addr-tls") server.Config.Server.StatusContext = c.String("status-context") From fb813a1b71243925c67f22d9144c0fcc937cfd9b Mon Sep 17 00:00:00 2001 From: 6543 <6543@obermui.de> Date: Tue, 23 Jul 2024 13:52:18 +0200 Subject: [PATCH 4/4] fix lint issue --- docs/docs/91-migrations.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/docs/91-migrations.md b/docs/docs/91-migrations.md index def2a23f92..4becb088e6 100644 --- a/docs/docs/91-migrations.md +++ b/docs/docs/91-migrations.md @@ -11,7 +11,7 @@ Some versions need some changes to the server configuration or the pipeline conf ## `next` -- Removed `WOODPECKER_DEV_OAUTH_HOST` and `WOODPECKER_DEV_GITEA_OAUTH_URL` use ` WOODPECKER_EXPERT_FORGE_OAUTH_HOST` +- Removed `WOODPECKER_DEV_OAUTH_HOST` and `WOODPECKER_DEV_GITEA_OAUTH_URL` use `WOODPECKER_EXPERT_FORGE_OAUTH_HOST` - Compatibility mode of deprecated `pipeline:`, `platform:` and `branches:` pipeline config options are now removed and pipeline will now fail if still in use. - Deprecated `steps.[name].group` in favor of `steps.[name].depends_on` (see [workflow syntax](./20-usage/20-workflow-syntax.md#depends_on) to learn how to set dependencies) - Removed `WOODPECKER_ROOT_PATH` and `WOODPECKER_ROOT_URL` config variables. Use `WOODPECKER_HOST` with a path instead