Add option to read grpc-secret from file (#1972)

This commit is contained in:
Robert Kaussow 2023-07-10 23:53:02 +02:00 committed by GitHub
parent 7b97e27fea
commit fe7eb64bf9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 10 additions and 4 deletions

View file

@ -104,10 +104,11 @@ var flags = []cli.Flag{
Value: ":9000",
},
&cli.StringFlag{
EnvVars: []string{"WOODPECKER_GRPC_SECRET"},
Name: "grpc-secret",
Usage: "grpc jwt secret",
Value: "secret",
EnvVars: []string{"WOODPECKER_GRPC_SECRET"},
Name: "grpc-secret",
Usage: "grpc jwt secret",
Value: "secret",
FilePath: os.Getenv("WOODPECKER_GRPC_SECRET_FILE"),
},
&cli.StringFlag{
EnvVars: []string{"WOODPECKER_METRICS_SERVER_ADDR"},

View file

@ -270,6 +270,11 @@ Configures the gRPC listener port.
Configures the gRPC JWT secret.
### `WOODPECKER_GRPC_SECRET_FILE`
> Default: empty
Read the value for `WOODPECKER_GRPC_SECRET` from the specified filepath.
### `WOODPECKER_METRICS_SERVER_ADDR`
> Default: empty