Adding descriptions to prombench dashboard (#428) #7
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Grafana Dashboard Apply | |
on: | |
push: | |
branches: | |
- master | |
paths: | |
- 'prombench/manifests/cluster-infra/grafana_dashboard_dashboards_noparse.yaml' | |
jobs: | |
apply_grafana_dashboard: | |
name: Apply Dashboard | |
runs-on: ubuntu-latest | |
steps: | |
- name: Apply Configmap | |
id: apply_configmap | |
uses: docker://prominfra/prombench:master | |
env: | |
AUTH_FILE: ${{ secrets.TEST_INFRA_PROVIDER_AUTH }} | |
GKE_PROJECT_ID: macro-mile-203600 | |
CLUSTER_NAME: test-infra | |
ZONE: europe-west3-a | |
TEST_INFRA_REPO: https://github.com/prometheus/test-infra.git | |
with: | |
args: >- | |
infra gke resource apply -a $AUTH_FILE | |
-v GKE_PROJECT_ID:$GKE_PROJECT_ID -v ZONE:$ZONE | |
-v CLUSTER_NAME:$CLUSTER_NAME | |
-f manifests/cluster-infra/grafana_dashboard_dashboards_noparse.yaml | |
- name: Comment Failure Message | |
if: failure() | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
run: >- | |
export PR_NUMBER=`curl -s -H "Accept: application/vnd.github.groot-preview+json" | |
"https://api.github.com/repos/$GITHUB_REPOSITORY/commits/$GITHUB_SHA/pulls" | |
| jq -r '.[].number'` | |
&& | |
curl -i -X POST | |
-H "Authorization: Bearer $GITHUB_TOKEN" | |
-H "Content-Type: application/json" | |
--data '{"body":"Grafana dashboard update failed. Please inspect."}' | |
"https://api.github.com/repos/$GITHUB_REPOSITORY/issues/$PR_NUMBER/comments" | |
- name: Comment Success Message | |
if: success() | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
run: >- | |
export PR_NUMBER=`curl -s -H "Accept: application/vnd.github.groot-preview+json" | |
"https://api.github.com/repos/$GITHUB_REPOSITORY/commits/$GITHUB_SHA/pulls" | |
| jq -r '.[].number'` | |
&& | |
curl -i -X POST | |
-H "Authorization: Bearer $GITHUB_TOKEN" | |
-H "Content-Type: application/json" | |
--data '{"body":"Grafana dashboard updated successfully."}' | |
"https://api.github.com/repos/$GITHUB_REPOSITORY/issues/$PR_NUMBER/comments" |