Files
grafana/pkg/build/e2e/run.go
Kevin Minehart 88d54892bd CI: Move e2e test pipeline from Drone to GitHub Actions (#103134)
* Add e2e dagger pipeline

* various-suite not various suite

* upload videos dir

* produce e2e videos even on failure

* nil ref

* sync doesn't return container

* fix quotes

* try without flags first?

* try without quoting?

* use two dashes in flags

* update CODEOWNERS

* make update-workspace

* go work sync

* make update-workspace

* add newline
2025-04-02 13:31:47 -05:00

23 lines
652 B
Go

package main
import (
"fmt"
"dagger.io/dagger"
)
func RunSuite(d *dagger.Client, svc *dagger.Service, src *dagger.Directory, cache *dagger.CacheVolume, suite string) *dagger.Container {
return WithYarnCache(WithGrafanaFrontend(d.Container().From("cypress/included:13.1.0"), src), cache).
WithWorkdir("/src").
WithEnvVariable("HOST", "grafana").
WithEnvVariable("PORT", "3001").
WithServiceBinding("grafana", svc).
WithExec([]string{"yarn", "install", "--immutable"}).
WithExec([]string{
"/bin/bash", "-c",
fmt.Sprintf("./e2e/run-suite %s true", suite),
}, dagger.ContainerWithExecOpts{
Expect: dagger.ReturnTypeAny,
})
}