Skip to content

ci: add mkdocs workflow #52

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

Open
wants to merge 4 commits into
base: development
Choose a base branch
from
Open
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
25 changes: 15 additions & 10 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -1,14 +1,19 @@
# ---
# name: 'Python'
---
name: 'CI'


# on:
# push:
on:
push:
branches:
- '**'
tags:
- '*'

# jobs:

# collection:
# name: 'Ansible Collection'
# uses: nofusscomputing/action_ansible_collection/.github/workflows/reusable_ansible_collection.yaml@genesis
# # secrets:
# # WORKFLOW_TOKEN: ${{ secrets.WORKFLOW_TOKEN }}
jobs:

mkdocs:
name: 'MKDocs'
uses: nofusscomputing/action_mkdocs/.github/workflows/reusable_mkdocs.yaml@genesis
# secrets:
# WORKFLOW_TOKEN: ${{ secrets.WORKFLOW_TOKEN }}
Empty file added docs/.gitkeep
Empty file.
Empty file added docs/articles/index.md
Empty file.
Empty file added docs/contact.md
Empty file.
Empty file added docs/index.md
Empty file.
Empty file added docs/operations/index.md
Empty file.
119 changes: 119 additions & 0 deletions docs/projects/ansible/collection/centurion/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,119 @@
---
title: Centurion
description: No Fuss Computings Companion Ansible Collection Centurion for Centurion ERP.
date: 2024-07-30
template: project.html
about: https://gitlab.com/nofusscomputing/projects/ansible/collections/kubernetes
---

# L1 should fail

<span style="text-align: center;">

