forked from 2i2c-org/infrastructure
-
Notifications
You must be signed in to change notification settings - Fork 0
76 lines (66 loc) · 2.46 KB
/
deploy-grafana-dashboards.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
name: Deploy grafana dashboards
on:
schedule:
# Run at 05:00 every day, ref: https://crontab.guru/#0_5_*_*_*
- cron: "0 5 * * *"
workflow_dispatch:
jobs:
deploy_grafana_dashboards:
runs-on: ubuntu-22.04
strategy:
# Don't stop other deployments if one fails
fail-fast: false
matrix:
include:
# The grafana for 2i2c cluster holds also info about all other
# clusters and gets an additional dashboard deployed for that
- cluster_name: 2i2c
deploy_flags: --dashboards-dir=global-dashboards
- cluster_name: 2i2c
- cluster_name: 2i2c-aws-us
- cluster_name: 2i2c-uk
- cluster_name: awi-ciroh
- cluster_name: catalystproject-africa
- cluster_name: catalystproject-latam
- cluster_name: cloudbank
- cluster_name: gridsst
- cluster_name: hhmi
- cluster_name: jupyter-health
- cluster_name: jupyter-meets-the-earth
- cluster_name: kitware
- cluster_name: leap
- cluster_name: nasa-cryo
- cluster_name: nasa-esdis
- cluster_name: nasa-veda
- cluster_name: nmfs-openscapes
- cluster_name: openscapes
- cluster_name: opensci
- cluster_name: pangeo-hubs
- cluster_name: pchub
- cluster_name: projectpythia
- cluster_name: smithsonian
- cluster_name: ubc-eoas
- cluster_name: utoronto
- cluster_name: victor
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.11"
- name: Install deployer
run: |
python3 -m pip install --editable .
- name: Install jsonnet (go-jsonnet)
run: |
JSONNET_VERSION=0.20.0
wget -qO- https://github.com/google/go-jsonnet/releases/download/v${JSONNET_VERSION}/go-jsonnet_${JSONNET_VERSION}_Linux_x86_64.tar.gz \
| tar -xvz --one-top-level=$HOME/.local/bin
- name: Install sops
uses: mdgreenwald/[email protected]
- name: Setup sops credentials to decrypt repo secrets
uses: google-github-actions/auth@v2
with:
credentials_json: "${{ secrets.GCP_KMS_DECRYPTOR_KEY }}"
- name: Deploy grafana dashboards for ${{ matrix.cluster_name }}
run: |
deployer grafana deploy-dashboards ${{ matrix.deploy_flags }} ${{ matrix.cluster_name }}