Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a Helm CI Check #24

Merged
merged 3 commits into from
Feb 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
50 changes: 50 additions & 0 deletions .github/workflows/helm.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
name: Lint and Test Charts

on:
pull_request:
paths:
- 'charts/**'
- 'ct-config.yaml'
- '.github/workflows/lint-and-test-charts.yml'

jobs:
helm-lint-and-test:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Set up Helm
uses: azure/setup-helm@v3
with:
version: v3.14.0

- uses: actions/setup-python@v4
with:
python-version: '3.10'
check-latest: true

- name: Set up chart-testing
uses: helm/[email protected]

- name: Run chart-testing (list-changed)
id: list-changed
run: |
changed=$(ct list-changed --config ./ct-config.yaml)
if [[ -n "$changed" ]]; then
echo "changed=true" >> "$GITHUB_OUTPUT"
fi

- name: Run chart-testing (lint)
if: steps.list-changed.outputs.changed == 'true'
run: ct lint --config ./ct-config.yaml

- name: Create kind cluster
if: steps.list-changed.outputs.changed == 'true'
uses: helm/[email protected]
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's pretty neat.


- name: Run chart-testing (install)
if: steps.list-changed.outputs.changed == 'true'
run: ct install --config ./ct-config.yaml
File renamed without changes.
File renamed without changes.
File renamed without changes.
8 changes: 4 additions & 4 deletions helm/vigilo/values.yaml → charts/vigilo/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@ imagePullSecrets:
- name: ""

cronjob:
schedule: "*/10 * * * *" # Every 10 minutes
concurrencyPolicy: Forbid # skip if previous job is still running
successfulJobsHistoryLimit: 0 # keep no history of successful jobs
failedJobsHistoryLimit: 1 # keep only one failed job
schedule: "*/10 * * * *" # Every 10 minutes
concurrencyPolicy: Forbid # skip if previous job is still running
successfulJobsHistoryLimit: 0 # keep no history of successful jobs
failedJobsHistoryLimit: 1 # keep only one failed job

configs:
datadogSecret:
Expand Down
5 changes: 5 additions & 0 deletions ct-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
charts-dir:
- charts
helm-extra-args: "--timeout=5m"
target-branch: main
validate-maintainers: false
Loading