-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
112 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,12 @@ | ||
__pycache__ | ||
build | ||
pages | ||
*.junit.xml | ||
|
||
|
||
## Make prepare items | ||
node_modules/ | ||
package-lock.json | ||
package.json | ||
.markdownlint.json | ||
.markdownlint-cli2.jsonc |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,55 @@ | ||
# Contirbution Guide | ||
# Contribution Guide | ||
|
||
We welcome contributions. | ||
Development of this project has been setup to be done from VSCodium. The following additional requirements need to be met: | ||
|
||
- npm has been installed. _required for `markdown` linting_ | ||
|
||
`sudo apt install -y --no-install-recommends npm` | ||
|
||
- setup of other requirements can be done with `make prepare` | ||
|
||
- **ALL** Linting must pass for Merge to be conducted. | ||
|
||
_`make lint`_ | ||
|
||
|
||
## Makefile | ||
|
||
!!! tip "TL;DR" | ||
Common make commands are `make prepare` then `make docs` and `make lint` | ||
|
||
Included within the root of the repository is a makefile that can be used during development to check/run different items as is required during development. The following make targets are available: | ||
|
||
- `prepare` | ||
|
||
_prepare the repository. init's all git submodules and sets up a python virtual env and other make targets_ | ||
|
||
- `docs` | ||
|
||
_builds the docs and places them within a directory called build, which can be viewed within a web browser_ | ||
|
||
- `lint` | ||
|
||
_conducts all required linting_ | ||
|
||
- `ansible-lint` | ||
|
||
_lints ansible directories/files only. should only be used when you only want to check Ansible formatting._ | ||
|
||
- `docs-lint` | ||
|
||
_lints the markdown documents within the docs directory for formatting errors that MKDocs may/will have an issue with._ | ||
|
||
- `clean` | ||
|
||
_cleans up build artifacts and removes the python virtual environment_ | ||
|
||
|
||
## Inventory Plugin | ||
|
||
``` bash | ||
|
||
# to test use | ||
ansible-inventory -i nofusscomputing.itsm.centurion --list -vvv | ||
ansible-inventory -i nofusscomputing.centurion.centurion --list -vvv | ||
|
||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
.ONESHELL: | ||
|
||
PATH_VENV := /tmp/ansible_collection_centurion | ||
|
||
ACTIVATE_VENV :=. ${PATH_VENV}/bin/activate | ||
|
||
.PHONY: clean prepare docs ansible-lint lint | ||
|
||
|
||
prepare: | ||
git submodule update --init; | ||
git submodule foreach git submodule update --init; | ||
python3 -m venv ${PATH_VENV}; | ||
${ACTIVATE_VENV}; | ||
pip install -r website-template/gitlab-ci/mkdocs/requirements.txt; | ||
pip install -r gitlab-ci/lint/requirements.txt; | ||
npm install markdownlint-cli2; | ||
npm install markdownlint-cli2-formatter-junit; | ||
cp -f "website-template/.markdownlint.json" ".markdownlint.json"; | ||
cp -f "gitlab-ci/lint/.markdownlint-cli2.jsonc" ".markdownlint-cli2.jsonc"; | ||
|
||
|
||
markdown-mkdocs-lint: | ||
PATH=${PATH}:node_modules/.bin markdownlint-cli2 "docs/*.md docs/**/*.md docs/**/**/*.md docs/**/**/**/*.md docs/**/**/**/**/**/*.md #CHANGELOG.md !gitlab-ci !website-template" | ||
|
||
|
||
docs-lint: markdown-mkdocs-lint | ||
|
||
|
||
docs: docs-lint | ||
${ACTIVATE_VENV} | ||
mkdocs build --clean | ||
|
||
|
||
ansible-lint-galaxy: | ||
${ACTIVATE_VENV} | ||
ansible-lint galaxy.yml | ||
|
||
|
||
ansible-lint-dirs: | ||
${ACTIVATE_VENV} | ||
ansible-lint meta/ playbooks/ roles/ | ||
|
||
|
||
ansible-lint: ansible-lint-galaxy ansible-lint-dirs | ||
|
||
|
||
lint: ansible-lint markdown-mkdocs-lint | ||
|
||
|
||
clean: | ||
rm -rf ${PATH_VENV} | ||
rm -rf pages | ||
rm -rf build |