mirror of
https://github.com/grafana/grafana.git
synced 2025-02-15 10:03:33 -06:00
* format drone starlark files with black * clean up unused params * more simplification * more cleanup * more cleanup
89 lines
1.6 KiB
Plaintext
89 lines
1.6 KiB
Plaintext
load(
|
|
'scripts/drone/steps/lib.star',
|
|
'build_image',
|
|
'yarn_install_step',
|
|
'identify_runner_step',
|
|
'download_grabpl_step',
|
|
'lint_frontend_step',
|
|
'codespell_step',
|
|
'test_frontend_step',
|
|
'build_storybook_step',
|
|
'build_docs_website_step',
|
|
)
|
|
|
|
load(
|
|
'scripts/drone/services/services.star',
|
|
'integration_test_services',
|
|
'ldap_service',
|
|
)
|
|
|
|
load(
|
|
'scripts/drone/utils/utils.star',
|
|
'pipeline',
|
|
)
|
|
|
|
docs_paths = {
|
|
'include': [
|
|
'*.md',
|
|
'docs/**',
|
|
'packages/**/*.md',
|
|
'latest.json',
|
|
],
|
|
}
|
|
|
|
|
|
def docs_pipelines(ver_mode, trigger):
|
|
environment = {'EDITION': 'oss'}
|
|
steps = [
|
|
download_grabpl_step(),
|
|
identify_runner_step(),
|
|
yarn_install_step(),
|
|
codespell_step(),
|
|
lint_docs(),
|
|
build_docs_website_step(),
|
|
]
|
|
|
|
return pipeline(
|
|
name='{}-docs'.format(ver_mode),
|
|
edition='oss',
|
|
trigger=trigger,
|
|
services=[],
|
|
steps=steps,
|
|
environment=environment,
|
|
)
|
|
|
|
|
|
def lint_docs():
|
|
return {
|
|
'name': 'lint-docs',
|
|
'image': build_image,
|
|
'depends_on': [
|
|
'yarn-install',
|
|
],
|
|
'environment': {
|
|
'NODE_OPTIONS': '--max_old_space_size=8192',
|
|
},
|
|
'commands': [
|
|
'yarn run prettier:checkDocs',
|
|
],
|
|
}
|
|
|
|
|
|
def trigger_docs_main():
|
|
return {
|
|
'branch': 'main',
|
|
'event': [
|
|
'push',
|
|
],
|
|
'paths': docs_paths,
|
|
}
|
|
|
|
|
|
def trigger_docs_pr():
|
|
return {
|
|
'event': [
|
|
'pull_request',
|
|
],
|
|
'paths': docs_paths,
|
|
}
|