mirror of
https://github.com/grafana/grafana.git
synced 2026-09-05 04:40:13 -05:00
Build Pipeline: Split to test-backend and test-backend-integration steps (#40215)
* Split to test-backend and test-backend-integration * Sign drone
This commit is contained in:
+79
-13
@@ -65,6 +65,12 @@ steps:
|
||||
commands:
|
||||
- "[ $(grep FocusConvey -R pkg | wc -l) -eq \"0\" ] || exit 1"
|
||||
- ./bin/grabpl test-backend --edition oss
|
||||
depends_on:
|
||||
- lint-backend
|
||||
|
||||
- name: test-backend-integration
|
||||
image: grafana/build-container:1.4.3
|
||||
commands:
|
||||
- ./bin/grabpl integration-tests --edition oss
|
||||
depends_on:
|
||||
- lint-backend
|
||||
@@ -349,6 +355,12 @@ steps:
|
||||
commands:
|
||||
- "[ $(grep FocusConvey -R pkg | wc -l) -eq \"0\" ] || exit 1"
|
||||
- ./bin/grabpl test-backend --edition oss
|
||||
depends_on:
|
||||
- lint-backend
|
||||
|
||||
- name: test-backend-integration
|
||||
image: grafana/build-container:1.4.3
|
||||
commands:
|
||||
- ./bin/grabpl integration-tests --edition oss
|
||||
depends_on:
|
||||
- lint-backend
|
||||
@@ -835,8 +847,14 @@ steps:
|
||||
image: grafana/build-container:1.4.3
|
||||
commands:
|
||||
- "[ $(grep FocusConvey -R pkg | wc -l) -eq \"0\" ] || exit 1"
|
||||
- ./bin/grabpl test-backend --edition oss --tries 5
|
||||
- ./bin/grabpl integration-tests --edition oss --tries 5
|
||||
- ./bin/grabpl test-backend --edition oss
|
||||
depends_on:
|
||||
- lint-backend
|
||||
|
||||
- name: test-backend-integration
|
||||
image: grafana/build-container:1.4.3
|
||||
commands:
|
||||
- ./bin/grabpl integration-tests --edition oss
|
||||
depends_on:
|
||||
- lint-backend
|
||||
|
||||
@@ -1227,8 +1245,14 @@ steps:
|
||||
image: grafana/build-container:1.4.3
|
||||
commands:
|
||||
- "[ $(grep FocusConvey -R pkg | wc -l) -eq \"0\" ] || exit 1"
|
||||
- ./bin/grabpl test-backend --edition enterprise --tries 5
|
||||
- ./bin/grabpl integration-tests --edition enterprise --tries 5
|
||||
- ./bin/grabpl test-backend --edition enterprise
|
||||
depends_on:
|
||||
- lint-backend
|
||||
|
||||
- name: test-backend-integration
|
||||
image: grafana/build-container:1.4.3
|
||||
commands:
|
||||
- ./bin/grabpl integration-tests --edition enterprise
|
||||
depends_on:
|
||||
- lint-backend
|
||||
|
||||
@@ -1301,8 +1325,14 @@ steps:
|
||||
image: grafana/build-container:1.4.3
|
||||
commands:
|
||||
- "[ $(grep FocusConvey -R pkg | wc -l) -eq \"0\" ] || exit 1"
|
||||
- ./bin/grabpl test-backend --edition enterprise2 --tries 5
|
||||
- ./bin/grabpl integration-tests --edition enterprise2 --tries 5
|
||||
- ./bin/grabpl test-backend --edition enterprise2
|
||||
depends_on:
|
||||
- lint-backend
|
||||
|
||||
- name: test-backend-integration-enterprise2
|
||||
image: grafana/build-container:1.4.3
|
||||
commands:
|
||||
- ./bin/grabpl integration-tests --edition enterprise2
|
||||
depends_on:
|
||||
- lint-backend
|
||||
|
||||
@@ -1821,8 +1851,14 @@ steps:
|
||||
image: grafana/build-container:1.4.3
|
||||
commands:
|
||||
- "[ $(grep FocusConvey -R pkg | wc -l) -eq \"0\" ] || exit 1"
|
||||
- ./bin/grabpl test-backend --edition oss --tries 5
|
||||
- ./bin/grabpl integration-tests --edition oss --tries 5
|
||||
- ./bin/grabpl test-backend --edition oss
|
||||
depends_on:
|
||||
- lint-backend
|
||||
|
||||
- name: test-backend-integration
|
||||
image: grafana/build-container:1.4.3
|
||||
commands:
|
||||
- ./bin/grabpl integration-tests --edition oss
|
||||
depends_on:
|
||||
- lint-backend
|
||||
|
||||
@@ -2202,8 +2238,14 @@ steps:
|
||||
image: grafana/build-container:1.4.3
|
||||
commands:
|
||||
- "[ $(grep FocusConvey -R pkg | wc -l) -eq \"0\" ] || exit 1"
|
||||
- ./bin/grabpl test-backend --edition enterprise --tries 5
|
||||
- ./bin/grabpl integration-tests --edition enterprise --tries 5
|
||||
- ./bin/grabpl test-backend --edition enterprise
|
||||
depends_on:
|
||||
- lint-backend
|
||||
|
||||
- name: test-backend-integration
|
||||
image: grafana/build-container:1.4.3
|
||||
commands:
|
||||
- ./bin/grabpl integration-tests --edition enterprise
|
||||
depends_on:
|
||||
- lint-backend
|
||||
|
||||
@@ -2276,8 +2318,14 @@ steps:
|
||||
image: grafana/build-container:1.4.3
|
||||
commands:
|
||||
- "[ $(grep FocusConvey -R pkg | wc -l) -eq \"0\" ] || exit 1"
|
||||
- ./bin/grabpl test-backend --edition enterprise2 --tries 5
|
||||
- ./bin/grabpl integration-tests --edition enterprise2 --tries 5
|
||||
- ./bin/grabpl test-backend --edition enterprise2
|
||||
depends_on:
|
||||
- lint-backend
|
||||
|
||||
- name: test-backend-integration-enterprise2
|
||||
image: grafana/build-container:1.4.3
|
||||
commands:
|
||||
- ./bin/grabpl integration-tests --edition enterprise2
|
||||
depends_on:
|
||||
- lint-backend
|
||||
|
||||
@@ -2790,6 +2838,12 @@ steps:
|
||||
commands:
|
||||
- "[ $(grep FocusConvey -R pkg | wc -l) -eq \"0\" ] || exit 1"
|
||||
- ./bin/grabpl test-backend --edition oss
|
||||
depends_on:
|
||||
- lint-backend
|
||||
|
||||
- name: test-backend-integration
|
||||
image: grafana/build-container:1.4.3
|
||||
commands:
|
||||
- ./bin/grabpl integration-tests --edition oss
|
||||
depends_on:
|
||||
- lint-backend
|
||||
@@ -3142,6 +3196,12 @@ steps:
|
||||
commands:
|
||||
- "[ $(grep FocusConvey -R pkg | wc -l) -eq \"0\" ] || exit 1"
|
||||
- ./bin/grabpl test-backend --edition enterprise
|
||||
depends_on:
|
||||
- lint-backend
|
||||
|
||||
- name: test-backend-integration
|
||||
image: grafana/build-container:1.4.3
|
||||
commands:
|
||||
- ./bin/grabpl integration-tests --edition enterprise
|
||||
depends_on:
|
||||
- lint-backend
|
||||
@@ -3213,6 +3273,12 @@ steps:
|
||||
commands:
|
||||
- "[ $(grep FocusConvey -R pkg | wc -l) -eq \"0\" ] || exit 1"
|
||||
- ./bin/grabpl test-backend --edition enterprise2
|
||||
depends_on:
|
||||
- lint-backend
|
||||
|
||||
- name: test-backend-integration-enterprise2
|
||||
image: grafana/build-container:1.4.3
|
||||
commands:
|
||||
- ./bin/grabpl integration-tests --edition enterprise2
|
||||
depends_on:
|
||||
- lint-backend
|
||||
@@ -3654,6 +3720,6 @@ get:
|
||||
|
||||
---
|
||||
kind: signature
|
||||
hmac: e021bf51fe756fded5330c3a1c3550b0d7cd6b73eea6a9a42716893c6a23ba79
|
||||
hmac: ff07b94decc99b1ecb5b7587bd4c2c438ffe6074eb7b877537f142f8c1098bb9
|
||||
|
||||
...
|
||||
|
||||
@@ -5,6 +5,7 @@ load(
|
||||
'codespell_step',
|
||||
'shellcheck_step',
|
||||
'test_backend_step',
|
||||
'test_backend_integration_step',
|
||||
'test_frontend_step',
|
||||
'build_backend_step',
|
||||
'build_frontend_step',
|
||||
@@ -60,6 +61,7 @@ def get_steps(edition, is_downstream=False):
|
||||
lint_backend_step(edition=edition),
|
||||
lint_frontend_step(),
|
||||
test_backend_step(edition=edition),
|
||||
test_backend_integration_step(edition=edition),
|
||||
test_frontend_step(),
|
||||
build_backend_step(edition=edition, ver_mode=ver_mode, is_downstream=is_downstream),
|
||||
build_frontend_step(edition=edition, ver_mode=ver_mode, is_downstream=is_downstream),
|
||||
@@ -74,6 +76,7 @@ def get_steps(edition, is_downstream=False):
|
||||
steps.extend([
|
||||
lint_backend_step(edition=edition2),
|
||||
test_backend_step(edition=edition2),
|
||||
test_backend_integration_step(edition=edition2),
|
||||
build_backend_step(edition=edition2, ver_mode=ver_mode, variants=['linux-x64'], is_downstream=is_downstream),
|
||||
])
|
||||
|
||||
|
||||
@@ -8,6 +8,7 @@ load(
|
||||
'build_frontend_step',
|
||||
'build_plugins_step',
|
||||
'test_backend_step',
|
||||
'test_backend_integration_step',
|
||||
'test_frontend_step',
|
||||
'gen_version_step',
|
||||
'package_step',
|
||||
@@ -51,6 +52,7 @@ def pr_pipelines(edition):
|
||||
lint_backend_step(edition=edition),
|
||||
lint_frontend_step(),
|
||||
test_backend_step(edition=edition),
|
||||
test_backend_integration_step(edition=edition),
|
||||
test_frontend_step(),
|
||||
build_backend_step(edition=edition, ver_mode=ver_mode, variants=variants),
|
||||
build_frontend_step(edition=edition, ver_mode=ver_mode),
|
||||
@@ -67,6 +69,7 @@ def pr_pipelines(edition):
|
||||
steps.extend([
|
||||
lint_backend_step(edition=edition2),
|
||||
test_backend_step(edition=edition2),
|
||||
test_backend_integration_step(edition=edition2),
|
||||
build_backend_step(edition=edition2, ver_mode=ver_mode, variants=['linux-x64']),
|
||||
])
|
||||
|
||||
|
||||
@@ -8,6 +8,7 @@ load(
|
||||
'codespell_step',
|
||||
'shellcheck_step',
|
||||
'test_backend_step',
|
||||
'test_backend_integration_step',
|
||||
'test_frontend_step',
|
||||
'build_backend_step',
|
||||
'build_frontend_step',
|
||||
@@ -86,7 +87,8 @@ def get_steps(edition, ver_mode):
|
||||
shellcheck_step(),
|
||||
lint_backend_step(edition=edition),
|
||||
lint_frontend_step(),
|
||||
test_backend_step(edition=edition, tries=tries),
|
||||
test_backend_step(edition=edition),
|
||||
test_backend_integration_step(edition=edition),
|
||||
test_frontend_step(),
|
||||
build_backend_step(edition=edition, ver_mode=ver_mode),
|
||||
build_frontend_step(edition=edition, ver_mode=ver_mode),
|
||||
@@ -100,7 +102,8 @@ def get_steps(edition, ver_mode):
|
||||
edition2 = 'enterprise2'
|
||||
steps.extend([
|
||||
lint_backend_step(edition=edition2),
|
||||
test_backend_step(edition=edition2, tries=tries),
|
||||
test_backend_step(edition=edition2),
|
||||
test_backend_integration_step(edition=edition2),
|
||||
build_backend_step(edition=edition2, ver_mode=ver_mode, variants=['linux-x64']),
|
||||
])
|
||||
|
||||
|
||||
@@ -357,12 +357,7 @@ def build_plugins_step(edition, sign=False):
|
||||
],
|
||||
}
|
||||
|
||||
def test_backend_step(edition, tries=None):
|
||||
test_backend_cmd = './bin/grabpl test-backend --edition {}'.format(edition)
|
||||
integration_tests_cmd = './bin/grabpl integration-tests --edition {}'.format(edition)
|
||||
if tries:
|
||||
test_backend_cmd += ' --tries {}'.format(tries)
|
||||
integration_tests_cmd += ' --tries {}'.format(tries)
|
||||
def test_backend_step(edition):
|
||||
return {
|
||||
'name': 'test-backend' + enterprise2_suffix(edition),
|
||||
'image': build_image,
|
||||
@@ -372,10 +367,19 @@ def test_backend_step(edition, tries=None):
|
||||
'commands': [
|
||||
# First make sure that there are no tests with FocusConvey
|
||||
'[ $(grep FocusConvey -R pkg | wc -l) -eq "0" ] || exit 1',
|
||||
# Then execute non-integration tests in parallel, since it should be safe
|
||||
test_backend_cmd,
|
||||
# Then execute integration tests in serial
|
||||
integration_tests_cmd,
|
||||
'./bin/grabpl test-backend --edition {}'.format(edition),
|
||||
],
|
||||
}
|
||||
|
||||
def test_backend_integration_step(edition):
|
||||
return {
|
||||
'name': 'test-backend-integration' + enterprise2_suffix(edition),
|
||||
'image': build_image,
|
||||
'depends_on': [
|
||||
'lint-backend',
|
||||
],
|
||||
'commands': [
|
||||
'./bin/grabpl integration-tests --edition {}'.format(edition),
|
||||
],
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user