![Project Status - Active](https://img.shields.io/badge/Project%20Status-Active-green?logo=github&style=plastic)


![GitHub Actions Workflow Status](https://img.shields.io/github/actions/workflow/status/nofusscomputing/ansible_collection_centurion/ci.yaml?branch=master&style=plastic&logo=github&label=Build&color=%23000) ![GitHub Release](https://img.shields.io/github/v/release/nofusscomputing/ansible_collection_centurion?sort=date&style=plastic&logo=github&label=Release&color=000)

[![Downloads](https://img.shields.io/badge/dynamic/json?url=https%3A%2F%2Fgalaxy.ansible.com%2Fapi%2Fv3%2Fplugin%2Fansible%2Fcontent%2Fpublished%2Fcollections%2Findex%2Fnofusscomputing%2Fcenturion%2F&query=%24.download_count&style=plastic&logo=ansible&logoColor=white&label=Galaxy%20Downloads&labelColor=black&color=cyan)](https://galaxy.ansible.com/ui/repo/published/nofusscomputing/centurion/)



</span>

This Ansible Collection is intended to compliement [Centurion ERP](../../../centurion_erp/index.md).

## Features

- [Inventory plugin](./plugins/inventory.md)


## Ansible Automation Platform / AWX

This collection can be directly added to AAP/AWX. To do so conduct the following:

1. Add the collection as a Project

`Projects -> Add`

- name: _Collection/No Fuss Computing/Centurion_

- Source Control Type: _Git_

- Source Control URL: _https://gitlab.com/nofusscomputing/projects/ansible/collections/centurion_erp_collection.git_

- Source Control Branch/Tag/Commit: _set to a branch, tag or commit_

- `Save`

1. Add a Credential type for the invneotries use

`Credential Types -> Add`

- name: _Collection/No Fuss Computing/Centurion_

- Input configuration:

``` yaml

fields:
- id: CENTURION_API
type: string
label: Centurion Host URL
- id: CENTURION_TOKEN
type: string
label: Centurion API Token
secret: true
- id: VALIDATE_CENTURION_CERTS
type: boolean
label: Validate Centurion SSL Certificate
required:
- CENTURION_API
- CENTURION_TOKEN

```

- Injector configuration:

``` yaml

env:
CENTURION_API: '{{ CENTURION_API }}'
CENTURION_TOKEN: '{{ CENTURION_TOKEN }}'
VALIDATE_CENTURION_CERTS: '{{ VALIDATE_CENTURION_CERTS | default(true) }}'

```

1. Create a Credential

`Credentials -> Add`

- name: _Centurion_

- Credential Type: _Collection/No Fuss Computing/Centurion_

1. Add an inventory

`Inventoryies -> Add` and complete the fields

- name: _Centurion_

- `Save`

1. Add a source to the inventory

`Inventoryies -> <Centurion Inventory> -> Sources -> Add`

- name: _Centurion ERP_

- Source: _Sourced from Project_

- Credential: _Centurion_

- Project: _Collection/No Fuss Computing/Centurion_

- Inventory File: _inventory/inventory.yaml_

- `Save`

1. a
11 changes: 11 additions & 0 deletions docs/projects/ansible/collection/centurion/plugins/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
title: Plugins
description: No Fuss Computings Companion Ansible Collection Centurion Plugins.
date: 2024-07-31
template: project.html
about: https://gitlab.com/nofusscomputing/projects/ansible/collections/kubernetes
---

Available plugins include:

- [Inventory](./inventory.md)
11 changes: 11 additions & 0 deletions docs/projects/ansible/collection/centurion/plugins/inventory.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
title: Inventory
description: No Fuss Computings Companion Ansible Collection Centurion Inventory Plugin.
date: 2024-07-31
template: project.html
about: https://gitlab.com/nofusscomputing/projects/ansible/collections/kubernetes
---

This inventory plugin obtains the data required from [Centurion ERP](../../../../centurion_erp/index.md) to build up an ansible inventory for all devices.

## random
Empty file.
Empty file added docs/projects/ansible/index.md
Empty file.
Empty file.
Empty file added docs/projects/index.md
Empty file.
Empty file added docs/tags.md
Empty file.
7 changes: 7 additions & 0 deletions gitlab-ci/.cz.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
commitizen:
bump_message: "build(version): bump version $current_version \u2192 $new_version"
changelog_incremental: false
name: cz_conventional_commits
tag_format: $major.$minor.$patch$prerelease
update_changelog_on_bump: true
version: 0.7.0rc0
17 changes: 17 additions & 0 deletions gitlab-ci/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@

# Log files
*.log

# Python environments
env/
dev_env/

# ignore junit reports
*.junit.xml

# ignore gitlab-ci artifacts
artifacts/


__pycache__
*.egg-info
149 changes: 149 additions & 0 deletions gitlab-ci/.gitlab-ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,149 @@

stages:
- chores
- validation
- build
- prepare
- test
- release
- sync
- deploy
- publish

include:
- local: $JOB_ROOT_DIR/lint/yaml.gitlab-ci.yaml
- local: $JOB_ROOT_DIR/template/automagic.gitlab-ci.yaml

- local: $JOB_ROOT_DIR/conventional_commits/.gitlab-ci.yml
- local: $JOB_ROOT_DIR/git_push_mirror/.gitlab-ci.yml
- local: $JOB_ROOT_DIR/gitlab_release/.gitlab-ci.yml
- local: $JOB_ROOT_DIR/lint/markdown.gitlab-ci.yaml
- local: $JOB_ROOT_DIR/python/.gitlab-ci.yml
# - local: $JOB_ROOT_DIR/test/.gitlab-ci.yml
- local: $JOB_ROOT_DIR/ansible/collection/ci-test.gitlab-ci.yml
- template: Security/Dependency-Scanning.gitlab-ci.yml
#- template: Security/License-Scanning.gitlab-ci.yml


variables:
JOB_ROOT_DIR: '.'
SECURE_LOG_LEVEL: debug
GIT_SUBMODULE_STRATEGY: normal
GIT_SYNC_URL: "https://$GITHUB_USERNAME_ROBOT:$GITHUB_TOKEN_ROBOT@github.com/NoFussComputing/gitlab-ci.git"
MY_PROJECT_ID: "28543717"
LICENSE_FINDER_CLI_OPTS: '--recursive'
MDLINT_PATHS: "**/*.md **/**/*.md **/**/**/*.md **/**/**/**/*.md **/**/**/**/**/**/*.md #**CHANGELOG.md #CHANGELOG.md #website-template/** #.gitlab/**"
PAGES_ENVIRONMENT_PATH: projects/gitlab-ci/

# Scanner doesn't Pickup multiple pip files. Disable and specify jobs with pip file.
gemnasium-python-dependency_scanning:
rules:
- when: never

# source: https://gitlab.com/gitlab-org/gitlab/-/blob/2f33a8cb4dcea7b875e360d4cd9e016e027d2973/lib/gitlab/ci/templates/Security/Dependency-Scanning.gitlab-ci.yml
.gemnasium-python-dependency_scanning:
extends: .ds-analyzer
image:
name: "$DS_ANALYZER_IMAGE"
variables:
# Python 3.7 not available
# DS_PYTHON_VERSION: "3.7"
# DS_ANALYZER_IMAGE is an undocumented variable used internally to allow QA to
# override the analyzer image with a custom value. This may be subject to change or
# breakage across GitLab releases.
DS_ANALYZER_IMAGE: "$SECURE_ANALYZERS_PREFIX/gemnasium-python:$DS_MAJOR_VERSION"
# Stop reporting Pipenv and Setuptools as "pip".
# See https://gitlab.com/gitlab-org/gitlab/-/issues/338252
DS_REPORT_PACKAGE_MANAGER_PIP_WHEN_PYTHON: "false"
# Can't find pillow 9.0, check python version. 3.6 only available, 3.7 not.
before_script:
- python --version
# Bug reported at gitlab-org/gitlab#350949.
# workaround, delete all other pip files except the one to be scanned
# Delete all existing pipfiles except the one to be scanned.
- for found_file in $(find . -type f -name 'requirements.txt'); do if [ $found_file != "./$PIP_REQUIREMENTS_FILE" ]; then echo "[DEBUG] Removing '$found_file' due to bug reported at gitlab-org/gitlab#350949"; rm -f $found_file; fi done;
rules:
- if: $DEPENDENCY_SCANNING_DISABLED
when: never
# Support passing of $PIP_REQUIREMENTS_FILE
# See https://docs.gitlab.com/ee/user/application_security/dependency_scanning/#configuring-specific-analyzers-used-by-dependency-scanning
- if: $CI_COMMIT_BRANCH &&
$GITLAB_FEATURES =~ /\bdependency_scanning\b/ &&
$DS_DEFAULT_ANALYZERS =~ /gemnasium-python/ &&
$PIP_REQUIREMENTS_FILE &&
( $CI_PIPELINE_SOURCE == "push" || $CI_PIPELINE_SOURCE == "pipeline")

Ansible Dependencies:
extends: .gemnasium-python-dependency_scanning
variables:
PIP_REQUIREMENTS_FILE: ansible/requirements.txt


conventional_commits Dependencies:
extends: .gemnasium-python-dependency_scanning
variables:
PIP_REQUIREMENTS_FILE: conventional_commits/requirements.txt


gitlab_release Dependencies:
extends: .gemnasium-python-dependency_scanning
variables:
PIP_REQUIREMENTS_FILE: gitlab_release/requirements.txt


mkdocs Dependencies:
extends: .gemnasium-python-dependency_scanning
variables:
PIP_REQUIREMENTS_FILE: mkdocs/requirements.txt


python Dependencies:
extends: .gemnasium-python-dependency_scanning
variables:
PIP_REQUIREMENTS_FILE: python/requirements.txt


yaml_lint Dependencies:
extends: .gemnasium-python-dependency_scanning
variables:
PIP_REQUIREMENTS_FILE: lint/requirements.txt


PyLint:
extends:
- .PyLint
image: python:3.6-slim


gilab-ci.yml Lint (python 3.11):
extends:
- .Gitlab_CI.Lint.YAML
image: python:3.11-slim


Update Sub Repo:
extends: .submodule_update_trigger
parallel:
matrix:
- SUBMODULE_UPDATE_TRIGGER_PROJECT: nofusscomputing/ops
- SUBMODULE_UPDATE_TRIGGER_PROJECT: nofusscomputing/infrastructure/configuration-management/itil_runbooks
- SUBMODULE_UPDATE_TRIGGER_PROJECT: nofusscomputing/infrastructure/website
- SUBMODULE_UPDATE_TRIGGER_PROJECT: nofusscomputing/projects/ansible/ansible_playbooks
- SUBMODULE_UPDATE_TRIGGER_PROJECT: nofusscomputing/projects/ansible/ansible-roles
- SUBMODULE_UPDATE_TRIGGER_PROJECT: nofusscomputing/projects/ansible/ansible_docker_os
- SUBMODULE_UPDATE_TRIGGER_PROJECT: nofusscomputing/projects/ansible/ansible_test
- SUBMODULE_UPDATE_TRIGGER_PROJECT: nofusscomputing/projects/ansible/collections/ci-test
- SUBMODULE_UPDATE_TRIGGER_PROJECT: nofusscomputing/projects/ansible/collections/firewall
- SUBMODULE_UPDATE_TRIGGER_PROJECT: nofusscomputing/projects/ansible/collections/kubernetes
- SUBMODULE_UPDATE_TRIGGER_PROJECT: nofusscomputing/projects/ansible/collections/phpipam_scan_agent
- SUBMODULE_UPDATE_TRIGGER_PROJECT: nofusscomputing/projects/ansible/common
- SUBMODULE_UPDATE_TRIGGER_PROJECT: nofusscomputing/projects/ansible/docker_management
- SUBMODULE_UPDATE_TRIGGER_PROJECT: nofusscomputing/projects/ansible/execution_environment
- SUBMODULE_UPDATE_TRIGGER_PROJECT: nofusscomputing/projects/ansible/git_configuration
- SUBMODULE_UPDATE_TRIGGER_PROJECT: nofusscomputing/projects/ansible/homeassistant
- SUBMODULE_UPDATE_TRIGGER_PROJECT: nofusscomputing/projects/ansible/nfc_glpi
- SUBMODULE_UPDATE_TRIGGER_PROJECT: nofusscomputing/projects/docker-bind
- SUBMODULE_UPDATE_TRIGGER_PROJECT: nofusscomputing/projects/docker-mail
- SUBMODULE_UPDATE_TRIGGER_PROJECT: nofusscomputing/projects/docker-buildx-qemu
- SUBMODULE_UPDATE_TRIGGER_PROJECT: nofusscomputing/projects/docker-glpi
- SUBMODULE_UPDATE_TRIGGER_PROJECT: nofusscomputing/projects/kubernetes_monitoring
16 changes: 16 additions & 0 deletions gitlab-ci/.gitlab-ci_common.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
variables:
JOB_ROOT_DIR: 'gitlab-ci'
GIT_SUBMODULE_STRATEGY: normal
#PIPELINE_RUN_TRIGGER: 'false'
PIPELINE_RUN_SCHEDULE: 'true'

stages:
- chores
- validation
- build
- prepare
- test
- release
- sync
- deploy
- publish
Empty file added gitlab-ci/.gitlab/.gitkeep
Empty file.
Empty file.
Loading
Loading