Files
grafana/scripts/pr.star
Agnès Toulet 4de784065d Drone: Update pipelines for Enterprise (#29939)
* update E2E tests

* fix e2e tests for new pipelines

* Add enterprise2 test, build, package and upload steps

* fix missing linting step

* Upgrade build pipeline tool

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>

* Use grabpl lint-backend

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>

* Refactor publishing

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>

* Refactor package publishing

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>

* Drone: Supply --simulate-release flag to publish-packages for simulating a release

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>

* Drone: Run e2e tests with specific ports

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>

* e2e/start-server: Make more robust

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
2020-12-23 15:42:20 +01:00

76 lines
2.6 KiB
Plaintext

load(
'scripts/lib.star',
'pipeline',
'lint_backend_step',
'codespell_step',
'shellcheck_step',
'dashboard_schemas_check',
'test_backend_step',
'test_frontend_step',
'build_backend_step',
'build_frontend_step',
'build_plugins_step',
'package_step',
'e2e_tests_server_step',
'e2e_tests_step',
'build_storybook_step',
'build_frontend_docs_step',
'build_docs_website_step',
'copy_packages_for_docker_step',
'build_docker_images_step',
'postgres_integration_tests_step',
'mysql_integration_tests_step',
'benchmark_ldap_step',
'ldap_service',
'integration_test_services',
)
ver_mode = 'pr'
def pr_pipelines(edition):
services = integration_test_services()
variants = ['linux-x64', 'linux-x64-musl', 'osx64', 'win64',]
steps = [
lint_backend_step(edition=edition),
codespell_step(),
shellcheck_step(),
dashboard_schemas_check(),
test_backend_step(),
test_frontend_step(),
build_backend_step(edition=edition, ver_mode=ver_mode, variants=variants),
build_frontend_step(edition=edition, ver_mode=ver_mode),
build_plugins_step(edition=edition),
package_step(edition=edition, ver_mode=ver_mode, variants=variants),
e2e_tests_server_step(edition=edition),
e2e_tests_step(),
build_storybook_step(edition=edition, ver_mode=ver_mode),
build_frontend_docs_step(edition=edition),
build_docs_website_step(),
copy_packages_for_docker_step(),
build_docker_images_step(edition=edition, ver_mode=ver_mode, archs=['amd64',]),
postgres_integration_tests_step(),
mysql_integration_tests_step(),
]
if edition == 'enterprise':
steps.append(benchmark_ldap_step())
services.append(ldap_service())
build_tags = ['enterprise2']
steps.extend([
lint_backend_step(edition=edition, build_tags=build_tags),
test_backend_step(build_tags=build_tags),
build_backend_step(edition=edition, ver_mode=ver_mode, variants=['linux-x64'], build_tags=build_tags),
package_step(edition=edition, ver_mode=ver_mode, variants=['linux-x64'], build_tags=build_tags),
e2e_tests_server_step(edition=edition, build_tags=build_tags, port=3002),
e2e_tests_step(build_tags=build_tags, port=3002),
])
trigger = {
'event': ['pull_request',],
}
return [
pipeline(
name='test-pr', edition=edition, trigger=trigger, services=services, steps=steps,
ver_mode=ver_mode,
),
]