mirror of
https://github.com/grafana/grafana.git
synced 2025-02-14 09:33:34 -06:00
Drone: Make parallel step for publishing front-end metrics (#27457)
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
This commit is contained in:
parent
c7b8d85ce5
commit
efe1287be9
@ -298,6 +298,14 @@ steps:
|
||||
image: grafana/build-container:1.2.26
|
||||
commands:
|
||||
- yarn run ci:test-frontend
|
||||
environment:
|
||||
TEST_MAX_WORKERS: 50%
|
||||
depends_on:
|
||||
- initialize
|
||||
|
||||
- name: frontend-metrics
|
||||
image: grafana/build-container:1.2.26
|
||||
commands:
|
||||
- ./scripts/ci-frontend-metrics.sh | ./bin/grabpl publish-metrics $${GRAFANA_MISC_STATS_API_KEY}
|
||||
environment:
|
||||
GRAFANA_MISC_STATS_API_KEY:
|
||||
|
@ -82,7 +82,8 @@ def master_pipelines(edition):
|
||||
codespell_step(),
|
||||
shellcheck_step(),
|
||||
test_backend_step(),
|
||||
test_frontend_step(publish_metrics=True),
|
||||
test_frontend_step(),
|
||||
frontend_metrics_step(),
|
||||
build_backend_step(edition=edition),
|
||||
build_frontend_step(edition=edition),
|
||||
build_plugins_step(edition=edition),
|
||||
@ -353,13 +354,8 @@ def test_backend_step():
|
||||
],
|
||||
}
|
||||
|
||||
def test_frontend_step(publish_metrics=False):
|
||||
cmds = [
|
||||
'yarn run ci:test-frontend',
|
||||
]
|
||||
if publish_metrics:
|
||||
cmds.append('./scripts/ci-frontend-metrics.sh | ./bin/grabpl publish-metrics $${GRAFANA_MISC_STATS_API_KEY}')
|
||||
dct = {
|
||||
def test_frontend_step():
|
||||
return {
|
||||
'name': 'test-frontend',
|
||||
'image': build_image,
|
||||
'depends_on': [
|
||||
@ -368,16 +364,28 @@ def test_frontend_step(publish_metrics=False):
|
||||
'environment': {
|
||||
'TEST_MAX_WORKERS': '50%',
|
||||
},
|
||||
'commands': cmds,
|
||||
'commands': [
|
||||
'yarn run ci:test-frontend',
|
||||
],
|
||||
}
|
||||
if publish_metrics:
|
||||
dct['environment'] = {
|
||||
|
||||
def frontend_metrics_step():
|
||||
return {
|
||||
'name': 'frontend-metrics',
|
||||
'image': build_image,
|
||||
'depends_on': [
|
||||
'initialize',
|
||||
],
|
||||
'environment': {
|
||||
'GRAFANA_MISC_STATS_API_KEY': {
|
||||
'from_secret': 'grafana_misc_stats_api_key',
|
||||
},
|
||||
},
|
||||
'commands': [
|
||||
'./scripts/ci-frontend-metrics.sh | ./bin/grabpl publish-metrics $${GRAFANA_MISC_STATS_API_KEY}',
|
||||
],
|
||||
}
|
||||
|
||||
return dct
|
||||
|
||||
def codespell_step():
|
||||
return {
|
||||
|
Loading…
Reference in New Issue
Block a user