Wiki replacement and CI update (#86)

* dhcp uses on, not true (because iocage syntax)

* Documentation updates

* Add gh-pages wiki generator using mkdocs

* Update shellcheck.yml

* Update wiki.yml

* Add filecheck

* readme case correction1

* readme case correction2

* Update filecheck.yml
This commit is contained in:
Kjeld Schouten-Lebbing 2020-04-26 16:00:47 +02:00 committed by GitHub
parent c32ea280da
commit 2c75cfe0ea
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
26 changed files with 239 additions and 21 deletions

21
.github/workflows/filecheck.yml vendored Normal file
View File

@ -0,0 +1,21 @@
name: File Presence QC
on:
pull_request:
branches:
- master
- dev
jobs:
build:
name: Check Files
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: check existance
run: |
for pathname in jails/*; do test -e $pathname/readme.md || { echo "File missing: $pathname/readme.md"; error="true"; }; done
for pathname in jails/*; do test -e $pathname/install.sh || { echo "File missing: $pathname/install.sh"; error="true"; }; done
for pathname in jails/*; do test -e $pathname/update.sh || { echo "File missing: $pathname/update.sh"; error="true"; }; done
for pathname in jails/*; do test -e $pathname/config.yml || { echo "File missing: $pathname/config.yml"; error="true"; }; done
if [ "${error}" == "true" ]; then echo "Missing files detected" && exit 1; fi
shell: bash

View File

@ -1,5 +1,5 @@
# This is a workflow to run shellcheck on all scripts
name: Shellcheck Workflow
name: Shell Linter QC
# Controls when the action will run. Triggers the workflow on push or pull request
# events but only for the master branch
@ -10,7 +10,7 @@ on:
- dev
jobs:
shellcheck:
Shellcheck:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1

26
.github/workflows/wiki.yml vendored Normal file
View File

@ -0,0 +1,26 @@
name: Publish docs via GitHub Pages
on:
push:
branches:
- master
jobs:
build:
name: Deploy docs
runs-on: ubuntu-latest
steps:
- name: Checkout master
uses: actions/checkout@v1
with:
ref: 'master'
- name: rename-readme
run: |
for pathname in jails/*/README.MD; do ! cp "$pathname" "docs/jails/$( basename "$( dirname "$pathname" )" ).md"; done
for pathname in jails/*/README.md; do ! cp "$pathname" "docs/jails/$( basename "$( dirname "$pathname" )" ).md"; done
for pathname in jails/*/readme.md; do ! cp "$pathname" "docs/jails/$( basename "$( dirname "$pathname" )" ).md"; done
for pathname in jails/*/Readme.md; do ! cp "$pathname" "docs/jails/$( basename "$( dirname "$pathname" )" ).md"; done
shell: bash
- name: Deploy docs
uses: mhausenblas/mkdocs-deploy-gh-pages@master
env:
GITHUB_TOKEN: ${{ secrets.WIKI_GH_PAT }}

90
docs/CONTRIBUTING.md Normal file
View File

@ -0,0 +1,90 @@
# Contribution and Review Guidelines
This project welcomes any and all input, but we need to have a few quality guidelines. These guidelines will be examplained here, in this document.
### GIT Guidelines
***
#### New to GIT
If you have never used git before, you can look up our general reference on our wiki.
#### Git and You
GIT is a fantastic system, but while using it we have a few guidelines to keep it fantastic for everyone.
* Submit complete PR's.
* Add [DNM] if you do not want your PR merged yet.
* Always try and fill in the whole form, even for small PR's.
* Don't close when a reviewer requests changes (just push the changes or ask for help).
* Explain what you did in your PR.
* Be thorough.
* If you can add screenshots to clarify.
* Always try to add "Fixes #000" (where 000 is the Issue your PR fixes)
* found something you want to fix yourself? Please do make an issue too.
### Structure Guidelines
***
#### Naming scheme
File and folder names are important and making mistakes in them may give conflicts an/or annoyance in the future. Remember, your garbage needs to be cleaned by someone sometime in the future! For that reason, we have a few guidelines in regards to naming files and folder.
* Always start files and folders WITHOUT a Capital.
#### Inclusion of files and folders
Although GIT is quite friendly in what it accepts in terms of files and folder changes in a commit, a reviewer's or bugfixer's time is not unlimited. For that reason, we have a few specific guidelines in regards to the inclusion of files and folders in your PR.
* Only include files you actually changed.
* Try not to include multiple changes in one PR
* Want to change the formatting of multiple files too? Make a separate PR.
*Always include the following files when creating a new jail*
- install.sh
- update.sh
- readme.md
- config.yml
### Code Guidelines
***
#### Your code, your style, my review
Here at jailman, we value people having their own style. But your code needs to be reviewable and editable by others too. For that reason, we have a few basic coding guidelines
* **Always** explain regex in a comment within your code.
* Write simple code and don't try to impress.
* We will run (Basic) automated reformating of code once in a while.
* Document your changes in your code and if need be, on the wiki.
* All PR's should be able to pass our automated shellcheck.
* It's okey to add shellcheck ignores, but only AFTER you checked the warning!
#### jail requirements
- Jails should always save user-specific data in a persistant location. Which is the location specified in the config.yml file under "config:", which is automatically mounted to every jail under /config. There should be no user specific data in the jail itself
- Jails should not require the user to edit any config file themselves. All config changes should be automated
- Jails should not use default passwords, the user should always be forced(!) to put credentials in config.yml manually
### Review Guidelines
***
Even us review gods need some guidelines once in a while.
* Let people learn from their mistakes
* Review instead of merging without comments
* Abide by these guidelines in your review
* Tests exist for a reason. Don't merge with test-failures
### Todo vs Feature vs bug:
***
Please take note of the difference between a TODO and Feature
* Bug: An unexpected behavior of the script or a crash. Including, but not limited to, errors and warnings.
* Todo: When you come across something that needs tweaking/adding during development, is not an unexpected behavior
* Feature: When you, out of personal preference, want something added or changed.
### That's it!
***
Someone will come along and review the changes. If everything looks good then they will merge it with the main repo. If you need any help don't be afraid to ask in the discord channel: [https://discord.gg/tFcTpBp](https://discord.gg/tFcTpBp)

13
docs/ISSUE_TEMPLATE.md Normal file
View File

@ -0,0 +1,13 @@
# Issue Template
## Description
### Detailed Bug Report
It helps if you include any relevant code / config (for describing how new features should work), images, gifs, or youtube videos!
### Steps to Reproduce
Please enter the steps to reproduce the bug or behaviour:
1.
2.
3.

View File

@ -0,0 +1,16 @@
# Pull Request Template
### Purpose
_Describe the problem the PR fixes or the feature it introduces_<br>
_Don't forget to use "Fixes #issuenumber" to select issues and auto close them on merge_
### Notes:
_Please enter any other relevant information here_
### Please make sure you have followed the self checks below before submitting a PR:
- [ ] Code is sufficiently commented
- [ ] Code is indented with tabs and not spaces
- [ ] The PR does not bring up any new errors
- [ ] The PR has been tested
- [ ] Any new files are named using lowercase (to avoid issues on case sensitive file systems)

View File

@ -5,7 +5,7 @@
---
[![GitHub last commit](https://img.shields.io/github/last-commit/ornias1993/jailman/dev.svg)](https://github.com/ornias1993/jailman/commits/dev) [![Krihelimeter](http://www.krihelinator.xyz/badge/ornias1993/jailman)](http://www.krihelinator.xyz/repositories/ornias1993/jailman) [![GitHub Release](https://img.shields.io/github/release/ornias1993/jailman.svg)](https://github.com/ornias1993/jailman/releases/latest) [![License: GPL v2](https://img.shields.io/badge/License-GPL%20v2-blue.svg)](https://github.com/ornias1993/jailman/blob/master/docs/LICENSE.GPLV2) [![License](https://img.shields.io/badge/License-BSD%202--Clause-orange.svg)](https://github.com/ornias1993/jailman/blob/master/docs/LICENSE.BSD2)
[![GitHub last commit](https://img.shields.io/github/last-commit/ornias1993/jailman/dev.svg)](https://github.com/ornias1993/jailman/commits/dev) [![GitHub Release](https://img.shields.io/github/release/ornias1993/jailman.svg)](https://github.com/ornias1993/jailman/releases/latest) [![License: GPL v2](https://img.shields.io/badge/License-GPL%20v2-blue.svg)](https://github.com/ornias1993/jailman/blob/master/docs/LICENSE.GPLV2) [![License](https://img.shields.io/badge/License-BSD%202--Clause-orange.svg)](https://github.com/ornias1993/jailman/blob/master/docs/LICENSE.BSD2)
## Intro

View File

@ -35,10 +35,14 @@ Some datasets are auto created and can not be changed from the config file. This
## General config options
### Networking
Please be aware that dhcp is not actively supported, many of the jails depend on having a fixed IP-adress in the config file.
Some also depend on other jails having a fixed IP in the config file. Use of DHCP is on your own risk and might not work.
- ip4_addr: To set a static IP (recommended), enter the desired ip address here. Leave blank (or remove the line) for DHCP.
- gateway: Set the gateway IP for static IP setup. Leave blank (or remove the line) for DHCP.
- gateway: Set the gateway IP for static IP setup. Leave blank (or remove the line) for DHCP.
### Advanced
- interfaces: Set the "interfaces" flag for iocage. Example: `vnet0:bridge0` (optional)
- dhcp: Set to force DHCP (not required for DHCP, see above)
- pkgs: Override the to-be-install packages for this jail (might break now or break updates)
- dhcp: Set to "on" to force DHCP (not required for DHCP, see above)
- pkgs: Override the to-be-install packages for this jail (might break now or break updates)

5
docs/index.md Normal file
View File

@ -0,0 +1,5 @@
# Introduction
Welcome to Jailam. An open source effort to create an easy management tool for Freenas Jails.
As this project is in its early stages, this wiki will serve the purpose of providing a foundation and a almost (not) up-to-date scripting reference to the underlying structure of jailman.

1
docs/jails/jails.md Normal file
View File

@ -0,0 +1 @@
test

1
docs/test.md Normal file
View File

@ -0,0 +1 @@
3

View File

@ -1,4 +1,7 @@
# Original README from the Bitwarden_rs github:
# Bitwarden_RS
## Original README from the Bitwarden_rs github:
https://github.com/dani-garcia/bitwarden_rs

View File

@ -1,4 +1,6 @@
# Original README from the influxdb github:
# InfluxDB
## Original README from the influxdb github:
https://github.com/influxdata/influxdb

View File

@ -1,5 +1,6 @@
# Py-KMS
# Original README from the py-kms github:
## Original README from the py-kms github:
https://github.com/SystemRage/py-kms

View File

@ -1,4 +1,6 @@
# Original README from the lidarr github:
# Lidarr
## Original README from the lidarr github:
https://github.com/lidarr/Lidarr

View File

@ -1,4 +1,6 @@
# Original README from the mariadb github:
# MariaDB
## Original README from the mariadb github:
https://github.com/MariaDB/server/

View File

@ -1,4 +1,6 @@
# Original README from the Upstream Nextcloud-iocage install script:
# Nextcloud
## Original README from the Upstream Nextcloud-iocage install script:
https://github.com/danb35/freenas-iocage-nextcloud

View File

@ -1,4 +1,6 @@
# Original README from the Organizr github repo:
# Organizr
## Original README from the Organizr github repo:
https://github.com/causefx/Organizr

View File

@ -1,4 +1,6 @@
# Original README from the radarr github:
# Radarr
## Original README from the radarr github:
https://github.com/Radarr/Radarr

View File

@ -1,4 +1,6 @@
# Original README from the sonarr github:
# Sonarr
## Original README from the sonarr github:
https://github.com/Sonarr/Sonarr

View File

@ -1,4 +1,6 @@
# Original README from the tautulli github:
# Tautulli
## Original README from the tautulli github:
https://github.com/Tautulli/Tautulli

View File

@ -1,4 +1,6 @@
# Original README from the transmission github:
# Transmission
## Original README from the transmission github:
https://github.com/transmission/transmission

23
mkdocs.yml Normal file
View File

@ -0,0 +1,23 @@
# Project Information
site_name: JailMan
site_description: 'Project Design and Documentation for development'
site_author: 'Ornias1993'
site_url: 'https://ornias1993.github.io/jailman/'
# Repository
repo_name: 'ornias1993/jailman'
repo_url: 'https://github.com/Ornias1993/jailman/'
edit_uri: 'edit/dev/docs/'
theme:
name: 'material'
features:
- tabs
language: 'en'
markdown_extensions:
- admonition
- codehilite:
guess_lang: false
- toc:
permalink: true

View File

@ -1,3 +0,0 @@
Welcome to the jailman wiki!
This wiki is automatically generated from the .md files located in either the /wiki or the /jails// directories.

View File

@ -1 +0,0 @@
wiki test placeholder