CI: Make e2e tests depend on binary builds (#44647) (#44833)

* Make e2e test depend on binary builds

* Search for binary in the correct folders

* Remove package file var

* Add ARCH var

(cherry picked from commit 7bb5a5b318)
This commit is contained in:
Dimitris Sotirakis
2022-02-04 10:08:19 +02:00
committed by GitHub
parent 9cddb216d3
commit 2c033a6540
7 changed files with 85 additions and 72 deletions
+3 -3
View File
@@ -14,7 +14,7 @@ load(
'build_frontend_step',
'build_plugins_step',
'package_step',
'e2e_tests_server_step',
'grafana_server_step',
'e2e_tests_step',
'build_storybook_step',
'build_frontend_docs_step',
@@ -95,8 +95,8 @@ def get_steps(edition, is_downstream=False):
# Insert remaining steps
build_steps.extend([
package_step(edition=edition, ver_mode=ver_mode, include_enterprise2=include_enterprise2, is_downstream=is_downstream),
e2e_tests_server_step(edition=edition),
package_step(edition=edition, ver_mode=ver_mode, include_enterprise2=include_enterprise2, is_downstream=is_downstream),
grafana_server_step(edition=edition),
e2e_tests_step('dashboards-suite', edition=edition),
e2e_tests_step('smoke-tests-suite', edition=edition),
e2e_tests_step('panels-suite', edition=edition),
+2 -2
View File
@@ -14,7 +14,7 @@ load(
'test_backend_integration_step',
'test_frontend_step',
'package_step',
'e2e_tests_server_step',
'grafana_server_step',
'e2e_tests_step',
'build_storybook_step',
'build_frontend_docs_step',
@@ -89,7 +89,7 @@ def pr_pipelines(edition):
# Insert remaining build_steps
build_steps.extend([
package_step(edition=edition, ver_mode=ver_mode, include_enterprise2=include_enterprise2, variants=variants),
e2e_tests_server_step(edition=edition),
grafana_server_step(edition=edition),
e2e_tests_step('dashboards-suite', edition=edition),
e2e_tests_step('smoke-tests-suite', edition=edition),
e2e_tests_step('panels-suite', edition=edition),
+2 -2
View File
@@ -17,7 +17,7 @@ load(
'build_frontend_step',
'build_plugins_step',
'package_step',
'e2e_tests_server_step',
'grafana_server_step',
'e2e_tests_step',
'build_storybook_step',
'copy_packages_for_docker_step',
@@ -222,7 +222,7 @@ def get_steps(edition, ver_mode):
copy_packages_for_docker_step(),
package_docker_images_step(edition=edition, ver_mode=ver_mode, publish=should_publish),
package_docker_images_step(edition=edition, ver_mode=ver_mode, ubuntu=True, publish=should_publish),
e2e_tests_server_step(edition=edition),
grafana_server_step(edition=edition),
])
if not disable_tests:
+6 -4
View File
@@ -609,7 +609,7 @@ def package_step(edition, ver_mode, include_enterprise2=False, variants=None, is
}
def e2e_tests_server_step(edition, port=3001):
def grafana_server_step(edition, port=3001):
package_file_pfx = ''
if edition == 'enterprise2':
package_file_pfx = 'grafana' + enterprise2_suffix(edition)
@@ -618,9 +618,9 @@ def e2e_tests_server_step(edition, port=3001):
environment = {
'PORT': port,
'ARCH': 'linux-amd64'
}
if package_file_pfx:
environment['PACKAGE_FILE'] = 'dist/{}-*linux-amd64.tar.gz'.format(package_file_pfx)
environment['RUNDIR'] = 'scripts/grafana-server/tmp-{}'.format(package_file_pfx)
return {
@@ -628,7 +628,9 @@ def e2e_tests_server_step(edition, port=3001):
'image': build_image,
'detach': True,
'depends_on': [
'package' + enterprise2_suffix(edition),
'build-plugins',
'build-backend',
'build-frontend',
],
'environment': environment,
'commands': [
@@ -644,7 +646,7 @@ def e2e_tests_step(suite, edition, port=3001, tries=None):
'name': 'end-to-end-tests-{}'.format(suite) + enterprise2_suffix(edition),
'image': 'cypress/included:8.4.1',
'depends_on': [
'package',
'grafana-server',
],
'environment': {
'HOST': 'grafana-server' + enterprise2_suffix(edition),