777 on new scripts (+2 squashed commit)

Squashed commit:

[9ae7dd0f] add helm-docs to workflow

[2206f5ba] fix small typo in workflows (+1 squashed commits)

Squashed commits:

[29c2ceb4] Documentation-Cleanup (#181)

* work on readme generation

* document windows setup

* add simple pre-commit install script

* more docs for git setup

* Update pre-commit

* pre-commit automatic fixes

* Increase all patch versions

* Auto Readme and Config doc

* Auto app-readme.md generation

* increase common and common-test versions accordingly (due to cleanup)

* move contribution guidelines to /development in wiki

* fix some end-of-line issues (again)

* fix line 14 of workflows
This commit is contained in:
Kjeld Schouten-Lebbing
2021-02-23 18:21:54 +01:00
committed by kjeld Schouten-Lebbing
parent 94a6d6f9e1
commit 1d51be0e3d
674 changed files with 6631 additions and 1813 deletions

View File

@@ -5,8 +5,8 @@
In the interest of fostering an open and welcoming environment, we as
contributors and maintainers pledge to making participation in our project and
our community a harassment-free experience for everyone, regardless of age, body
size, disability, ethnicity, sex characteristics, gender, level of experience,
education, socio-economic status, nationality, personal appearance, race,
size, disability, ethnicity, sex characteristics, gender, level of experience,
education, socio-economic status, nationality, personal appearance, race,
religion, or sexual identity and orientation.
## Our Standards

View File

@@ -1,4 +1,4 @@
# Contribution and Review Guidelines
# Contribution 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.
@@ -6,11 +6,11 @@ This project welcomes any and all input, but we need to have a few quality guide
***
#### New to GIT
If you have never used git before, you can look up our general reference on our wiki.
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.
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.

2
.github/README.md vendored
View File

@@ -29,7 +29,7 @@ A: Please file an issue about it, after checking the wiki to make sure it hasn't
https://github.com/truecharts/truecharts/wiki/k8s-at-home-to-SCALE-App-migration-list
- Q: Isn't there more documentation for app x<br>
A: If it's not on our [wiki](https://wiki.truecharts.org), we do not. Currently during TrueNAS SCALE ALPHA/BETA we focus on the technical aspects.
A: If it's not on our [wiki](https://wiki.truecharts.org), we do not. Currently during TrueNAS SCALE ALPHA/BETA we focus on the technical aspects.
- Q: Function x doesn't seem to be working, should it be working?<br>
A: Maybe, please file an issue

1
.github/SECURITY.md vendored
View File

@@ -13,4 +13,3 @@ If you find any security issue, please email the project maintainer.
Currently the Project Maintainer is:
[Ornias1993](https://github.com/Ornias1993)

39
.github/docs/development/setting-up.md vendored Normal file
View File

@@ -0,0 +1,39 @@
# Setting up your dev environment
With TrueCharts we use some custom tools to make sure you have the least amount of work possible when working on the project.
However, this means you need some custom tools before you can start working on TrueCharts:
- Git (git client optional)
- Python (including Pip, added to path on windows)
- Pre-Commit (prefered)
## Windows
### Terminal basics:
When we talk about "In a terminal" we mean doing the following:
- hit windows+r
- enter "cmd"
### GIT
- Download and install GIT (https://git-scm.com/download/win)
- Most default options would be fine
In a terminal window or GUI client:
- Clone the repository in a specific directory of your choice (we will call this "Project-Root")
### Python
- Install Python3 with the installer (https://www.python.org/downloads/)
- Right click "Run as administrator"
- Check "Add to Path"
- Click the big install button
### Pre-Commit
Run .tools/pre-commit-install.bat
(Advanced users: This is for beginner users and will also execute "git config --unset-all core.hooksPath")
OR
In a terminal window:
- Enter "pip install pre-commit"
- CD to Project-Root
- Enter "pre-commit install"

View File

@@ -43,7 +43,7 @@ jobs:
run: ct lint --config .github/ct.yaml --charts 'library/common'
- name: Create kind cluster
uses: helm/kind-action@v1.1.0
common-unittest:
runs-on: ubuntu-latest
needs: common-lint
@@ -72,7 +72,7 @@ jobs:
bundle install
- name: Run tests
run: |
bundle exec m -r .test/charts
bundle exec m -r .tools/tests/charts
chart-tests:
@@ -100,4 +100,4 @@ jobs:
sudo pip3 install -U catalog_validation/.
- name: Validate changed charts
run: /bin/bash -c "PWD=${pwd}; sudo /usr/local/bin/charts_validate deploy --path $PWD"
run: /bin/bash -c "PWD=${pwd}; sudo /usr/local/bin/charts_validate deploy --path $PWD"

View File

@@ -3,56 +3,26 @@ name: "Charts: Release"
on:
push:
branches:
- master
- charts
tags-ignore:
- '**'
paths:
- 'charts/**'
- '!charts/**/*.md'
- '!charts/**/README.md'
- '!charts/**/README.md.gotmpl'
- '!charts/**/app-readme.md'
- '!charts/**/app-readme.md.gotmpl'
- '!charts/**/docs/*'
- 'library/**'
- '!library/**/*.md'
- '!library/**/README.md'
- '!library/**/README.md.gotmpl'
- '!library/**/app-readme.md'
- '!library/**/app-readme.md.gotmpl'
- '!library/**/docs/*'
jobs:
copy:
runs-on: ubuntu-latest
steps:
- name: Checkout-Master
uses: actions/checkout@v2
with:
ref: 'master'
path: 'master'
- name: Checkout-Charts
uses: actions/checkout@v2
with:
ref: 'charts'
path: 'charts'
- name: Generate Helm Structure
run: |
cd master
rm -Rf ../charts/charts/*
for chart in charts/*; do
if [ -d "${chart}" ]; then
maxversion=$(ls -l ${chart} | grep ^d | awk '{print $9}' | tail -n 1)
chartname=$(basename ${chart})
echo "Processing ${chart} version ${maxversion}"
mv ${chart}/${maxversion} ../charts/charts/${chartname}
rm ../charts/charts/${chartname}/Chart.lock || echo "chart.lock missing for ${chartname}, continuing..."
fi
done
mv library/* ../charts/charts/
ls ../charts/charts/
cd ..
- name: Commit and push updated charts
run: |
cd charts
git config user.name "$GITHUB_ACTOR"
git config user.email "$GITHUB_ACTOR@users.noreply.github.com"
git add --all
git commit -sm "Publish Chart updates" || exit 0
git push
pre-release:
needs: copy
runs-on: ubuntu-latest
@@ -79,7 +49,6 @@ jobs:
- name: Checkout
uses: actions/checkout@v2
with:
ref: 'charts'
fetch-depth: 0
- name: Configure Git
@@ -97,7 +66,7 @@ jobs:
charts_repo_url: https://charts.truecharts.org/
env:
CR_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
# Update the generated timestamp in the index.yaml
# needed until https://github.com/helm/chart-releaser/issues/90
# or helm/chart-releaser-action supports this

View File

@@ -16,7 +16,7 @@ jobs:
uses: actions/checkout@v2
with:
token: ${{ secrets.RENOVPUSH }}
- name: Configure Git
run: |
git config user.name "$GITHUB_ACTOR"

View File

@@ -0,0 +1,64 @@
name: "Charts: Release"
on:
push:
branches:
- master
tags-ignore:
- '**'
paths:
- 'charts/**'
- '!charts/**/*.md'
- '!charts/**/README.md'
- '!charts/**/README.md.gotmpl'
- '!charts/**/app-readme.md'
- '!charts/**/app-readme.md.gotmpl'
- '!charts/**/docs/*'
- 'library/**'
- '!library/**/*.md'
- '!library/**/README.md'
- '!library/**/README.md.gotmpl'
- '!library/**/app-readme.md'
- '!library/**/app-readme.md.gotmpl'
- '!library/**/docs/*'
jobs:
copy:
runs-on: ubuntu-latest
steps:
- name: Checkout-Master
uses: actions/checkout@v2
with:
ref: 'master'
path: 'master'
- name: Checkout-Charts
uses: actions/checkout@v2
with:
ref: 'charts'
path: 'charts'
- name: Generate Helm Structure
run: |
cd master
rm -Rf ../charts/charts/*
for chart in charts/*; do
if [ -d "${chart}" ]; then
maxversion=$(ls -l ${chart} | grep ^d | awk '{print $9}' | tail -n 1)
chartname=$(basename ${chart})
echo "Processing ${chart} version ${maxversion}"
mv ${chart}/${maxversion} ../charts/charts/${chartname}
rm ../charts/charts/${chartname}/Chart.lock || echo "chart.lock missing for ${chartname}, continuing..."
fi
done
mv library/* ../charts/charts/
ls ../charts/charts/
cd ..
- name: Commit and push updated charts
run: |
cd charts
git config user.name "$GITHUB_ACTOR"
git config user.email "$GITHUB_ACTOR@users.noreply.github.com"
git add --all
git commit -sm "Publish Chart updates" || exit 0
git push

View File

@@ -28,24 +28,37 @@ jobs:
repository: 'truecharts/wiki'
path: 'wiki'
token: ${{ secrets.RENOVPUSH }}
- name: install helm-docs
run: |
brew install norwoodj/tap/helm-docs
- name: (re)generate docs
run: |
cd master
.tools/gen-helm-docs.sh
cd ..
- name: Clean-Wiki
run: |
rm -Rf wiki/content
mkdir -p wiki/content
mkdir -p wiki/content/development
cp -f wiki/CNAME wiki/content/CNAME
- name: Create general wiki
run: |
cd master
# for doc in docs/*; do
# if [ -d "${doc}" ]; then
# docname=$(basename ${doc})
# cp -Rf docs/${docname} ../wiki/content/
# fi
# done
for doc in .github/docs/*; do
if [ -d "${doc}" ]; then
docname=$(basename ${doc})
cp -Rf ${doc} ../wiki/content/
fi
done
cp .github/README.md ../wiki/content/index.md || echo "readme copy failed, continuing..."
cp .github/CODE_OF_CONDUCT ../wiki/content/code_of_conduct.md || echo "CODE_OF_CONDUCT copy failed, continuing..."
cp .github/CONTRIBUTING ../wiki/content/contributing.md || echo "CONTRIBUTING copy failed, continuing..."
cp .github/CONTRIBUTING ../wiki/content/development/contributing.md || echo "CONTRIBUTING copy failed, continuing..."
ls ../wiki/content/
cd ..
@@ -65,7 +78,7 @@ jobs:
ls ../wiki/content/apps/
cd ..
- name: Commit and push updated charts
- name: Commit and push updated wiki
run: |
cd wiki
git config user.name "$GITHUB_ACTOR"
@@ -73,3 +86,13 @@ jobs:
git add --all
git commit -sm "Publish general wiki updates" || exit 0
git push
cd ..
- name: Commit and push updated charts
run: |
cd master
git config user.name "$GITHUB_ACTOR"
git config user.email "$GITHUB_ACTOR@users.noreply.github.com"
git add --all
git commit -sm "Publish docs updates" || exit 0
git push