-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathconfig.yml
158 lines (158 loc) · 4.2 KB
/
config.yml
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
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
version: 2
jobs:
build_plugin:
docker:
- image: circleci/node:10
working_directory: ~/plugin
steps:
- checkout
- restore_cache:
keys:
- yarn-packages-{{ checksum "yarn.lock" }}
- run:
name: Install yarn
command: |
sudo npm install -g yarn --quiet
yarn install --pure-lockfile
- run:
name: Run Toolkit Build
command: npx grafana-toolkit plugin:ci-build
- save_cache:
paths:
- node_modules
key: yarn-packages-{{ checksum "yarn.lock" }}
- persist_to_workspace:
root: .
paths:
- ci
package:
docker:
- image: circleci/node:10
working_directory: ~/plugin
steps:
- checkout
- attach_workspace:
at: .
- restore_cache:
keys:
- yarn-packages-{{ checksum "yarn.lock" }}
- run:
name: Package Distribution
command: npx grafana-toolkit plugin:ci-package
- persist_to_workspace:
root: .
paths:
- ci/jobs/package
- ci/packages
- ci/dist
- ci/grafana-test-env
test_6_2_5:
docker:
- image: circleci/node:10-browsers
working_directory: ~/plugin
steps:
- checkout
- attach_workspace:
at: .
- restore_cache:
keys:
- yarn-packages-{{ checksum "yarn.lock" }}
- run:
name: Setup Grafana (local install)
command: |
wget https://dl.grafana.com/oss/release/grafana_6.2.5_amd64.deb
sudo apt-get install -y adduser libfontconfig1
sudo dpkg -i grafana_6.2.5_amd64.deb
sudo apt-get install locate
sudo updatedb
sudo locate grafana
sudo cat /etc/grafana/grafana.ini
sudo echo ------------------------
sudo cp ci/grafana-test-env/custom.ini /usr/share/grafana/conf/custom.ini
sudo cp ci/grafana-test-env/custom.ini /etc/grafana/grafana.ini
sudo service grafana-server start
sudo grafana-cli --version
- run:
name: Run e2e tests
command: |
npx grafana-toolkit plugin:ci-test
- persist_to_workspace:
root: .
paths:
- ci/jobs/test_6_2_5
- store_test_results:
path: ci/jobs/test_6_2_5
- store_artifacts:
path: ci/jobs/test_6_2_5
test_6_3_0_beta1:
docker:
- image: circleci/node:10-browsers
working_directory: ~/plugin
steps:
- checkout
- attach_workspace:
at: .
- restore_cache:
keys:
- yarn-packages-{{ checksum "yarn.lock" }}
- run:
name: Setup Grafana (local install)
command: |
wget https://dl.grafana.com/oss/release/grafana_6.3.0-beta1_amd64.deb
sudo apt-get install -y adduser libfontconfig1
sudo dpkg -i grafana_6.3.0-beta1_amd64.deb
sudo apt-get install locate
sudo updatedb
sudo locate grafana
sudo cat /etc/grafana/grafana.ini
sudo echo ------------------------
sudo cp ci/grafana-test-env/custom.ini /usr/share/grafana/conf/custom.ini
sudo cp ci/grafana-test-env/custom.ini /etc/grafana/grafana.ini
sudo service grafana-server start
sudo grafana-cli --version
- run:
name: Run e2e tests
command: |
npx grafana-toolkit plugin:ci-test
- persist_to_workspace:
root: .
paths:
- ci/jobs/test_6_3_0_beta1
- store_test_results:
path: ci/jobs/test_6_3_0_beta1
- store_artifacts:
path: ci/jobs/test_6_3_0_beta1
report:
docker:
- image: circleci/node:10
working_directory: ~/plugin
steps:
- checkout
- attach_workspace:
at: .
- restore_cache:
keys:
- yarn-packages-{{ checksum "yarn.lock" }}
- run:
name: Toolkit Report
command: npx grafana-toolkit plugin:ci-report
- store_artifacts:
path: ci
workflows:
version: 2
plugin_workflow:
jobs:
- build_plugin
- package:
requires:
- build_plugin
- test_6_2_5:
requires:
- package
- test_6_3_0_beta1:
requires:
- package
- report:
requires:
- test_6_2_5
- test_6_3_0_beta1