Skip to content

Introduce lint-md and compliance-docs pipeline #24021

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Apr 9, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
64 changes: 47 additions & 17 deletions .drone.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ trigger:
- pull_request
paths:
exclude:
- docs/**
- "docs/**"
- "*.md"

volumes:
- name: deps
Expand Down Expand Up @@ -181,7 +182,7 @@ trigger:
- pull_request
paths:
exclude:
- docs/**
- "docs/**"

volumes:
- name: deps
Expand Down Expand Up @@ -266,6 +267,35 @@ steps:
- name: deps
path: /go

---
kind: pipeline
type: docker
name: compliance-docs

platform:
os: linux
arch: amd64

trigger:
event:
- pull_request
paths:
include:
- "docs/**"
- "*.md"

steps:
- name: deps-frontend
image: node:18
pull: always
commands:
- make deps-frontend

- name: lint-md
image: node:18
commands:
- make lint-md

---
kind: pipeline
type: docker
Expand All @@ -283,7 +313,7 @@ trigger:
- pull_request
paths:
exclude:
- docs/**
- "docs/**"

volumes:
- name: deps
Expand Down Expand Up @@ -444,7 +474,7 @@ trigger:
- pull_request
paths:
exclude:
- docs/**
- "docs/**"

volumes:
- name: deps
Expand Down Expand Up @@ -530,7 +560,7 @@ trigger:
- pull_request
paths:
exclude:
- docs/**
- "docs/**"

volumes:
- name: deps
Expand Down Expand Up @@ -616,7 +646,7 @@ trigger:
- pull_request
paths:
exclude:
- docs/**
- "docs/**"

volumes:
- name: deps
Expand Down Expand Up @@ -696,7 +726,7 @@ trigger:
- pull_request
paths:
exclude:
- docs/**
- "docs/**"

volumes:
- name: deps
Expand Down Expand Up @@ -867,7 +897,7 @@ trigger:
- push
paths:
exclude:
- docs/**
- "docs/**"

depends_on:
- testing-mysql
Expand Down Expand Up @@ -1125,7 +1155,7 @@ trigger:
- pull_request
paths:
include:
- docs/**
- "docs/**"

steps:
- name: build-docs
Expand Down Expand Up @@ -1176,7 +1206,7 @@ trigger:
- cron
paths:
exclude:
- docs/**
- "docs/**"

steps:
- name: fetch-tags
Expand Down Expand Up @@ -1253,7 +1283,7 @@ trigger:
- cron
paths:
exclude:
- docs/**
- "docs/**"

steps:
- name: fetch-tags
Expand Down Expand Up @@ -1468,7 +1498,7 @@ trigger:
- pull_request
paths:
exclude:
- docs/**
- "docs/**"

steps:
- name: dryrun
Expand Down Expand Up @@ -1515,7 +1545,7 @@ trigger:
- cron
paths:
exclude:
- docs/**
- "docs/**"

steps:
- name: fetch-tags
Expand Down Expand Up @@ -1592,7 +1622,7 @@ trigger:
- cron
paths:
exclude:
- docs/**
- "docs/**"

steps:
- name: fetch-tags
Expand Down Expand Up @@ -1667,7 +1697,7 @@ trigger:
- cron
paths:
exclude:
- docs/**
- "docs/**"

steps:
- name: fetch-tags
Expand Down Expand Up @@ -1834,7 +1864,7 @@ trigger:
- cron
paths:
exclude:
- docs/**
- "docs/**"

depends_on:
- docker-linux-amd64-release-version
Expand Down Expand Up @@ -1884,7 +1914,7 @@ trigger:
- cron
paths:
exclude:
- docs/**
- "docs/**"

depends_on:
- docker-linux-amd64-release
Expand Down
6 changes: 5 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,7 @@ help:
@echo " - lint lint everything"
@echo " - lint-frontend lint frontend files"
@echo " - lint-backend lint backend files"
@echo " - lint-md lint markdown files"
@echo " - checks run various consistency checks"
@echo " - checks-frontend check frontend files"
@echo " - checks-backend check backend files"
Expand Down Expand Up @@ -341,10 +342,13 @@ checks-backend: tidy-check swagger-check fmt-check misspell-check swagger-valida
lint: lint-frontend lint-backend

.PHONY: lint-frontend
lint-frontend: node_modules
lint-frontend: node_modules lint-md
npx eslint --color --max-warnings=0 --ext js,vue web_src/js build *.config.js docs/assets/js tests/e2e
npx stylelint --color --max-warnings=0 web_src/css
npx spectral lint -q -F hint $(SWAGGER_SPEC)

.PHONY: lint-md
lint-md: node_modules
npx markdownlint docs *.md

.PHONY: lint-backend
Expand Down