forked from docs/team-docs
ci: fix vale pipeline
This commit is contained in:
parent
fe63036346
commit
31d1f24ebb
33 changed files with 68 additions and 2436 deletions
|
|
@ -36,12 +36,16 @@ code_quality:
|
|||
VARH_REPO: "redhat-documentation/vale-at-red-hat"
|
||||
VARH_BRANCH: "main"
|
||||
before_script:
|
||||
- apk add --no-cache curl asciidoctor python3
|
||||
- |
|
||||
curl -o vale2cc.py \
|
||||
https://raw.githubusercontent.com/${VARH_REPO}/${VARH_BRANCH}/tools/vale2cc.py
|
||||
# - apk update && apk add git
|
||||
- vale sync
|
||||
script:
|
||||
- vale --no-exit --output=JSON . | python3 vale2cc.py > gl-code-quality-report.json
|
||||
# list of updated/modified *.adoc files
|
||||
# - FILES=$(git diff --name-only HEAD~1 HEAD --diff-filter=d "*.adoc")
|
||||
# clean out conditions for wider vale coverage
|
||||
# - sed -i -e 's/ifdef::.*\|ifndef::.*\|ifeval::.*\|endif::.*/ /' ${FILES}
|
||||
# use a template to rearrange the vale JSON output
|
||||
# run vale with `--no-exit` to pass the build with errors
|
||||
- vale --no-exit --minAlertLevel=error --glob='*.adoc' --output="$(pwd)/vale-json.tmpl" . | sed "s/CI_COMMIT_SHA/$CI_COMMIT_SHA/g" > gl-code-quality-report.json
|
||||
artifacts:
|
||||
reports:
|
||||
codequality: gl-code-quality-report.json
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue