Merge pull request #95 from grafana/update_grafana
Add CI action to update Grafana version
This commit is contained in:
commit
e9b0e57ef0
30
.github/configs/updatecli.d/grafana.yaml
vendored
Normal file
30
.github/configs/updatecli.d/grafana.yaml
vendored
Normal file
@ -0,0 +1,30 @@
|
|||||||
|
name: Bump grafana version specified in the values.yaml
|
||||||
|
sources:
|
||||||
|
latestGrafanaRelease:
|
||||||
|
name: Get latest grafana release on Github
|
||||||
|
kind: githubrelease
|
||||||
|
spec:
|
||||||
|
owner: grafana
|
||||||
|
repository: grafana
|
||||||
|
token: '{{ requiredEnv "UPDATECLI_GITHUB_TOKEN" }}'
|
||||||
|
versionfilter:
|
||||||
|
kind: latest
|
||||||
|
transformers:
|
||||||
|
- trimprefix: "v"
|
||||||
|
conditions:
|
||||||
|
grafanaImagePublished:
|
||||||
|
name: Ensure the latest Grafana is published on DockerHub
|
||||||
|
kind: dockerimage
|
||||||
|
source-id: latestGrafanaRelease
|
||||||
|
spec:
|
||||||
|
image: "grafana/grafana"
|
||||||
|
targets:
|
||||||
|
grafana:
|
||||||
|
name: Update Grafana version in values.yaml
|
||||||
|
kind: helmchart
|
||||||
|
spec:
|
||||||
|
file: values.yaml
|
||||||
|
key: $.grafana.version
|
||||||
|
name: charts/meta-monitoring
|
||||||
|
versionincrement: none
|
||||||
|
sourceid: latestGrafanaRelease
|
@ -175,3 +175,35 @@ jobs:
|
|||||||
labels: dependencies
|
labels: dependencies
|
||||||
branch: chore/update-minio
|
branch: chore/update-minio
|
||||||
delete-branch: true
|
delete-branch: true
|
||||||
|
|
||||||
|
updateGrafana:
|
||||||
|
name: Update the Grafana version
|
||||||
|
runs-on: "ubuntu-latest"
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
|
||||||
|
- name: Install Updatecli
|
||||||
|
uses: updatecli/updatecli-action@v2
|
||||||
|
|
||||||
|
- name: Run Updatecli
|
||||||
|
id: update-grafana
|
||||||
|
run: |
|
||||||
|
updatecli apply --config ${UPDATECLI_CONFIG_DIR}/grafana.yaml
|
||||||
|
if ! git diff --exit-code > /dev/null; then
|
||||||
|
echo "changed=true" >> "${GITHUB_OUTPUT}"
|
||||||
|
fi
|
||||||
|
|
||||||
|
- name: Create pull request
|
||||||
|
if: steps.update-grafana.outputs.changed == 'true'
|
||||||
|
uses: peter-evans/create-pull-request@v5
|
||||||
|
with:
|
||||||
|
title: "[dependency] Update the Grafana version"
|
||||||
|
body: "Updates the Grafana version"
|
||||||
|
base: main
|
||||||
|
author: "${{ github.actor }} <${{ github.actor }}@users.noreply.github.com>"
|
||||||
|
committer: "GitHub <noreply@github.com>"
|
||||||
|
commit-message: Update Grafana version
|
||||||
|
labels: dependencies
|
||||||
|
branch: chore/update-minio
|
||||||
|
delete-branch: true
|
||||||
|
@ -32,7 +32,7 @@ spec:
|
|||||||
- 0
|
- 0
|
||||||
containers:
|
containers:
|
||||||
- name: grafana
|
- name: grafana
|
||||||
image: grafana/grafana:10.0.0
|
image: grafana/grafana:{{- .Values.grafana.version }}
|
||||||
imagePullPolicy: IfNotPresent
|
imagePullPolicy: IfNotPresent
|
||||||
ports:
|
ports:
|
||||||
- containerPort: 3000
|
- containerPort: 3000
|
||||||
|
@ -31,6 +31,7 @@ local:
|
|||||||
enabled: false # This should be set to true if any of the previous is enabled
|
enabled: false # This should be set to true if any of the previous is enabled
|
||||||
|
|
||||||
grafana:
|
grafana:
|
||||||
|
version: 10.0.0
|
||||||
# Gateway ingress configuration
|
# Gateway ingress configuration
|
||||||
ingress:
|
ingress:
|
||||||
# -- Specifies whether an ingress for the gateway should be created
|
# -- Specifies whether an ingress for the gateway should be created
|
||||||
|
Loading…
x
Reference in New Issue
Block a user