forked from wolfi-dev/os
-
Notifications
You must be signed in to change notification settings - Fork 0
/
grafana-11.4.yaml
136 lines (123 loc) · 3.52 KB
/
grafana-11.4.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
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
package:
name: grafana-11.4
version: 11.4.0
epoch: 2
description: The open and composable observability and data visualization platform.
copyright:
- license: AGPL-3.0-or-later
dependencies:
runtime:
- bash
provides:
- grafana=${{package.full-version}}
environment:
contents:
packages:
- build-base
- busybox
- findutils
- go
- nodejs-20
- posix-libc-utils
- py3-setuptools
- python3
- yarn
- zlib-dev
var-transforms:
- from: ${{package.version}}
match: ^(\d+\.\d+\.\d+)\.(\d+)$
replace: "${1}+security-${2}"
to: upstream-package-version
pipeline:
- uses: git-checkout
with:
expected-commit: b58701869e1a11b696010a6f28bd96b68a2cf0d0
repository: https://github.com/grafana/grafana
tag: v${{vars.upstream-package-version}}
- uses: go/bump
with:
deps: github.com/golang-jwt/jwt/[email protected] golang.org/x/[email protected]
- name: Build
runs: |
yarn install
# Builds frontend and backend (build-go build-js)
make build
- name: package
runs: |
mkdir -p ${{targets.destdir}}/usr/bin
mkdir -p ${{targets.destdir}}/usr/share/grafana
mkdir -p ${{targets.destdir}}/etc/grafana
cp bin/linux-*/* ${{targets.destdir}}/usr/bin/
cp -r conf public ${{targets.destdir}}/usr/share/grafana/
cp -r plugins-bundled ${{targets.destdir}}/usr/share/grafana/
mkdir -p ${{targets.destdir}}/usr/share/grafana/plugins-bundled
mkdir -p ${{targets.destdir}}/usr/share/grafana/scripts
mkdir -p ${{targets.destdir}}/usr/share/grafana/bin
cp conf/sample.ini ${{targets.destdir}}/etc/grafana/grafana.ini
cp conf/sample.ini ${{targets.destdir}}/etc/grafana/grafana.ini.example
subpackages:
- name: ${{package.name}}-oci-compat
dependencies:
provides:
- grafana-oci-compat=${{package.full-version}}
pipeline:
- runs: |
mkdir -p ${{targets.subpkgdir}}/opt/grafana
mv ./packaging/docker/run.sh ${{targets.subpkgdir}}/opt/grafana/
update:
enabled: true
version-transform:
- match: ^(\d+\.\d+\.\d+)\+security-(\d+)
replace: $1.$2
github:
identifier: grafana/grafana
strip-prefix: v
tag-filter-prefix: v11.4.
use-tag: true
test:
environment:
contents:
packages:
- bash
- curl
- jq
- procps
- shadow
pipeline:
- name: "Check Grafana version"
runs: |
grafana -v
grafana --version
grafana --help
grafana-cli --version
grafana-cli --help
grafana-server --version
grafana-server --help
- name: "Check Grafana CLI version"
runs: |
grafana-cli -v
- name: "Check Grafana server version"
runs: |
grafana-server -v
- name: "Test Grafana server startup"
uses: test/daemon-check-output
with:
start: |
grafana-server \
--config /etc/grafana/grafana.ini \
--homepath /usr/share/grafana \
--packaging=wolfi
timeout: 60
expected_output: |
Starting Grafana
HTTP Server Listen
post: |
curl -s http://localhost:3000/api/health
curl -s http://localhost:3000/api/org
curl -s http://localhost:3000/api/dashboards/home
- name: "Check configuration file"
runs: |
grep -q "app_mode = production" /etc/grafana/grafana.ini
- name: "Test Grafana CLI commands"
runs: |
grafana-cli plugins list-remote