diff --git a/.drone.yml b/.drone.yml index d7d8062d9f2..86fe25bfe2e 100644 --- a/.drone.yml +++ b/.drone.yml @@ -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 ... diff --git a/scripts/drone/pipelines/main.star b/scripts/drone/pipelines/main.star index dcece78f8d9..f29058cfed4 100644 --- a/scripts/drone/pipelines/main.star +++ b/scripts/drone/pipelines/main.star @@ -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), ]) diff --git a/scripts/drone/pipelines/pr.star b/scripts/drone/pipelines/pr.star index 3b0b04c89ca..23d7eccddf6 100644 --- a/scripts/drone/pipelines/pr.star +++ b/scripts/drone/pipelines/pr.star @@ -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']), ]) diff --git a/scripts/drone/pipelines/release.star b/scripts/drone/pipelines/release.star index e2cd1d7a60f..ef4279c7a8a 100644 --- a/scripts/drone/pipelines/release.star +++ b/scripts/drone/pipelines/release.star @@ -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']), ]) diff --git a/scripts/drone/steps/lib.star b/scripts/drone/steps/lib.star index 49984d42b0f..1fac5558777 100644 --- a/scripts/drone/steps/lib.star +++ b/scripts/drone/steps/lib.star @@ -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), ], }