Remove drone & dead code in pkg/build; update go modules (#109935)

* remove drone & dead code in pkg/build; update go modules

* remove .drone.star

* Remove drone scripts and drone references in Makefile

* make update-workspace

* remove deadcode tool

* Remove daggerbuild/scripts: deadcode

* Remove drone files / folders in CODEOWNERS

* make update-workspace

* remove more dead code
This commit is contained in:
Kevin Minehart
2025-08-20 14:27:58 -05:00
committed by GitHub
parent 196506a484
commit 7c2945bb54
175 changed files with 311 additions and 15727 deletions
+1 -21
View File
@@ -26,27 +26,7 @@ func (c *CLI) App() *cli.App {
Name: "grafana-build",
Usage: "A build tool for Grafana",
Commands: []*cli.Command{
// Legacy commands, should eventually be completely replaced by what's in "artifacts"
{
Name: "package",
Subcommands: []*cli.Command{
PackagePublishCommand,
},
},
{
Name: "docker",
Subcommands: []*cli.Command{
DockerPublishCommand,
},
},
ProImageCommand,
{
Name: "npm",
Subcommands: []*cli.Command{
PublishNPMCommand,
},
},
GCOMCommand,
c.ArtifactsCommand(),
},
}
}
@@ -1,19 +0,0 @@
package cmd
import (
"github.com/grafana/grafana/pkg/build/daggerbuild/pipelines"
"github.com/urfave/cli/v2"
)
var DockerPublishCommand = &cli.Command{
Name: "publish",
Action: PipelineActionWithPackageInput(pipelines.PublishDocker),
Usage: "Using a grafana.docker.tar.gz as input (ideally one built using the 'package' command), publish a docker image and manifest",
Flags: JoinFlagsWithDefault(
PackageInputFlags,
DockerFlags,
DockerPublishFlags,
GCPFlags,
ConcurrencyFlags,
),
}
-11
View File
@@ -1,11 +0,0 @@
package cmd
import (
"github.com/urfave/cli/v2"
)
var GCOMCommand = &cli.Command{
Name: "gcom",
Description: "Executes requests to grafana.com",
Subcommands: []*cli.Command{GCOMPublishCommand},
}
-18
View File
@@ -1,18 +0,0 @@
package cmd
import (
"github.com/grafana/grafana/pkg/build/daggerbuild/pipelines"
"github.com/urfave/cli/v2"
)
var GCOMPublishCommand = &cli.Command{
Name: "publish",
Action: PipelineActionWithPackageInput(pipelines.PublishGCOM),
Description: "Publishes a grafana.tar.gz (ideally one built using the 'package' command) to grafana.com (--destination will be the download path)",
Flags: JoinFlagsWithDefault(
GCOMFlags,
PackageInputFlags,
PublishFlags,
ConcurrencyFlags,
),
}
-47
View File
@@ -1,47 +0,0 @@
package cmd
import (
"errors"
"fmt"
"os"
"dagger.io/dagger"
"github.com/grafana/grafana/pkg/build/daggerbuild/pipelines"
"github.com/urfave/cli/v2"
)
// Deprecated: use the Artifact type instead
func PipelineActionWithPackageInput(pf pipelines.PipelineFuncWithPackageInput) cli.ActionFunc {
return func(c *cli.Context) error {
var (
ctx = c.Context
opts = []dagger.ClientOpt{}
)
if c.Bool("verbose") {
opts = append(opts, dagger.WithLogOutput(os.Stderr))
}
client, err := dagger.Connect(ctx, opts...)
if err != nil {
return err
}
defer func(c *dagger.Client) {
if err := c.Close(); err != nil {
fmt.Println("error closing dagger client:", err)
}
}(client)
args, err := pipelines.PipelineArgsFromContext(ctx, c)
if err != nil {
return err
}
if len(args.PackageInputOpts.Packages) == 0 {
return errors.New("expected at least one package from a '--package' flag")
}
if err := pf(ctx, client, args); err != nil {
return err
}
return nil
}
}
-18
View File
@@ -1,18 +0,0 @@
package cmd
import (
"github.com/grafana/grafana/pkg/build/daggerbuild/pipelines"
"github.com/urfave/cli/v2"
)
var PublishNPMCommand = &cli.Command{
Name: "publish",
Action: PipelineActionWithPackageInput(pipelines.PublishNPM),
Usage: "Using a grafana.tar.gz as input (ideally one built using the 'package' command), take the npm artifacts and publish them on NPM.",
Flags: JoinFlagsWithDefault(
PackageInputFlags,
NPMFlags,
GCPFlags,
ConcurrencyFlags,
),
}
@@ -1,18 +0,0 @@
package cmd
import (
"github.com/grafana/grafana/pkg/build/daggerbuild/pipelines"
"github.com/urfave/cli/v2"
)
var PackagePublishCommand = &cli.Command{
Name: "publish",
Action: PipelineActionWithPackageInput(pipelines.PublishPackage),
Description: "Publishes a grafana.tar.gz (ideally one built using the 'package' command) in the destination directory (--destination)",
Flags: JoinFlagsWithDefault(
PackageInputFlags,
PublishFlags,
GCPFlags,
ConcurrencyFlags,
),
}
-13
View File
@@ -1,13 +0,0 @@
package cmd
import (
"github.com/grafana/grafana/pkg/build/daggerbuild/pipelines"
"github.com/urfave/cli/v2"
)
var ProImageCommand = &cli.Command{
Name: "pro-image",
Action: PipelineActionWithPackageInput(pipelines.ProImage),
Description: "Creates a hosted grafana pro image",
Flags: JoinFlagsWithDefault(ProImageFlags, GCPFlags, PackageInputFlags),
}