Add cron feature (#934)

https://woodpecker-ci.org/docs/usage/cron

Co-authored-by: Anbraten <anton@ju60.de>
Co-authored-by: qwerty287 <80460567+qwerty287@users.noreply.github.com>
This commit is contained in:
6543
2022-09-01 00:36:32 +02:00
committed by GitHub
parent 65587e3e30
commit 383f273392
63 changed files with 1604 additions and 123 deletions

View File

@@ -23,6 +23,7 @@ import (
"github.com/woodpecker-ci/woodpecker/cli/build"
"github.com/woodpecker-ci/woodpecker/cli/common"
"github.com/woodpecker-ci/woodpecker/cli/cron"
"github.com/woodpecker-ci/woodpecker/cli/deploy"
"github.com/woodpecker-ci/woodpecker/cli/exec"
"github.com/woodpecker-ci/woodpecker/cli/info"
@@ -56,6 +57,7 @@ func newApp() *cli.App {
user.Command,
lint.Command,
loglevel.Command,
cron.Command,
}
zlog.Logger = zlog.Output(

View File

@@ -39,6 +39,7 @@ import (
"github.com/woodpecker-ci/woodpecker/pipeline/rpc/proto"
"github.com/woodpecker-ci/woodpecker/server"
"github.com/woodpecker-ci/woodpecker/server/cron"
woodpeckerGrpcServer "github.com/woodpecker-ci/woodpecker/server/grpc"
"github.com/woodpecker-ci/woodpecker/server/logging"
"github.com/woodpecker-ci/woodpecker/server/model"
@@ -185,6 +186,10 @@ func run(c *cli.Context) error {
setupMetrics(&g, _store)
g.Go(func() error {
return cron.Start(c.Context, _store)
})
// start the server with tls enabled
if c.String("server-cert") != "" {
g.Go(func() error {