-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from PSNAppz/develop
Example Bank Helm Charts
- Loading branch information
Showing
37 changed files
with
2,073 additions
and
0 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 |
---|---|---|
@@ -0,0 +1,11 @@ | ||
# Configuration for known file extensions | ||
[*.{css,js,json,less,md,py,rst,sass,scss,xml,yaml,yml}] | ||
charset = utf-8 | ||
end_of_line = lf | ||
indent_size = 4 | ||
indent_style = space | ||
insert_final_newline = true | ||
trim_trailing_whitespace = true | ||
|
||
[*.{yml,yaml,rst,md}] | ||
indent_size = 2 |
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,23 @@ | ||
name: pre-commit | ||
|
||
on: | ||
pull_request: | ||
push: | ||
branches: | ||
- "**" | ||
tags-ignore: | ||
- '**' | ||
workflow_dispatch: | ||
|
||
jobs: | ||
pre-commit: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/setup-python@v3 | ||
- uses: actions/setup-node@v4 | ||
with: | ||
node-version: 18 | ||
- uses: pre-commit/[email protected] | ||
with: | ||
extra_args: --all-files --show-diff-on-failure |
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,114 @@ | ||
name: Publish OpenG2P Helm charts on | ||
|
||
on: | ||
push: | ||
tags-ignore: | ||
- '**' | ||
branches: | ||
- 1.* | ||
- develop | ||
- main | ||
workflow_dispatch: | ||
|
||
|
||
jobs: | ||
generate-charts: | ||
runs-on: ubuntu-latest | ||
env: | ||
SKIP: 'FALSE' | ||
RANCHER_CHART_FILTER: "openg2p.org/add-to-rancher" | ||
defaults: | ||
run: | ||
shell: bash | ||
steps: | ||
- name: Checkout Repository | ||
uses: actions/checkout@v3 | ||
|
||
- id: files | ||
uses: jitterbit/get-changed-files@v1 | ||
|
||
- name: save helm/charts to tmp.txt file | ||
run: | | ||
touch charts-list.txt | ||
for changed_file in ${{ steps.files.outputs.all }}; do | ||
if [[ ${changed_file} =~ ^charts ]]; then | ||
chart_name=$(echo "${changed_file}" | awk -F/ '/^[charts]/{print $2}') | ||
echo $chart_name >> charts-list.txt; | ||
echo "Saved $chart_name chart to charts-list.txt" | ||
fi | ||
done | ||
cat charts-list.txt | sort | uniq > charts-list-unique.txt | ||
mv charts-list-unique.txt charts-list.txt | ||
echo "List of charts to be published"; | ||
cat charts-list.txt | ||
- name: Generate tar files | ||
run: | | ||
if [[ ! -s charts-list.txt ]]; then | ||
echo "::warning::No Charts to publish"; | ||
echo "SKIP=TRUE" >> $GITHUB_ENV | ||
else | ||
RANCHER_CHARTS=() | ||
while IFS= read -r chartpath; do | ||
echo "chartpath: $chartpath" | ||
chartname=$(basename "$chartpath") | ||
echo "Chartname: $chartname" | ||
helm dep up charts/$chartpath | ||
helm package charts/$chartpath | ||
is_rancher_chart=$(grep "$RANCHER_CHART_FILTER" charts/${chartpath%*/}/Chart.yaml || true) | ||
if [ -n "$is_rancher_chart" ]; then | ||
RANCHER_CHARTS+=("$chartname") | ||
fi | ||
done < charts-list.txt | ||
echo "RANCHER_CHARTS=${RANCHER_CHARTS[@]}" >> $GITHUB_ENV | ||
rm charts-list.txt | ||
fi | ||
shopt -s nocasematch | ||
if [[ '${{ github.repository_owner }}' != 'OpenG2P' ]]; then | ||
echo "SKIP=TRUE" >> $GITHUB_ENV | ||
fi | ||
- name: Upload tar as Artifact | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: charts | ||
path: ./*.tgz | ||
if: env.SKIP != 'TRUE' | ||
|
||
- name: Checkout branch for publishing | ||
uses: actions/checkout@v3 | ||
with: | ||
repository: 'openg2p/openg2p-helm' | ||
ref: gh-pages | ||
token: ${{ secrets.OPENG2P_BOT_GITHUB_PAT }} | ||
if: env.SKIP != 'TRUE' | ||
|
||
- name: Download tar from Artifacts | ||
uses: actions/download-artifact@v2 | ||
with: | ||
name: charts | ||
path: ./ | ||
if: env.SKIP != 'TRUE' | ||
|
||
- name: Update index.yaml | ||
run: | | ||
helm repo index --url https://openg2p.github.io/openg2p-helm/ . | ||
for chartname in $RANCHER_CHARTS; do | ||
cp ${chartname}*.tgz rancher/ | ||
done | ||
helm repo index --url https://openg2p.github.io/openg2p-helm/ --merge rancher/index.yaml rancher | ||
for chartname in $RANCHER_CHARTS; do | ||
rm rancher/${chartname}*.tgz || true | ||
done | ||
if: env.SKIP != 'TRUE' | ||
|
||
- name: Commit Changes to repository | ||
uses: EndBug/add-and-commit@v7 | ||
with: | ||
branch: gh-pages | ||
author_name: openg2pbot | ||
author_email: [email protected] | ||
default_author: user_info | ||
message: 'added spar helm charts for publish openg2p/openg2p-spar-deployment@${{ github.sha }}' | ||
add: './*.tgz ./index.yaml rancher/index.yaml' | ||
if: env.SKIP != 'TRUE' |
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,200 @@ | ||
# Byte-compiled / optimized / DLL files | ||
__pycache__/ | ||
*.py[cod] | ||
*$py.class | ||
|
||
# C extensions | ||
*.so | ||
|
||
# Distribution / packaging | ||
.Python | ||
build/ | ||
develop-eggs/ | ||
dist/ | ||
downloads/ | ||
eggs/ | ||
.eggs/ | ||
lib/ | ||
lib64/ | ||
parts/ | ||
sdist/ | ||
var/ | ||
wheels/ | ||
share/python-wheels/ | ||
*.egg-info/ | ||
.installed.cfg | ||
*.egg | ||
MANIFEST | ||
|
||
# PyInstaller | ||
# Usually these files are written by a python script from a template | ||
# before PyInstaller builds the exe, so as to inject date/other infos into it. | ||
*.manifest | ||
*.spec | ||
|
||
# Installer logs | ||
pip-log.txt | ||
pip-delete-this-directory.txt | ||
|
||
# Unit test / coverage reports | ||
htmlcov/ | ||
.tox/ | ||
.nox/ | ||
.coverage | ||
.coverage.* | ||
.cache | ||
nosetests.xml | ||
coverage.xml | ||
*.cover | ||
*.py,cover | ||
.hypothesis/ | ||
.pytest_cache/ | ||
cover/ | ||
|
||
# Translations | ||
*.mo | ||
*.pot | ||
|
||
# Django stuff: | ||
*.log | ||
local_settings.py | ||
db.sqlite3 | ||
db.sqlite3-journal | ||
|
||
# Flask stuff: | ||
instance/ | ||
.webassets-cache | ||
|
||
# Scrapy stuff: | ||
.scrapy | ||
|
||
# Sphinx documentation | ||
docs/_build/ | ||
|
||
# PyBuilder | ||
.pybuilder/ | ||
target/ | ||
|
||
# Jupyter Notebook | ||
.ipynb_checkpoints | ||
|
||
# IPython | ||
profile_default/ | ||
ipython_config.py | ||
|
||
# pyenv | ||
# For a library or package, you might want to ignore these files since the code is | ||
# intended to run in multiple environments; otherwise, check them in: | ||
# .python-version | ||
|
||
# pipenv | ||
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control. | ||
# However, in case of collaboration, if having platform-specific dependencies or dependencies | ||
# having no cross-platform support, pipenv may install dependencies that don't work, or not | ||
# install all needed dependencies. | ||
#Pipfile.lock | ||
|
||
# poetry | ||
# Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control. | ||
# This is especially recommended for binary packages to ensure reproducibility, and is more | ||
# commonly ignored for libraries. | ||
# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control | ||
#poetry.lock | ||
|
||
# pdm | ||
# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control. | ||
#pdm.lock | ||
# pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it | ||
# in version control. | ||
# https://pdm.fming.dev/latest/usage/project/#working-with-version-control | ||
.pdm.toml | ||
.pdm-python | ||
.pdm-build/ | ||
|
||
# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm | ||
__pypackages__/ | ||
|
||
# Celery stuff | ||
celerybeat-schedule | ||
celerybeat.pid | ||
|
||
# SageMath parsed files | ||
*.sage.py | ||
|
||
# Environments | ||
.env | ||
.venv | ||
env/ | ||
venv/ | ||
ENV/ | ||
env.bak/ | ||
venv.bak/ | ||
|
||
# Spyder project settings | ||
.spyderproject | ||
.spyproject | ||
|
||
# Rope project settings | ||
.ropeproject | ||
|
||
# mkdocs documentation | ||
/site | ||
|
||
# mypy | ||
.mypy_cache/ | ||
.dmypy.json | ||
dmypy.json | ||
|
||
# Pyre type checker | ||
.pyre/ | ||
|
||
# pytype static type analyzer | ||
.pytype/ | ||
|
||
# Cython debug symbols | ||
cython_debug/ | ||
|
||
# PyCharm | ||
# JetBrains specific template is maintained in a separate JetBrains.gitignore that can | ||
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore | ||
# and can be added to the global gitignore or merged into this file. For a more nuclear | ||
# option (not recommended) you can uncomment the following to ignore the entire idea folder. | ||
#.idea/ | ||
/.idea/ | ||
# General files for the project | ||
pkg/* | ||
*.pyc | ||
bin/* | ||
.project | ||
/.bin | ||
/_test/secrets/*.json | ||
|
||
# OSX leaves these everywhere on SMB shares | ||
._* | ||
|
||
# OSX trash | ||
.DS_Store | ||
|
||
# Files generated by JetBrains IDEs, e.g. IntelliJ IDEA | ||
.idea/ | ||
*.iml | ||
|
||
# Vscode files | ||
.vscode | ||
|
||
# Emacs save files | ||
*~ | ||
\#*\# | ||
.\#* | ||
|
||
# Vim-related files | ||
[._]*.s[a-w][a-z] | ||
[._]s[a-w][a-z] | ||
*.un~ | ||
Session.vim | ||
.netrwhist | ||
|
||
# Chart dependencies | ||
**/charts/*.tgz | ||
|
||
.history |
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,13 @@ | ||
repos: | ||
- repo: https://github.com/pre-commit/pre-commit-hooks | ||
rev: v4.0.1 | ||
hooks: | ||
- id: trailing-whitespace | ||
- id: end-of-file-fixer | ||
- id: check-case-conflict | ||
- id: check-executables-have-shebangs | ||
- id: check-merge-conflict | ||
- id: check-symlinks | ||
- id: check-xml | ||
- id: mixed-line-ending | ||
args: ["--fix=lf"] |
Oops, something went wrong.