mirror of
https://github.com/grafana/grafana.git
synced 2025-08-01 18:44:54 +08:00

* 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
23 lines
652 B
Go
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,
|
|
})
|
|
}
|