HealthCheck: show enterprise commit (#75242)
This commit is contained in:
@@ -16,6 +16,7 @@ func setBuildInfo(opts ServerOptions) {
|
||||
}
|
||||
setting.BuildVersion = opts.Version
|
||||
setting.BuildCommit = opts.Commit
|
||||
setting.EnterpriseBuildCommit = opts.EnterpriseCommit
|
||||
setting.BuildStamp = buildstampInt64
|
||||
setting.BuildBranch = opts.BuildBranch
|
||||
setting.IsEnterprise = extensions.IsEnterprise
|
||||
|
||||
@@ -23,25 +23,27 @@ import (
|
||||
)
|
||||
|
||||
type ServerOptions struct {
|
||||
Version string
|
||||
Commit string
|
||||
BuildBranch string
|
||||
BuildStamp string
|
||||
Context *cli.Context
|
||||
Version string
|
||||
Commit string
|
||||
EnterpriseCommit string
|
||||
BuildBranch string
|
||||
BuildStamp string
|
||||
Context *cli.Context
|
||||
}
|
||||
|
||||
func ServerCommand(version, commit, buildBranch, buildstamp string) *cli.Command {
|
||||
func ServerCommand(version, commit, enterpriseCommit, buildBranch, buildstamp string) *cli.Command {
|
||||
return &cli.Command{
|
||||
Name: "server",
|
||||
Usage: "run the grafana server",
|
||||
Flags: commonFlags,
|
||||
Action: func(context *cli.Context) error {
|
||||
return RunServer(ServerOptions{
|
||||
Version: version,
|
||||
Commit: commit,
|
||||
BuildBranch: buildBranch,
|
||||
BuildStamp: buildstamp,
|
||||
Context: context,
|
||||
Version: version,
|
||||
Commit: commit,
|
||||
EnterpriseCommit: enterpriseCommit,
|
||||
BuildBranch: buildBranch,
|
||||
BuildStamp: buildstamp,
|
||||
Context: context,
|
||||
})
|
||||
},
|
||||
Subcommands: []*cli.Command{TargetCommand(version, commit, buildBranch, buildstamp)},
|
||||
|
||||
@@ -14,6 +14,7 @@ import (
|
||||
// The following variables cannot be constants, since they can be overridden through the -X link flag
|
||||
var version = "9.2.0"
|
||||
var commit = "NA"
|
||||
var enterpriseCommit = "NA"
|
||||
var buildBranch = "main"
|
||||
var buildstamp string
|
||||
|
||||
@@ -30,7 +31,7 @@ func main() {
|
||||
Version: version,
|
||||
Commands: []*cli.Command{
|
||||
gcli.CLICommand(version),
|
||||
gsrv.ServerCommand(version, commit, buildBranch, buildstamp),
|
||||
gsrv.ServerCommand(version, commit, enterpriseCommit, buildBranch, buildstamp),
|
||||
},
|
||||
CommandNotFound: cmdNotFound,
|
||||
EnableBashCompletion: true,
|
||||
|
||||
Reference in New Issue
Block a user