Skip to content

Commit

Permalink
Merge branch 'master' into feature/PLAT-992-add-business-id-to-cronjo…
Browse files Browse the repository at this point in the history
…b-chart
  • Loading branch information
abdullah-sl authored Aug 8, 2024
2 parents da2bcc1 + 5d97c5c commit be74b37
Show file tree
Hide file tree
Showing 18 changed files with 935 additions and 155 deletions.
39 changes: 39 additions & 0 deletions .github/workflows/test-cronjob-chart.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
---
name: Test cronjob chart

on:
push:
paths:
- cronjob/**
- .github/workflows/**
pull_request:
paths:
- cronjob/**
- .github/workflows/**

jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
helm-version:
- 3.1.0
- 3.2.3
- 3.2.4
- 3.3.0
- latest
steps:
- uses: actions/checkout@v4

- name: Set up Helm ${{ matrix.helm-version }}
uses: azure/[email protected]
with:
version: ${{ matrix.helm-version }}

- name: Install Helm unittest plugin
run: |
helm plugin install https://github.com/helm-unittest/helm-unittest.git
- name: Run cronjob chart tests
run: |
helm unittest cronjob
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,4 +44,11 @@ vi ./example/subChart/requirements.yaml

```bash
helm dependency update ./helm/preview
```

<!-- how to unit test -->
### How to run unit tests

```bash
helm unittest <chart-name>
```
1 change: 1 addition & 0 deletions cronjob/.helmignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@
.github
*.md
*.tgz
tests
2 changes: 1 addition & 1 deletion cronjob/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
apiVersion: v1
description: Helm chart with simple cronjob template
name: cronjob
version: 1.0.0
version: 1.0.0xx
appVersion: 1.0.0
tillerVersion: ">=2.14.3"
4 changes: 4 additions & 0 deletions cronjob/templates/_argo_cron_workflow.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -130,9 +130,11 @@
-
# If .Values.exitNotifications.slackApp is set, slackApp will be notify if the job is done
{{- if .Values.exitNotifications.slackApp }}
{{- if list nil true "true" | has .Values.exitNotifications.slackApp.sendOnSuccess }}
- name: Notice-SlackApp-Succeeded
template: notice-slack-app-succeeded
{{- end }}
{{- end }}
# If .Values.exitNotifications.healthcheckIo is set, Healthcheck IO will be notify if the job is done
{{- if .Values.exitNotifications.healthcheckIo }}
- name: Notice-HealthcheckIo-Succeeded
Expand All @@ -144,9 +146,11 @@
-
# If .Values.exitNotifications.slackApp is set, slackApp will be notify if the job is failed
{{- if .Values.exitNotifications.slackApp }}
{{- if list nil true "true" | has .Values.exitNotifications.slackApp.sendOnFailure }}
- name: Notice-SlackApp-Failed
template: notice-slack-app-failed
{{- end }}
{{- end }}
# If .Values.exitNotifications.newRelic is set, New Relic will be notify if the job is failed
{{- if .Values.exitNotifications.newRelic }}
- name: Notice-NewRelic-Failed
Expand Down
Loading

0 comments on commit be74b37

Please sign in to comment.