mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
CI: Add more checks to standalone docs pipeline (#46449)
* Add build frontend package step * Reorder dependencies * Add codespell and prettier checks
This commit is contained in:
parent
cb0b089d32
commit
82b436afee
74
.drone.yml
74
.drone.yml
@ -437,13 +437,41 @@ steps:
|
||||
image: grafana/build-container:1.5.2
|
||||
name: initialize
|
||||
- commands:
|
||||
- yarn packages:build
|
||||
- yarn packages:docsExtract
|
||||
- yarn packages:docsToMarkdown
|
||||
- ./scripts/ci-reference-docs-lint.sh ci
|
||||
- |-
|
||||
echo -e "unknwon
|
||||
referer
|
||||
errorstring
|
||||
eror
|
||||
iam
|
||||
wan" > words_to_ignore.txt
|
||||
- codespell -I words_to_ignore.txt docs/
|
||||
- rm words_to_ignore.txt
|
||||
depends_on:
|
||||
- initialize
|
||||
image: grafana/build-container:1.5.2
|
||||
name: codespell
|
||||
- commands:
|
||||
- yarn run prettier:checkDocs
|
||||
depends_on:
|
||||
- initialize
|
||||
environment:
|
||||
NODE_OPTIONS: --max_old_space_size=8192
|
||||
image: grafana/build-container:1.5.2
|
||||
name: lint-docs
|
||||
- commands:
|
||||
- ./bin/grabpl build-frontend-packages --jobs 8 --edition oss --build-id ${DRONE_BUILD_NUMBER}
|
||||
--no-pull-enterprise
|
||||
depends_on:
|
||||
- initialize
|
||||
environment:
|
||||
NODE_OPTIONS: --max_old_space_size=8192
|
||||
image: grafana/build-container:1.5.2
|
||||
name: build-frontend-packages
|
||||
- commands:
|
||||
- ./scripts/ci-reference-docs-lint.sh ci
|
||||
depends_on:
|
||||
- build-frontend-packages
|
||||
image: grafana/build-container:1.5.2
|
||||
name: build-frontend-docs
|
||||
- commands:
|
||||
- mkdir -p /hugo/content/docs/grafana
|
||||
@ -493,13 +521,41 @@ steps:
|
||||
image: grafana/build-container:1.5.2
|
||||
name: initialize
|
||||
- commands:
|
||||
- yarn packages:build
|
||||
- yarn packages:docsExtract
|
||||
- yarn packages:docsToMarkdown
|
||||
- ./scripts/ci-reference-docs-lint.sh ci
|
||||
- |-
|
||||
echo -e "unknwon
|
||||
referer
|
||||
errorstring
|
||||
eror
|
||||
iam
|
||||
wan" > words_to_ignore.txt
|
||||
- codespell -I words_to_ignore.txt docs/
|
||||
- rm words_to_ignore.txt
|
||||
depends_on:
|
||||
- initialize
|
||||
image: grafana/build-container:1.5.2
|
||||
name: codespell
|
||||
- commands:
|
||||
- yarn run prettier:checkDocs
|
||||
depends_on:
|
||||
- initialize
|
||||
environment:
|
||||
NODE_OPTIONS: --max_old_space_size=8192
|
||||
image: grafana/build-container:1.5.2
|
||||
name: lint-docs
|
||||
- commands:
|
||||
- ./bin/grabpl build-frontend-packages --jobs 8 --edition oss --build-id ${DRONE_BUILD_NUMBER}
|
||||
--no-pull-enterprise
|
||||
depends_on:
|
||||
- initialize
|
||||
environment:
|
||||
NODE_OPTIONS: --max_old_space_size=8192
|
||||
image: grafana/build-container:1.5.2
|
||||
name: build-frontend-packages
|
||||
- commands:
|
||||
- ./scripts/ci-reference-docs-lint.sh ci
|
||||
depends_on:
|
||||
- build-frontend-packages
|
||||
image: grafana/build-container:1.5.2
|
||||
name: build-frontend-docs
|
||||
- commands:
|
||||
- mkdir -p /hugo/content/docs/grafana
|
||||
@ -4330,6 +4386,6 @@ kind: secret
|
||||
name: gcp_upload_artifacts_key
|
||||
---
|
||||
kind: signature
|
||||
hmac: 2d48c15c46e95a72e8fc0715b405f17e770512a68a6526be08ca5e9f21a307f2
|
||||
hmac: 5436fa85451361525a2d8b9c40b632623bd05ddd89f76095310b359de7993f11
|
||||
|
||||
...
|
||||
|
@ -38,6 +38,7 @@
|
||||
"packages:clean": "lerna run clean",
|
||||
"precommit": "yarn run lint-staged",
|
||||
"prettier:check": "prettier --check --list-different=false --loglevel=warn \"**/*.{ts,tsx,scss,md,mdx}\"",
|
||||
"prettier:checkDocs": "prettier --check --list-different=false --loglevel=warn \"docs/**.md\" \"packages/**.{ts,tsx,scss,md,mdx}\"",
|
||||
"prettier:write": "prettier --list-different \"**/*.{js,ts,tsx,scss,md,mdx}\" --write",
|
||||
"start": "yarn themes:generate && yarn dev --watch",
|
||||
"start:noTsCheck": "yarn start --env noTsCheck=1",
|
||||
|
@ -1,13 +1,14 @@
|
||||
load(
|
||||
'scripts/drone/steps/lib.star',
|
||||
'build_image',
|
||||
'initialize_step',
|
||||
'download_grabpl_step',
|
||||
'lint_frontend_step',
|
||||
'codespell_step',
|
||||
'shellcheck_step',
|
||||
'test_frontend_step',
|
||||
'build_storybook_step',
|
||||
'build_frontend_docs_step',
|
||||
'build_frontend_package_step',
|
||||
'build_docs_website_step',
|
||||
)
|
||||
|
||||
@ -28,6 +29,9 @@ def docs_pipelines(edition, ver_mode, trigger):
|
||||
|
||||
# Insert remaining steps
|
||||
steps.extend([
|
||||
codespell_step(),
|
||||
lint_docs(),
|
||||
build_frontend_package_step(edition=edition, ver_mode=ver_mode),
|
||||
build_frontend_docs_step(edition=edition),
|
||||
build_docs_website_step(),
|
||||
])
|
||||
@ -36,6 +40,21 @@ def docs_pipelines(edition, ver_mode, trigger):
|
||||
name='{}-docs'.format(ver_mode), edition=edition, trigger=trigger, services=[], steps=steps,
|
||||
)
|
||||
|
||||
def lint_docs():
|
||||
return {
|
||||
'name': 'lint-docs',
|
||||
'image': build_image,
|
||||
'depends_on': [
|
||||
'initialize',
|
||||
],
|
||||
'environment': {
|
||||
'NODE_OPTIONS': '--max_old_space_size=8192',
|
||||
},
|
||||
'commands': [
|
||||
'yarn run prettier:checkDocs',
|
||||
],
|
||||
}
|
||||
|
||||
|
||||
def trigger_docs():
|
||||
return {
|
||||
|
@ -458,12 +458,9 @@ def build_frontend_docs_step(edition):
|
||||
'name': 'build-frontend-docs',
|
||||
'image': build_image,
|
||||
'depends_on': [
|
||||
'initialize'
|
||||
'build-frontend-packages'
|
||||
],
|
||||
'commands': [
|
||||
'yarn packages:build',
|
||||
'yarn packages:docsExtract',
|
||||
'yarn packages:docsToMarkdown',
|
||||
'./scripts/ci-reference-docs-lint.sh ci',
|
||||
]
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user