Skip to content

Commit

Permalink
chore: update pipelines to work with new helm charts (#2228)
Browse files Browse the repository at this point in the history
  • Loading branch information
mowies committed Oct 5, 2023
1 parent 12b056d commit ddee725
Show file tree
Hide file tree
Showing 4 changed files with 36 additions and 15 deletions.
23 changes: 17 additions & 6 deletions .github/workflows/CI.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -235,10 +235,21 @@ jobs:
runtime_tag: dev-${{ needs.prepare_ci_run.outputs.DATETIME }}
uses: ./.github/workflows/performance-test.yml

helm_charts_build:
helm_charts_publish:
name: Publish helm chart changes to charts repo
if: github.event_name == 'push' && needs.prepare_ci_run.outputs.NON_FORKED_AND_NON_ROBOT_RUN == 'true'
needs: [prepare_ci_run, build_image]
strategy:
matrix:
config:
- name: keptn
path: chart
- name: keptn-lifecycle-operator
path: lifecycle-operator/chart
- name: keptn-metrics-operator
path: metrics-operator/chart
- name: keptn-cert-manager
path: klt-cert-manager/chart
runs-on: ubuntu-22.04
steps:
- name: Check out klt repo
Expand All @@ -251,19 +262,19 @@ jobs:
path: ./helm-charts-repository
token: ${{ secrets.KEPTN_BOT_TOKEN }}

- name: Copy charts from klt to helm repo
run: rsync -av --delete --exclude='charts/*.tgz' ./helm/chart/ ./helm-charts-repository/charts/keptn-lifecycle-toolkit/
- name: Copy chart from klt to helm repo
run: rsync -av --delete --exclude='charts/*.tgz' ./${{ matrix.config.path }}/ ./helm-charts-repository/charts/${{ matrix.config.name }}/

- name: Create Pull Request
uses: peter-evans/create-pull-request@v5
with:
token: ${{ secrets.KEPTN_BOT_TOKEN }}
path: ./helm-charts-repository
commit-message: "feat: update KLT chart"
commit-message: "feat: update ${{ matrix.config.name }} helm chart"
signoff: true
branch: klt-chart-update-${{ needs.prepare_ci_run.outputs.BRANCH_SLUG }}
branch: chart-update-${{ matrix.config.name }}
delete-branch: true
base: main
title: "Update KLT Helm chart"
title: "Update ${{ matrix.config.name }} Helm chart"
body: |
:robot: **This is an automated PR for updating and releasing Helm charts from keptn/lifecycle-toolkit!** :robot:
20 changes: 15 additions & 5 deletions .github/workflows/validate-helm-chart.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,17 @@ jobs:
check-helm-docs:
name: Check helm documentation values
runs-on: ubuntu-22.04
strategy:
matrix:
config:
- name: keptn
path: chart
- name: keptn-lifecycle-operator
path: lifecycle-operator/chart
- name: keptn-metrics-operator
path: metrics-operator/chart
- name: keptn-cert-manager
path: klt-cert-manager/chart
steps:
- name: Check out code
uses: actions/checkout@v4
Expand All @@ -32,23 +43,22 @@ jobs:
npm install --location=global ./
cd ..
- name: Check if Helm doc is up to date
## TODO: test also other helm docs (metrics-operator, certificate-operator)
- name: Check if Helm doc is up to date for ${{ matrix.config.name }}
run: |
cd ./lifecycle-operator/chart/
cd ./${{ matrix.config.path }}/
cp ./README.md ./README-old.md
cat ./values.yaml ./doc.yaml > ./rendered.yaml
readme-generator --values=./rendered.yaml --readme=./README.md
if ! cmp --quiet ./README-old.md ./README.md; then
echo "The Helm values have changes that are not reflected in the readme."
echo "The Helm values for ${{ matrix.config.name }} have changes that are not reflected in the readme."
echo "Please use ./.github/scripts/generate-helm-docs.sh to re-generate the docs."
echo ""
echo "=========== Diff ==========="
diff -u ./README-old.md ./README.md
exit 1
else
echo ""
echo "Helm values documentation is correct!"
echo "Helm values documentation for ${{ matrix.config.name }} is correct!"
fi
helm-tests:
Expand Down
4 changes: 4 additions & 0 deletions chart/doc.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
## @section Keptn
## @param certManager.enabled Enable this value to install Keptn Certificate Manager
## @param lifecycleOperator.enabled Enable this value to install Keptn Lifecycle Operator
## @param metricsOperator.enabled Enable this value to install Keptn Metrics Operator
4 changes: 0 additions & 4 deletions chart/values.yaml
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
## @section Keptn
certManager:
## @param certManager.enabled Enable this value to install Keptn Certificate Manager
enabled: true
lifecycleOperator:
## @param lifecycleOperator.enabled Enable this value to install Keptn Lifecycle Operator
enabled: true
metricsOperator:
## @param metricsOperator.enabled Enable this value to install Keptn Metrics Operator
enabled: true

0 comments on commit ddee725

Please sign in to comment.