grafana/scripts/pr.star
Marcus Andersson b5196f531c
Build: added steps to generate packages api documentation. (#27930)
* added steps to generate docs.

* re-generated the drone.yml file.

* removed metrics reporting from pr pipeline.

* fixed spelling issues.

* fixed so package generation should work.

* some small refactorings.

* fixed spelling error.

* adding echo to verify that we execute the correct script.

* removed echo statement.

* changed scripts a bit.

* added ci flag to script.

* adding exit 1

* increased the limit.

* added missing space.

* fixed shellcheck error.

* fixing lint errors.

* renamed build step.

* changed logic.

* increased limit.

* changed to echo instead of echo -e

* fixed shellcheck errors.

* trying to debug script,

* trying to simplify the find statement.

* fixed issue with text formatting on linux.

* imported build step.

* Update scripts/ci-reference-docs-lint.sh

Co-authored-by: Arve Knudsen <arve.knudsen@gmail.com>

* removed cleanup of packages.

* increased limit.

* will build frontend docs on master but not lint it.

* will always run the linting step.

Co-authored-by: Arve Knudsen <arve.knudsen@gmail.com>
2020-10-14 14:35:55 +02:00

70 lines
2.2 KiB
Plaintext

load(
'scripts/lib.star',
'pipeline',
'lint_backend_step',
'codespell_step',
'shellcheck_step',
'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',
'get_windows_steps',
'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),
codespell_step(),
shellcheck_step(),
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(),
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(),
]
windows_steps = get_windows_steps(edition=edition, ver_mode=ver_mode)
if edition == 'enterprise':
steps.append(benchmark_ldap_step())
services.append(ldap_service())
trigger = {
'event': ['pull_request',],
}
return [
pipeline(
name='test-pr', edition=edition, trigger=trigger, services=services, steps=steps,
ver_mode=ver_mode,
),
pipeline(
name='windows-pr', edition=edition, trigger=trigger, steps=windows_steps, platform='windows',
ver_mode=ver_mode,
),
]