1
0
mirror of https://github.com/woodpecker-ci/woodpecker.git synced 2026-06-03 16:35:37 +02:00

Fix extension flag names (#6329)

This commit is contained in:
qwerty287
2026-03-26 12:45:40 +01:00
committed by GitHub
parent 26a01ec229
commit 3c5b24443b
4 changed files with 11 additions and 6 deletions
+4 -3
View File
@@ -275,17 +275,18 @@ var flags = append([]cli.Flag{
},
&cli.StringFlag{
Sources: cli.EnvVars("WOODPECKER_CONFIG_EXTENSION_ENDPOINT", "WOODPECKER_CONFIG_SERVICE_ENDPOINT"), // TODO remove _SERVICE_ var in 4.0.0
Name: "config-service-endpoint",
Name: "config-extension-endpoint",
Aliases: []string{"config-service-endpoint"}, // TODO: remove in v4.0.0
Usage: "url used for calling global configuration service endpoint",
},
&cli.BoolFlag{
Sources: cli.EnvVars("WOODPECKER_CONFIG_EXTENSION_EXCLUSIVE"),
Name: "config-service-exclusive",
Name: "config-extension-exclusive",
Usage: "whether global configuration service endpoint should be exclusive (skip forge)",
},
&cli.StringFlag{
Sources: cli.EnvVars("WOODPECKER_REGISTRY_EXTENSION_ENDPOINT"),
Name: "registry-service-endpoint",
Name: "registry-extension-endpoint",
Usage: "url used for calling registry service endpoint",
},
&cli.StringFlag{
+4
View File
@@ -18,6 +18,10 @@ To enhance the usability of Woodpecker and meet evolving security standards, occ
Extension HTTP calls (as of now the configuration extension) will by default only be allowed to contact external hosts. Set `WOODPECKER_EXTENSIONS_ALLOWED_HOSTS` accordingly to allow additional hosts as needed.
### Internal changes
- Renamed the server flag `config-service-endpoint` to `config-extension-endpoint`
## 3.0.0
### User-facing migrations
+1 -1
View File
@@ -88,7 +88,7 @@ func NewManager(c *cli.Command, store store.Store, setupForge SetupForge) (Manag
signaturePublicKey: signaturePublicKey,
store: store,
secret: setupSecretService(store),
registry: setupRegistryService(store, c.String("docker-config"), c.String("registry-service-endpoint"), client),
registry: setupRegistryService(store, c.String("docker-config"), c.String("registry-extension-endpoint"), client),
config: configService,
environment: environment.Parse(c.StringSlice("environment")),
forgeCache: ttlcache.New(ttlcache.WithDisableTouchOnHit[int64, forge.Forge]()),
+2 -2
View File
@@ -74,9 +74,9 @@ func setupConfigService(c *cli.Command, client *utils.Client) (config.Service, e
}
configFetcher := config.NewForge(timeout, retries)
if endpoint := c.String("config-service-endpoint"); endpoint != "" {
if endpoint := c.String("config-extension-endpoint"); endpoint != "" {
httpFetcher := config.NewHTTP(endpoint, client)
if c.Bool("config-service-exclusive") {
if c.Bool("config-extension-exclusive") {
return httpFetcher, nil
}
return config.NewCombined(configFetcher, httpFetcher), nil