Add test workflow for core dagger build and clean up NX variables
- Add test-dagger-build.yml workflow to test core release build command - Remove all NX environment variables from frontend build functions - This isolates whether core dagger build works independently of E2E issues
This commit is contained in:
@@ -0,0 +1,28 @@
|
||||
name: Test Dagger Build Only
|
||||
on:
|
||||
workflow_dispatch:
|
||||
push:
|
||||
branches:
|
||||
- baldm0mma/migrate_11.4.8
|
||||
|
||||
jobs:
|
||||
test-dagger-build:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
path: ./grafana
|
||||
persist-credentials: false
|
||||
|
||||
- name: Test release build command (single architecture)
|
||||
uses: dagger/dagger-for-github@e47aba410ef9bb9ed81a4d2a97df31061e5e842e
|
||||
with:
|
||||
version: "0.9.3"
|
||||
verb: run
|
||||
args: --silent go -C grafana run ./pkg/build/cmd artifacts -a targz:grafana:linux/amd64 --grafana-ref=${{ github.sha }} --build-id=${{ github.run_number }} --version=11.4.8-test
|
||||
|
||||
- name: Check if artifacts were created
|
||||
run: |
|
||||
ls -la dist/
|
||||
echo "Release build completed successfully!"
|
||||
@@ -8,9 +8,6 @@ import (
|
||||
|
||||
func Build(builder *dagger.Container, version string) *dagger.Directory {
|
||||
public := builder.
|
||||
WithEnvVariable("CI", "true").
|
||||
WithEnvVariable("NX_DAEMON", "false").
|
||||
WithEnvVariable("NX_CACHE_PROJECT_GRAPH", "false").
|
||||
WithExec([]string{"/bin/sh", "-c", fmt.Sprintf("yarn lerna version %s --exact --no-git-tag-version --no-push --force-publish -y", version)}).
|
||||
WithExec([]string{"yarn", "run", "build"}).
|
||||
WithExec([]string{"/bin/sh", "-c", "find /src/public -type d -name node_modules -print0 | xargs -0 rm -rf"}).
|
||||
@@ -21,9 +18,6 @@ func Build(builder *dagger.Container, version string) *dagger.Directory {
|
||||
|
||||
func BuildPlugins(builder *dagger.Container) *dagger.Directory {
|
||||
public := builder.
|
||||
WithEnvVariable("CI", "true").
|
||||
WithEnvVariable("NX_DAEMON", "false").
|
||||
WithEnvVariable("NX_CACHE_PROJECT_GRAPH", "false").
|
||||
WithExec([]string{"yarn", "install", "--immutable"}).
|
||||
WithExec([]string{"/bin/sh", "-c", `if [ -d /src/plugins-bundled ]; then yarn run plugins:build-bundled; else mkdir /src/plugins-bundled; fi`}).
|
||||
WithExec([]string{"/bin/sh", "-c", "find /src/plugins-bundled -type d -name node_modules -print0 | xargs -0 rm -rf"}).
|
||||
|
||||
@@ -5,9 +5,6 @@ import "dagger.io/dagger"
|
||||
// Storybook returns a dagger.Directory which contains the built storybook server.
|
||||
func Storybook(builder *dagger.Container, src *dagger.Directory, version string) *dagger.Directory {
|
||||
return builder.
|
||||
WithEnvVariable("CI", "true").
|
||||
WithEnvVariable("NX_DAEMON", "false").
|
||||
WithEnvVariable("NX_CACHE_PROJECT_GRAPH", "false").
|
||||
WithExec([]string{"yarn", "run", "storybook:build"}).
|
||||
Directory("./packages/grafana-ui/dist/storybook")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user