CI: Build pre-release artifacts in GhA on merge to release branches and main. (#106779)

* Add grafana-build action and workflow

* Fix the --verify flag stalling on tar.gz builds

* Add event sources for main / release branches

* Update CODEOWNERS
This commit is contained in:
Kevin Minehart
2025-06-16 22:54:50 +02:00
committed by GitHub
parent 09e8484bac
commit 8b370bb6a5
30 changed files with 351 additions and 2399 deletions
+1 -1
View File
@@ -122,7 +122,7 @@ func Build(builder *dagger.Container, opts BuildOpts, targz *dagger.File) *dagge
container := builder.
WithFile("/src/grafana.tar.gz", targz).
WithEnvVariable("XZ_DEFAULTS", "-T0").
WithExec([]string{"tar", "--exclude=storybook", "--strip-components=1", "-xvf", "/src/grafana.tar.gz", "-C", "/src"}).
WithExec([]string{"tar", "--exclude=storybook", "--strip-components=1", "-xf", "/src/grafana.tar.gz", "-C", "/src"}).
WithExec([]string{"rm", "/src/grafana.tar.gz"})
container = container.
+9 -6
View File
@@ -25,19 +25,21 @@ func VerifyDeb(ctx context.Context, d *dagger.Client, file *dagger.File, src *da
// This grafana service runs in the background for the e2e tests
service := d.Container(dagger.ContainerOpts{
Platform: platform,
}).From("debian:latest").
}).From("ubuntu:22.04").
WithFile("/src/package.deb", file).
WithExec([]string{"apt-get", "update"}).
WithExec([]string{"apt-get", "install", "-y", "/src/package.deb"}).
WithExec([]string{"apt-get", "install", "-yq", "ca-certificates"}).
WithExec([]string{"apt-get", "install", "-yq", "/src/package.deb"}).
WithEnvVariable("GF_LOG_LEVEL", "error").
WithWorkdir("/usr/share/grafana")
if err := e2e.ValidateLicense(ctx, service, "/usr/share/grafana/LICENSE", enterprise); err != nil {
return err
}
svc := service.
WithExec([]string{"grafana-server"}).
WithExposedPort(3000).AsService()
svc := service.WithExposedPort(3000).AsService(dagger.ContainerAsServiceOpts{
Args: []string{"grafana-server"},
})
if _, err := containers.ExitError(ctx, e2e.ValidatePackage(d, svc, src, yarn, nodeVersion)); err != nil {
return err
@@ -59,9 +61,10 @@ func VerifyRpm(ctx context.Context, d *dagger.Client, file *dagger.File, src *da
// This grafana service runs in the background for the e2e tests
service := d.Container(dagger.ContainerOpts{
Platform: platform,
}).From("redhat/ubi8:latest").
}).From("redhat/ubi8:8.10-source").
WithFile("/src/package.rpm", file).
WithExec([]string{"yum", "install", "-y", "/src/package.rpm"}).
WithEnvVariable("GF_LOG_LEVEL", "error").
WithWorkdir("/usr/share/grafana")
if err := e2e.ValidateLicense(ctx, service, "/usr/share/grafana/LICENSE", enterprise); err != nil {