mirror of
https://github.com/woodpecker-ci/woodpecker.git
synced 2024-12-02 06:41:18 +00:00
Merge branch 'origin/main' into 'next-release/main'
This commit is contained in:
commit
038ade55c0
3 changed files with 31 additions and 1 deletions
|
@ -133,7 +133,7 @@ func run(ctx context.Context, c *cli.Command, backends []types.Backend) error {
|
||||||
|
|
||||||
agentConfig := readAgentConfig(agentConfigPath)
|
agentConfig := readAgentConfig(agentConfigPath)
|
||||||
|
|
||||||
agentToken := strings.TrimSpace(c.String("grpc-token"))
|
agentToken := c.String("grpc-token")
|
||||||
grpcClientCtx, grpcClientCtxCancel := context.WithCancelCause(context.Background())
|
grpcClientCtx, grpcClientCtxCancel := context.WithCancelCause(context.Background())
|
||||||
defer grpcClientCtxCancel(nil)
|
defer grpcClientCtxCancel(nil)
|
||||||
authClient := agent_rpc.NewAuthGrpcClient(authConn, agentToken, agentConfig.AgentID)
|
authClient := agent_rpc.NewAuthGrpcClient(authConn, agentToken, agentConfig.AgentID)
|
||||||
|
|
|
@ -36,6 +36,9 @@ var flags = []cli.Flag{
|
||||||
Sources: cli.NewValueSourceChain(
|
Sources: cli.NewValueSourceChain(
|
||||||
cli.File(os.Getenv("WOODPECKER_AGENT_SECRET_FILE")),
|
cli.File(os.Getenv("WOODPECKER_AGENT_SECRET_FILE")),
|
||||||
cli.EnvVar("WOODPECKER_AGENT_SECRET")),
|
cli.EnvVar("WOODPECKER_AGENT_SECRET")),
|
||||||
|
Config: cli.StringConfig{
|
||||||
|
TrimSpace: true,
|
||||||
|
},
|
||||||
},
|
},
|
||||||
&cli.BoolFlag{
|
&cli.BoolFlag{
|
||||||
Sources: cli.EnvVars("WOODPECKER_GRPC_SECURE"),
|
Sources: cli.EnvVars("WOODPECKER_GRPC_SECURE"),
|
||||||
|
|
|
@ -116,6 +116,9 @@ var flags = append([]cli.Flag{
|
||||||
Name: "grpc-secret",
|
Name: "grpc-secret",
|
||||||
Usage: "grpc jwt secret",
|
Usage: "grpc jwt secret",
|
||||||
Value: "secret",
|
Value: "secret",
|
||||||
|
Config: cli.StringConfig{
|
||||||
|
TrimSpace: true,
|
||||||
|
},
|
||||||
},
|
},
|
||||||
&cli.StringFlag{
|
&cli.StringFlag{
|
||||||
Sources: cli.EnvVars("WOODPECKER_METRICS_SERVER_ADDR"),
|
Sources: cli.EnvVars("WOODPECKER_METRICS_SERVER_ADDR"),
|
||||||
|
@ -217,6 +220,9 @@ var flags = append([]cli.Flag{
|
||||||
cli.EnvVar("WOODPECKER_AGENT_SECRET")),
|
cli.EnvVar("WOODPECKER_AGENT_SECRET")),
|
||||||
Name: "agent-secret",
|
Name: "agent-secret",
|
||||||
Usage: "server-agent shared password",
|
Usage: "server-agent shared password",
|
||||||
|
Config: cli.StringConfig{
|
||||||
|
TrimSpace: true,
|
||||||
|
},
|
||||||
},
|
},
|
||||||
&cli.BoolFlag{
|
&cli.BoolFlag{
|
||||||
Sources: cli.EnvVars("WOODPECKER_DISABLE_USER_AGENT_REGISTRATION"),
|
Sources: cli.EnvVars("WOODPECKER_DISABLE_USER_AGENT_REGISTRATION"),
|
||||||
|
@ -248,6 +254,9 @@ var flags = append([]cli.Flag{
|
||||||
Aliases: []string{"datasource"}, // TODO: remove in v4.0.0
|
Aliases: []string{"datasource"}, // TODO: remove in v4.0.0
|
||||||
Usage: "database driver configuration string",
|
Usage: "database driver configuration string",
|
||||||
Value: datasourceDefaultValue(),
|
Value: datasourceDefaultValue(),
|
||||||
|
Config: cli.StringConfig{
|
||||||
|
TrimSpace: true,
|
||||||
|
},
|
||||||
},
|
},
|
||||||
&cli.StringFlag{
|
&cli.StringFlag{
|
||||||
Sources: cli.NewValueSourceChain(
|
Sources: cli.NewValueSourceChain(
|
||||||
|
@ -255,6 +264,9 @@ var flags = append([]cli.Flag{
|
||||||
cli.EnvVar("WOODPECKER_PROMETHEUS_AUTH_TOKEN")),
|
cli.EnvVar("WOODPECKER_PROMETHEUS_AUTH_TOKEN")),
|
||||||
Name: "prometheus-auth-token",
|
Name: "prometheus-auth-token",
|
||||||
Usage: "token to secure prometheus metrics endpoint",
|
Usage: "token to secure prometheus metrics endpoint",
|
||||||
|
Config: cli.StringConfig{
|
||||||
|
TrimSpace: true,
|
||||||
|
},
|
||||||
},
|
},
|
||||||
&cli.StringFlag{
|
&cli.StringFlag{
|
||||||
Sources: cli.EnvVars("WOODPECKER_STATUS_CONTEXT", "WOODPECKER_GITHUB_CONTEXT", "WOODPECKER_GITEA_CONTEXT"),
|
Sources: cli.EnvVars("WOODPECKER_STATUS_CONTEXT", "WOODPECKER_GITHUB_CONTEXT", "WOODPECKER_GITEA_CONTEXT"),
|
||||||
|
@ -354,6 +366,9 @@ var flags = append([]cli.Flag{
|
||||||
cli.EnvVar("WOODPECKER_BITBUCKET_DC_CLIENT_ID")),
|
cli.EnvVar("WOODPECKER_BITBUCKET_DC_CLIENT_ID")),
|
||||||
Name: "forge-oauth-client",
|
Name: "forge-oauth-client",
|
||||||
Usage: "oauth2 client id",
|
Usage: "oauth2 client id",
|
||||||
|
Config: cli.StringConfig{
|
||||||
|
TrimSpace: true,
|
||||||
|
},
|
||||||
},
|
},
|
||||||
&cli.StringFlag{
|
&cli.StringFlag{
|
||||||
Sources: cli.NewValueSourceChain(
|
Sources: cli.NewValueSourceChain(
|
||||||
|
@ -375,6 +390,9 @@ var flags = append([]cli.Flag{
|
||||||
cli.EnvVar("WOODPECKER_BITBUCKET_DC_CLIENT_SECRET")),
|
cli.EnvVar("WOODPECKER_BITBUCKET_DC_CLIENT_SECRET")),
|
||||||
Name: "forge-oauth-secret",
|
Name: "forge-oauth-secret",
|
||||||
Usage: "oauth2 client secret",
|
Usage: "oauth2 client secret",
|
||||||
|
Config: cli.StringConfig{
|
||||||
|
TrimSpace: true,
|
||||||
|
},
|
||||||
},
|
},
|
||||||
&cli.BoolFlag{
|
&cli.BoolFlag{
|
||||||
Name: "forge-skip-verify",
|
Name: "forge-skip-verify",
|
||||||
|
@ -466,6 +484,9 @@ var flags = append([]cli.Flag{
|
||||||
cli.EnvVar("WOODPECKER_BITBUCKET_DC_GIT_USERNAME")),
|
cli.EnvVar("WOODPECKER_BITBUCKET_DC_GIT_USERNAME")),
|
||||||
Name: "bitbucket-dc-git-username",
|
Name: "bitbucket-dc-git-username",
|
||||||
Usage: "Bitbucket DataCenter/Server service account username",
|
Usage: "Bitbucket DataCenter/Server service account username",
|
||||||
|
Config: cli.StringConfig{
|
||||||
|
TrimSpace: true,
|
||||||
|
},
|
||||||
},
|
},
|
||||||
&cli.StringFlag{
|
&cli.StringFlag{
|
||||||
Sources: cli.NewValueSourceChain(
|
Sources: cli.NewValueSourceChain(
|
||||||
|
@ -473,6 +494,9 @@ var flags = append([]cli.Flag{
|
||||||
cli.EnvVar("WOODPECKER_BITBUCKET_DC_GIT_PASSWORD")),
|
cli.EnvVar("WOODPECKER_BITBUCKET_DC_GIT_PASSWORD")),
|
||||||
Name: "bitbucket-dc-git-password",
|
Name: "bitbucket-dc-git-password",
|
||||||
Usage: "Bitbucket DataCenter/Server service account password",
|
Usage: "Bitbucket DataCenter/Server service account password",
|
||||||
|
Config: cli.StringConfig{
|
||||||
|
TrimSpace: true,
|
||||||
|
},
|
||||||
},
|
},
|
||||||
//
|
//
|
||||||
// development flags
|
// development flags
|
||||||
|
@ -500,6 +524,9 @@ var flags = append([]cli.Flag{
|
||||||
cli.EnvVar("WOODPECKER_ENCRYPTION_KEY")),
|
cli.EnvVar("WOODPECKER_ENCRYPTION_KEY")),
|
||||||
Name: "encryption-raw-key",
|
Name: "encryption-raw-key",
|
||||||
Usage: "Raw encryption key",
|
Usage: "Raw encryption key",
|
||||||
|
Config: cli.StringConfig{
|
||||||
|
TrimSpace: true,
|
||||||
|
},
|
||||||
},
|
},
|
||||||
&cli.StringFlag{
|
&cli.StringFlag{
|
||||||
Sources: cli.EnvVars("WOODPECKER_ENCRYPTION_TINK_KEYSET_FILE"),
|
Sources: cli.EnvVars("WOODPECKER_ENCRYPTION_TINK_KEYSET_FILE"),
|
||||||
|
|
Loading…
Reference in a new issue