-
Notifications
You must be signed in to change notification settings - Fork 33
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
41 additions
and
11 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 |
---|---|---|
|
@@ -6,8 +6,6 @@ on: | |
pull_request: | ||
branches: ["main"] | ||
|
||
workflow_dispatch: | ||
|
||
jobs: | ||
validate-helm: | ||
runs-on: ubuntu-latest | ||
|
@@ -17,12 +15,50 @@ jobs: | |
- uses: actions/checkout@v4 | ||
|
||
- name: Helm tool installer | ||
uses: Azure/setup-helm@v3 | ||
uses: Azure/[email protected] | ||
|
||
- name: output.log is present | ||
run: | | ||
if [ ! -f output.log ]; then | ||
echo 'output.log is not present' | ||
echo 'Deploy helm chart to your `kind` cluster' | ||
echo 'Run command `kubectl get all,cm,secret,ing -A` and put the output in a file called `output.log` in a root of the repository' | ||
exit 1 | ||
fi | ||
- name: MYSQL Dependency Present | ||
if: always() | ||
run: | | ||
if ! grep -q "name: mysql" .infrastructure/helm-chart/todoapp/Chart.yaml; then | ||
echo 'MYSQL dependency is not present' | ||
echo 'Inside the Chart.yaml file of todoapp chart, add lines' | ||
echo 'dependencies:' | ||
echo '- name: mysql' | ||
exit 1 | ||
fi | ||
- name: Todoapp Chart Present | ||
if: always() | ||
run: | | ||
if [ ! -d .infrastructure/helm-chart/todoapp ]; then | ||
echo "Todoapp Chart is not present or named incorrectly" | ||
exit 1 | ||
fi | ||
- name: MYSQL Chart Present | ||
if: always() | ||
run: | | ||
if [ ! -d .infrastructure/helm-chart/todoapp/charts/mysql ]; then | ||
echo "MYSQL Chart is not present or named incorrectly" | ||
exit 1 | ||
fi | ||
- name: Helm Lint | ||
if: always() | ||
run: | | ||
helm lint helm-charts/mateapp | ||
helm lint .infrastructure/helm-chart/todoapp | ||
- name: Helm Template | ||
if: always() | ||
run: | | ||
helm template helm-charts/mateapp -f helm-charts/mateapp/values.yaml | ||
helm template .infrastructure/helm-chart/todoapp -f .infrastructure/helm-chart/todoapp/values.yaml |
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