From 6fc342dc15d114a2e51c32c7286738eb4e04f8b6 Mon Sep 17 00:00:00 2001 From: Joey Orlando Date: Mon, 26 Aug 2024 10:55:05 -0400 Subject: [PATCH] some minor changes for running oncall via `grafana/irm` tilt setup (#4927) Related to the changes under `./packages/grafana-oncall-app` in https://github.com/grafana/irm/pull/45 --- grafana-plugin/.bra.toml | 22 ++++++++++++++++++++++ grafana-plugin/package.json | 1 + 2 files changed, 23 insertions(+) create mode 100644 grafana-plugin/.bra.toml diff --git a/grafana-plugin/.bra.toml b/grafana-plugin/.bra.toml new file mode 100644 index 00000000..0f1593e1 --- /dev/null +++ b/grafana-plugin/.bra.toml @@ -0,0 +1,22 @@ +# default configuration created by the `mage watch` command. +# this file can be edited and should be checked into source control. +# see https://github.com/unknwon/bra/blob/master/templates/default.bra.toml for more configuration options. +[run] +init_cmds = [ + ["mage", "-v", "build:debug"], + ["mage", "-v" , "reloadPlugin"] +] +watch_all = true +follow_symlinks = false +ignore = [".git", "node_modules", "dist"] +ignore_files = ["mage_output_file.go"] +watch_dirs = [ + "pkg", + # "src", +] +watch_exts = [".go", ".json"] +build_delay = 2000 +cmds = [ + ["mage", "-v", "build:debug"], + ["mage", "-v" , "reloadPlugin"] +] diff --git a/grafana-plugin/package.json b/grafana-plugin/package.json index 8a483370..7fcc4f4c 100644 --- a/grafana-plugin/package.json +++ b/grafana-plugin/package.json @@ -11,6 +11,7 @@ "build:dev": "NODE_ENV=development webpack -c ./webpack.config.ts --env development", "labels:link": "yarn --cwd ../../gops-labels/frontend link && yarn link \"@grafana/labels\" && yarn --cwd ../../gops-labels/frontend watch", "labels:unlink": "yarn --cwd ../../gops-labels/frontend unlink", + "mage:watch": "go mod download && mage -v buildAll", "test-utc": "TZ=UTC jest --verbose --testNamePattern '^((?!@london-tz).)*$'", "test-london-tz": "TZ=Europe/London jest --verbose --testNamePattern '@london-tz'", "test": "PLUGIN_ID=grafana-oncall-app yarn test-utc && yarn test-london-tz",