Skip to content

Commit

Permalink
Enabled Grafana Alerting (#35)
Browse files Browse the repository at this point in the history
* add "alerting": true to plugin.json

* Modified steps

* Remove step to stop yml

* Corrected Version in package.json

---------

Co-authored-by: Martin-Belton-gov <martin.belton@digital.education.gov.uk>
  • Loading branch information
MartinBelton-gov and Martin-Belton-gov authored Jan 29, 2024
1 parent 1785b61 commit 416aa2c
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/dockerpublish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ env:
# github.repository as <account>/<repo>
IMAGE_NAME: ${{ github.repository }}
RELEASE_TAG: ${{ github.event.release.tag_name }}
PLUGIN_VERSION: 1.0.7
PLUGIN_VERSION: 1.0.8

jobs:
build:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/publish-ghcr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ env:
# github.repository as <account>/<repo>
IMAGE_NAME: ${{ github.repository }}
RELEASE_TAG: ${{ github.event.release.tag_name }}
PLUGIN_VERSION: 1.0.7
PLUGIN_VERSION: 1.0.8

jobs:
build-and-push:
Expand Down
20 changes: 19 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,12 +43,30 @@ jobs:
npm run build
shell: bash


- name: Build and test frontend
run: |
cd /home/runner/work/Grafana.Plugin.CostManagement/Grafana.Plugin.CostManagement/dfe-azurecostbackend-datasource
npm run build
- name: Install jq
run: sudo apt-get install jq

- name: Read existing plugin.json and add alerting is true
run: |
file_path="/home/runner/work/Grafana.Plugin.CostManagement/Grafana.Plugin.CostManagement/dfe-azurecostbackend-datasource/dist/plugin.json"
existing_json=$(cat "$file_path")
echo "Existing JSON:"
echo "$existing_json"
new_json=$(echo "$existing_json" | jq '. + { "alerting": true }')
echo "Modified JSON:"
echo "$new_json"
echo "$new_json" > "$file_path"
- name: Display modified JSON
run: |
file_path="/home/runner/work/Grafana.Plugin.CostManagement/Grafana.Plugin.CostManagement/dfe-azurecostbackend-datasource/dist/plugin.json"
cat "$file_path"
- name: Check for backend
id: check-for-backend
run: |
Expand Down
4 changes: 2 additions & 2 deletions dfe-azurecostbackend-datasource/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"id": "1",
"name": "azurecost-backend",
"version": "1.0.7",
"version": "1.0.8",
"description": "Azure cost backend",
"scripts": {
"build": "webpack -c ./.config/webpack/webpack.config.ts --env production",
Expand All @@ -16,7 +16,7 @@
"server": "docker-compose up --build",
"sign": "npx --yes @grafana/sign-plugin@latest"
},
"author": "Df e",
"author": "DfE",
"license": "Apache-2.0",
"devDependencies": {
"@babel/core": "^7.21.4",
Expand Down

0 comments on commit 416aa2c

Please sign in to comment.