mirror of
https://github.com/woodpecker-ci/woodpecker.git
synced 2025-10-21 17:25:52 +00:00
Remove unused flags / options (#693)
Some flags where unused and / or unnecessary as they are covered by alternatives implemented in PRs of milestone 0.15.0 and just complicated the setup. closes #681
This commit is contained in:
@@ -60,12 +60,6 @@ func loop(c *cli.Context) error {
|
||||
}
|
||||
|
||||
zerolog.SetGlobalLevel(zerolog.WarnLevel)
|
||||
if c.Bool("debug") {
|
||||
if c.IsSet("debug") {
|
||||
log.Warn().Msg("--debug is deprecated, use --log-level instead")
|
||||
}
|
||||
zerolog.SetGlobalLevel(zerolog.DebugLevel)
|
||||
}
|
||||
if zerolog.GlobalLevel() <= zerolog.DebugLevel {
|
||||
log.Logger = log.With().Caller().Logger()
|
||||
}
|
||||
@@ -95,7 +89,7 @@ func loop(c *cli.Context) error {
|
||||
|
||||
// grpc.Dial(target, ))
|
||||
var transport grpc.DialOption
|
||||
if c.Bool("secure-grpc") {
|
||||
if c.Bool("grpc-secure") {
|
||||
transport = grpc.WithTransportCredentials(grpccredentials.NewTLS(&tls.Config{InsecureSkipVerify: c.Bool("skip-insecure-grpc")}))
|
||||
} else {
|
||||
transport = grpc.WithTransportCredentials(insecure.NewCredentials())
|
||||
@@ -105,12 +99,12 @@ func loop(c *cli.Context) error {
|
||||
c.String("server"),
|
||||
transport,
|
||||
grpc.WithPerRPCCredentials(&credentials{
|
||||
username: c.String("username"),
|
||||
password: c.String("password"),
|
||||
username: c.String("grpc-username"),
|
||||
password: c.String("grpc-password"),
|
||||
}),
|
||||
grpc.WithKeepaliveParams(keepalive.ClientParameters{
|
||||
Time: c.Duration("keepalive-time"),
|
||||
Timeout: c.Duration("keepalive-timeout"),
|
||||
Time: c.Duration("grpc-keepalive-time"),
|
||||
Timeout: c.Duration("grpc-keepalive-timeout"),
|
||||
}),
|
||||
)
|
||||
if err != nil {
|
||||
|
@@ -29,19 +29,24 @@ var flags = []cli.Flag{
|
||||
},
|
||||
&cli.StringFlag{
|
||||
EnvVars: []string{"WOODPECKER_USERNAME"},
|
||||
Name: "username",
|
||||
Name: "grpc-username",
|
||||
Usage: "auth username",
|
||||
Value: "x-oauth-basic",
|
||||
},
|
||||
&cli.StringFlag{
|
||||
EnvVars: []string{"WOODPECKER_AGENT_SECRET"},
|
||||
Name: "password",
|
||||
Name: "grpc-password",
|
||||
Usage: "server-agent shared password",
|
||||
},
|
||||
&cli.BoolFlag{
|
||||
EnvVars: []string{"WOODPECKER_DEBUG"},
|
||||
Name: "debug",
|
||||
Usage: "enable agent debug mode",
|
||||
EnvVars: []string{"WOODPECKER_GRPC_SECURE"},
|
||||
Name: "grpc-secure",
|
||||
Usage: "should the connection to WOODPECKER_SERVER be made using a secure transport",
|
||||
},
|
||||
&cli.BoolFlag{
|
||||
EnvVars: []string{"WOODPECKER_GRPC_VERIFY"},
|
||||
Name: "grpc-skip-insecure",
|
||||
Usage: "should the grpc server certificate be verified, only valid when WOODPECKER_GRPC_SECURE is true",
|
||||
Value: true,
|
||||
},
|
||||
&cli.StringFlag{
|
||||
@@ -93,17 +98,6 @@ var flags = []cli.Flag{
|
||||
Usage: "after pinging for a keepalive check, the agent waits for a duration of this time before closing the connection if no activity",
|
||||
Value: time.Second * 20,
|
||||
},
|
||||
&cli.BoolFlag{
|
||||
EnvVars: []string{"WOODPECKER_GRPC_SECURE"},
|
||||
Name: "secure-grpc",
|
||||
Usage: "should the connection to WOODPECKER_SERVER be made using a secure transport",
|
||||
},
|
||||
&cli.BoolFlag{
|
||||
EnvVars: []string{"WOODPECKER_GRPC_VERIFY"},
|
||||
Name: "skip-insecure-grpc",
|
||||
Usage: "should the grpc server certificate be verified, only valid when WOODPECKER_GRPC_SECURE is true",
|
||||
Value: true,
|
||||
},
|
||||
&cli.StringFlag{
|
||||
EnvVars: []string{"WOODPECKER_BACKEND"},
|
||||
Name: "backend-engine",
|
||||
|
Reference in New Issue
Block a user