This repository is a BASH Github action composite created with that Documentation The goal of that custom action is to check and publish a list of helm chart to a chartMuseum repository
Call use ( for @version please refer to release list)
- uses: cheerz/composite-helm-private-manager@v1.0.0Inputs :
with:
chart-paths: <SPACE_SEPARATED_LIST_OF_HELM_CHART_PATH>
chart-status: <CREATED||UPDATED||DELETED>
chart-repository-url: <URL_OF_YOUR_CHART_REPOSITORY>For chart-paths the script will always search for Chart.yml or Chart.yaml file ( case sensible )
charts-management:
needs: prepare
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- uses: cheerz/composite-helm-private-manager@dev
with:
chart-paths: "charts/web-application/Chart.yaml charts/worker-application/Chart.yml"
chart-status: "created"
chart-repository-url: "https://charts.exemple.net"name: Apply all basic config for kubernetes
jobs:
prepare:
runs-on: ubuntu-latest
outputs:
modified_chart_list: ${{ steps.updated_Charts.outputs.find-charts }}
steps:
- uses: actions/checkout@master
- uses: jitterbit/get-changed-files@v1
id: changed_files
- name: search_updated_chart
id: updated_Charts
run: |
files="${{ steps.changed_files.outputs.modified }}"
findCharts=()
for chart in $files; do
if [[ $chart == *"/Chart.yaml"* ]] || [[ $chart == *"/Chart.yml"* ]]; then
findCharts+=( "$chart" )
fi
done
echo "::set-output name=find-charts::$(echo $findCharts)"
charts-management:
needs: prepare
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- uses: cheerz/composite-helm-private-manager@dev
with:
chart-paths: "${{ needs.prepare.outputs.modified_chart_list }}"
chart-status: "updated"
chart-repository-url: "https://charts.exemple.net"So some important points :
- The application is split in two job because you can reproduce and multiply composite for deleted and added charts
- I use jitterbit get-changed-filesit work very well
- The step
updated_Chartsis bash scripts who search specific updated file to created a compliant list (I think I will try to ehance that part) - we get the prepared list from ouput mechanism with
"${{ needs.prepare.outputs.modified_chart_list }}" - Don't forget to change
chart-repository-url
Release management on that project is simple
If you push on master, a release will be created under the dev tag
- uses: cheerz/composite-helm-private-manager@devIf you add and push a tag on format vx.x.x it will create a release from that tag
Exemple:
git tag -a v1.17.2
git push --tags - uses: cheerz/composite-helm-private-manager@v1.17.2- Implement delete function ( not working for now )
- Fault toleration ( for now the script stop if something go wrong with one value )
- Improve
updated_Chartsstep to remove bash ( or hide it somewhere else maybe )
The scripts and documentation in this project are released under the MIT License