mirror of
https://github.com/thegeeklab/ansible-doctor.git
synced 2024-11-22 04:40:43 +00:00
add docs validation to ci
This commit is contained in:
parent
7701f39fe8
commit
5e306a8aae
22
.dictionary
Normal file
22
.dictionary
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
([a-zA-Z0-9]+[_=])+\S+
|
||||||
|
@\S+
|
||||||
|
.py
|
||||||
|
Ansible
|
||||||
|
Bott
|
||||||
|
CLI
|
||||||
|
Jinja2
|
||||||
|
Kaussow
|
||||||
|
PyPI
|
||||||
|
YAML
|
||||||
|
Yaml
|
||||||
|
ansible-.+
|
||||||
|
basename
|
||||||
|
cli
|
||||||
|
config
|
||||||
|
dir
|
||||||
|
SELinux
|
||||||
|
subfolder
|
||||||
|
sudo
|
||||||
|
xoxys
|
||||||
|
option1:option2
|
||||||
|
todo
|
@ -212,6 +212,40 @@ local PipelineDocs = {
|
|||||||
limit: 1,
|
limit: 1,
|
||||||
},
|
},
|
||||||
steps: [
|
steps: [
|
||||||
|
{
|
||||||
|
name: 'markdownlint',
|
||||||
|
image: 'node:lts-alpine',
|
||||||
|
commands: [
|
||||||
|
'npm install -g markdownlint-cli',
|
||||||
|
"markdownlint 'docs/content/**/*.md' 'README.md'",
|
||||||
|
],
|
||||||
|
environment: {
|
||||||
|
FORCE_COLOR: true,
|
||||||
|
NPM_CONFIG_LOGLEVEL: 'error',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: 'spellcheck',
|
||||||
|
image: 'node:lts-alpine',
|
||||||
|
commands: [
|
||||||
|
'npm install -g spellchecker-cli',
|
||||||
|
"spellchecker --files 'docs/content/**/*.md' 'README.md' -d .dictionary -p spell indefinite-article syntax-urls --no-suggestions",
|
||||||
|
],
|
||||||
|
environment: {
|
||||||
|
FORCE_COLOR: true,
|
||||||
|
NPM_CONFIG_LOGLEVEL: 'error',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: 'link-validation',
|
||||||
|
image: 'xoxys/link-validator',
|
||||||
|
commands: [
|
||||||
|
'link-validator -ro',
|
||||||
|
],
|
||||||
|
environment: {
|
||||||
|
LINK_VALIDATOR_BASE_DIR: 'exampleSite/public',
|
||||||
|
},
|
||||||
|
},
|
||||||
{
|
{
|
||||||
name: 'assets',
|
name: 'assets',
|
||||||
image: 'byrnedo/alpine-curl',
|
image: 'byrnedo/alpine-curl',
|
||||||
@ -221,7 +255,7 @@ local PipelineDocs = {
|
|||||||
],
|
],
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'test',
|
name: 'build',
|
||||||
image: 'klakegg/hugo:0.59.1-ext-alpine',
|
image: 'klakegg/hugo:0.59.1-ext-alpine',
|
||||||
commands: [
|
commands: [
|
||||||
'cd docs/ && hugo-official',
|
'cd docs/ && hugo-official',
|
||||||
|
31
.drone.yml
31
.drone.yml
@ -338,13 +338,38 @@ concurrency:
|
|||||||
limit: 1
|
limit: 1
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
|
- name: markdownlint
|
||||||
|
image: node:lts-alpine
|
||||||
|
commands:
|
||||||
|
- npm install -g markdownlint-cli
|
||||||
|
- markdownlint 'docs/content/**/*.md' 'README.md'
|
||||||
|
environment:
|
||||||
|
FORCE_COLOR: true
|
||||||
|
NPM_CONFIG_LOGLEVEL: error
|
||||||
|
|
||||||
|
- name: spellcheck
|
||||||
|
image: node:lts-alpine
|
||||||
|
commands:
|
||||||
|
- npm install -g spellchecker-cli
|
||||||
|
- spellchecker --files 'docs/content/**/*.md' 'README.md' -d .dictionary -p spell indefinite-article syntax-urls --no-suggestions
|
||||||
|
environment:
|
||||||
|
FORCE_COLOR: true
|
||||||
|
NPM_CONFIG_LOGLEVEL: error
|
||||||
|
|
||||||
|
- name: link-validation
|
||||||
|
image: xoxys/link-validator
|
||||||
|
commands:
|
||||||
|
- link-validator -ro
|
||||||
|
environment:
|
||||||
|
LINK_VALIDATOR_BASE_DIR: exampleSite/public
|
||||||
|
|
||||||
- name: assets
|
- name: assets
|
||||||
image: byrnedo/alpine-curl
|
image: byrnedo/alpine-curl
|
||||||
commands:
|
commands:
|
||||||
- mkdir -p docs/themes/hugo-geekdoc/
|
- mkdir -p docs/themes/hugo-geekdoc/
|
||||||
- curl -L https://github.com/xoxys/hugo-geekdoc/releases/latest/download/hugo-geekdoc.tar.gz | tar -xz -C docs/themes/hugo-geekdoc/ --strip-components=1
|
- curl -L https://github.com/xoxys/hugo-geekdoc/releases/latest/download/hugo-geekdoc.tar.gz | tar -xz -C docs/themes/hugo-geekdoc/ --strip-components=1
|
||||||
|
|
||||||
- name: test
|
- name: build
|
||||||
image: klakegg/hugo:0.59.1-ext-alpine
|
image: klakegg/hugo:0.59.1-ext-alpine
|
||||||
commands:
|
commands:
|
||||||
- cd docs/ && hugo-official
|
- cd docs/ && hugo-official
|
||||||
@ -431,8 +456,4 @@ trigger:
|
|||||||
depends_on:
|
depends_on:
|
||||||
- docs
|
- docs
|
||||||
|
|
||||||
---
|
|
||||||
kind: signature
|
|
||||||
hmac: 4cccf7f253f9396b3447ed1a5027b9f1aa68d7211ddbfaf89ae7df43e509891a
|
|
||||||
|
|
||||||
...
|
...
|
||||||
|
4
.markdownlint.yml
Normal file
4
.markdownlint.yml
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
---
|
||||||
|
default: True
|
||||||
|
MD013: False
|
||||||
|
MD041: False
|
@ -1,2 +1,4 @@
|
|||||||
* INTERNAL
|
* INTERNAL
|
||||||
* maintenance and refactoring release, no changes
|
* add markdown linting to CI (markdownlint-cli)
|
||||||
|
* add spellchecking to CI (spellcheck-cli)
|
||||||
|
* add broken link check to CI (broken-link-checker)
|
||||||
|
@ -3,15 +3,15 @@
|
|||||||
[![Build Status](https://img.shields.io/drone/build/xoxys/ansible-doctor?logo=drone)](https://cloud.drone.io/xoxys/ansible-doctor)
|
[![Build Status](https://img.shields.io/drone/build/xoxys/ansible-doctor?logo=drone)](https://cloud.drone.io/xoxys/ansible-doctor)
|
||||||
[![Docker Hub](https://img.shields.io/badge/docker-latest-blue.svg?logo=docker&logoColor=white)](https://hub.docker.com/r/xoxys/ansible-doctor)
|
[![Docker Hub](https://img.shields.io/badge/docker-latest-blue.svg?logo=docker&logoColor=white)](https://hub.docker.com/r/xoxys/ansible-doctor)
|
||||||
[![Python Version](https://img.shields.io/pypi/pyversions/ansible-doctor.svg)](https://pypi.org/project/ansible-doctor/)
|
[![Python Version](https://img.shields.io/pypi/pyversions/ansible-doctor.svg)](https://pypi.org/project/ansible-doctor/)
|
||||||
[![PyPi Status](https://img.shields.io/pypi/status/ansible-doctor.svg)](https://pypi.org/project/ansible-doctor/)
|
[![PyPI Status](https://img.shields.io/pypi/status/ansible-doctor.svg)](https://pypi.org/project/ansible-doctor/)
|
||||||
[![PyPi Release](https://img.shields.io/pypi/v/ansible-doctor.svg)](https://pypi.org/project/ansible-doctor/)
|
[![PyPI Release](https://img.shields.io/pypi/v/ansible-doctor.svg)](https://pypi.org/project/ansible-doctor/)
|
||||||
[![License: MIT](https://img.shields.io/github/license/xoxys/ansible-doctor)](LICENSE)
|
[![License: MIT](https://img.shields.io/github/license/xoxys/ansible-doctor)](LICENSE)
|
||||||
|
|
||||||
This project is based on the idea (and at some parts on the code) of [ansible-autodoc](https://github.com/AndresBott/ansible-autodoc) by Andres Bott so credits goes to him for his work.
|
This project is based on the idea (and at some parts on the code) of [ansible-autodoc](https://github.com/AndresBott/ansible-autodoc) by Andres Bott so credits goes to him for his work.
|
||||||
|
|
||||||
_ansible-doctor_ is a simple annotation like documentation generator based on Jinja2 templates. While _ansible-doctor_ comes with a default template called `readme`, it is also possible to write your own templates. This gives you the ability to customize the output and render the data to every format you like (e.g. html or xml).
|
_ansible-doctor_ is a simple annotation like documentation generator based on Jinja2 templates. While _ansible-doctor_ comes with a default template called `readme`, it is also possible to write your own templates. This gives you the ability to customize the output and render the data to every format you like (e.g. HTML or XML).
|
||||||
|
|
||||||
_ansible-doctor_ is designed to work within your CI pipeline to complete your testing and deployment workflow. Releases are available as Python Packages on [GitHub](https://github.com/xoxys/ansible-doctor/releases) or [PyPI](https://pypi.org/project/ansible-doctor/) and as Docker Image on [DockerHub](https://hub.docker.com/r/xoxys/ansible-doctor).
|
_ansible-doctor_ is designed to work within your CI pipeline to complete your testing and deployment workflow. Releases are available as Python Packages on [GitHub](https://github.com/xoxys/ansible-doctor/releases) or [PyPI](https://pypi.org/project/ansible-doctor/) and as Docker Image on [Docker Hub](https://hub.docker.com/r/xoxys/ansible-doctor).
|
||||||
|
|
||||||
You can find the full documentation at [https://ansible-doctor.geekdocs.de](https://ansible-doctor.geekdocs.de/).
|
You can find the full documentation at [https://ansible-doctor.geekdocs.de](https://ansible-doctor.geekdocs.de/).
|
||||||
|
|
||||||
|
@ -5,12 +5,12 @@ title: Documentation
|
|||||||
[![Build Status](https://img.shields.io/drone/build/xoxys/ansible-doctor?logo=drone)](https://cloud.drone.io/xoxys/ansible-doctor/)
|
[![Build Status](https://img.shields.io/drone/build/xoxys/ansible-doctor?logo=drone)](https://cloud.drone.io/xoxys/ansible-doctor/)
|
||||||
[![Docker Hub](https://img.shields.io/badge/docker-latest-blue.svg?logo=docker&logoColor=white)](https://hub.docker.com/r/xoxys/ansible-doctor/)
|
[![Docker Hub](https://img.shields.io/badge/docker-latest-blue.svg?logo=docker&logoColor=white)](https://hub.docker.com/r/xoxys/ansible-doctor/)
|
||||||
[![Python Version](https://img.shields.io/pypi/pyversions/ansible-doctor.svg)](https://pypi.org/project/ansible-doctor/)
|
[![Python Version](https://img.shields.io/pypi/pyversions/ansible-doctor.svg)](https://pypi.org/project/ansible-doctor/)
|
||||||
[![PyPi Status](https://img.shields.io/pypi/status/ansible-doctor.svg)](https://pypi.org/project/ansible-doctor/)
|
[![PyPI Status](https://img.shields.io/pypi/status/ansible-doctor.svg)](https://pypi.org/project/ansible-doctor/)
|
||||||
[![PyPi Release](https://img.shields.io/pypi/v/ansible-doctor.svg)](https://pypi.org/project/ansible-doctor/)
|
[![PyPI Release](https://img.shields.io/pypi/v/ansible-doctor.svg)](https://pypi.org/project/ansible-doctor/)
|
||||||
[![License: MIT](https://img.shields.io/github/license/xoxys/ansible-doctor)](LICENSE)
|
[![License: MIT](https://img.shields.io/github/license/xoxys/ansible-doctor)](LICENSE)
|
||||||
|
|
||||||
This project is based on the idea (and at some parts on the code) of [ansible-autodoc](https://github.com/AndresBott/ansible-autodoc) by Andres Bott so credits goes to him for his work.
|
This project is based on the idea (and at some parts on the code) of [ansible-autodoc](https://github.com/AndresBott/ansible-autodoc) by Andres Bott so credits goes to him for his work.
|
||||||
|
|
||||||
_ansible-doctor_ is a simple annotation like documentation generator based on Jinja2 templates. While _ansible-doctor_ comes with a default template called `readme`, it is also possible to write your own templates. This gives you the ability to customize the output and render the data to every format you like (e.g. html or xml).
|
_ansible-doctor_ is a simple annotation like documentation generator based on Jinja2 templates. While _ansible-doctor_ comes with a default template called `readme`, it is also possible to write your own templates. This gives you the ability to customize the output and render the data to every format you like (e.g. HTML or XML).
|
||||||
|
|
||||||
_ansible-doctor_ is designed to work within your CI pipeline to complete your testing and deployment workflow. Releases are available as Python Packages at [GitHub](https://github.com/xoxys/ansible-doctor/releases) or [PyPI](https://pypi.org/project/ansible-doctor/) and as Docker Image at [DockerHub](https://hub.docker.com/r/xoxys/ansible-doctor).
|
_ansible-doctor_ is designed to work within your CI pipeline to complete your testing and deployment workflow. Releases are available as Python Packages at [GitHub](https://github.com/xoxys/ansible-doctor/releases) or [PyPI](https://pypi.org/project/ansible-doctor/) and as Docker Image at [Docker Hub](https://hub.docker.com/r/xoxys/ansible-doctor).
|
||||||
|
@ -2,13 +2,14 @@
|
|||||||
title: Default settings
|
title: Default settings
|
||||||
---
|
---
|
||||||
|
|
||||||
|
<!-- markdownlint-disable -->
|
||||||
{{< highlight YAML "linenos=table" >}}
|
{{< highlight YAML "linenos=table" >}}
|
||||||
---
|
---
|
||||||
# default is your current working dir
|
# default is your current working dir
|
||||||
role_dir:
|
role_dir:
|
||||||
# default is the basename of 'role_name'
|
# default is the basename of 'role_name'
|
||||||
role_name:
|
role_name:
|
||||||
# don't write anything to filesystem
|
# don't write anything to file system
|
||||||
dry_run: False
|
dry_run: False
|
||||||
|
|
||||||
logging:
|
logging:
|
||||||
@ -36,3 +37,4 @@ exclude_files: []
|
|||||||
# - molecule/
|
# - molecule/
|
||||||
# - files/**/*.py
|
# - files/**/*.py
|
||||||
{{< /highlight >}}
|
{{< /highlight >}}
|
||||||
|
<!-- markdownlint-enable -->
|
||||||
|
@ -18,5 +18,5 @@ docker run \
|
|||||||
|
|
||||||
{{< hint info >}}
|
{{< hint info >}}
|
||||||
**Info**\
|
**Info**\
|
||||||
Keep in mind, that you have to pass selinux labels (:Z or :z) to your mount option if you are working on selinux enabled systems.
|
Keep in mind, that you have to pass SELinux labels (:Z or :z) to your mount option if you are working on SELinux enabled systems.
|
||||||
{{< /hint >}}
|
{{< /hint >}}
|
||||||
|
@ -3,8 +3,9 @@ title: Using pip
|
|||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
|
<!-- markdownlint-disable -->
|
||||||
{{< highlight Shell "linenos=table" >}}
|
{{< highlight Shell "linenos=table" >}}
|
||||||
# From PyPI as unprivilegd user
|
# From PyPI as unprivileged user
|
||||||
$ pip install ansible-doctor --user
|
$ pip install ansible-doctor --user
|
||||||
|
|
||||||
# .. or as root
|
# .. or as root
|
||||||
@ -13,3 +14,4 @@ $ sudo pip install ansible-doctor
|
|||||||
# From Wheel file
|
# From Wheel file
|
||||||
$ pip install https://github.com/xoxys/ansible-doctor/releases/download/v0.1.1/ansible_doctor-0.1.1-py2.py3-none-any.whl
|
$ pip install https://github.com/xoxys/ansible-doctor/releases/download/v0.1.1/ansible_doctor-0.1.1-py2.py3-none-any.whl
|
||||||
{{< /highlight >}}
|
{{< /highlight >}}
|
||||||
|
<!-- markdownlint-enable -->
|
||||||
|
@ -6,7 +6,7 @@ title: Usage
|
|||||||
ansible-doctor FOLDER
|
ansible-doctor FOLDER
|
||||||
```
|
```
|
||||||
|
|
||||||
If you don't pass a folder to *ansible-doctor* your current working directory will be used. The first step is to identify if the given folder is an ansible role. This check is very simple, if the folder contains a subfolder called `tasks` is MUST be an ansible role! :)
|
If you don't pass a folder to *ansible-doctor* your current working directory will be used. The first step is to identify if the given folder is an Ansible role. This check is very simple, if the folder contains a subfolder called `tasks` is MUST be an Ansible role! :)
|
||||||
|
|
||||||
After the successful check, *ansible-doctor* will try to read some static files into a dictionary:
|
After the successful check, *ansible-doctor* will try to read some static files into a dictionary:
|
||||||
|
|
||||||
@ -15,19 +15,21 @@ After the successful check, *ansible-doctor* will try to read some static files
|
|||||||
|
|
||||||
This will be the base result set which is used as data source for every output template. Without any work, you will get at least a documentation about available variables and some meta information. Theses basic information can be expanded with a set of available annotations. In general, an annotation is a comment with an identifier. This identifier is followed by colon separated options and ends with a value.
|
This will be the base result set which is used as data source for every output template. Without any work, you will get at least a documentation about available variables and some meta information. Theses basic information can be expanded with a set of available annotations. In general, an annotation is a comment with an identifier. This identifier is followed by colon separated options and ends with a value.
|
||||||
|
|
||||||
|
<!-- markdownlint-disable -->
|
||||||
{{< highlight Yaml "linenos=table" >}}
|
{{< highlight Yaml "linenos=table" >}}
|
||||||
# @identifier option1:option2: <value>
|
# @identifier option1:option2: <value>
|
||||||
|
|
||||||
# @var docker_registry_password:example: "%8gv_5GA?"
|
# @var docker_registry_password:example: "%8gv_5GA?"
|
||||||
# @var docker_registry_password:description: Very secure password to login to the docker registry
|
# @var docker_registry_password:description: Very secure password to login to the docker registry
|
||||||
# @var docker_registry_password:description: >
|
# @var docker_registry_password:description: >
|
||||||
# You can also write it as multiline description
|
# You can also write it as multi line description
|
||||||
# Very secure password to login to the docker registry.
|
# Very secure password to login to the docker registry.
|
||||||
# @end
|
# @end
|
||||||
docker_registry_password: "secret"
|
docker_registry_password: "secret"
|
||||||
{{< /highlight >}}
|
{{< /highlight >}}
|
||||||
|
<!-- markdownlint-enable -->
|
||||||
|
|
||||||
These list of pre-defined identifiers is currently available:
|
These list of predefined identifiers is currently available:
|
||||||
|
|
||||||
* @meta
|
* @meta
|
||||||
* @todo
|
* @todo
|
||||||
|
Loading…
Reference in New Issue
Block a user