mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06: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:
committed by
GitHub
parent
ad757b48e7
commit
5bf37d36e7
@@ -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