From 11682fc6f4d813ae231750ff3c844ab81f6c16fc Mon Sep 17 00:00:00 2001 From: Chris Date: Sun, 20 Jun 2021 20:16:45 +0200 Subject: [PATCH] Add prepare target for charts Some charts require dependencies which are needed before releasing them. --- .github/workflows/release.yml | 3 ++- .github/workflows/test.yml | 2 ++ Makefile | 7 +++++++ charts/clustercode/Chart.yaml | 2 +- charts/clustercode/Makefile | 5 +++++ charts/clustercode/README.md | 2 +- charts/fronius-stack/Makefile | 8 ++++++++ 7 files changed, 26 insertions(+), 3 deletions(-) create mode 100644 charts/fronius-stack/Makefile diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index dc15059..34e4e33 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -18,7 +18,8 @@ jobs: run: | git config user.name "$GITHUB_ACTOR" git config user.email "$GITHUB_ACTOR@users.noreply.github.com" - + - name: Prepare charts + run: make prepare - name: Run chart-releaser uses: helm/chart-releaser-action@v1.2.1 env: diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 247ffa5..e79075c 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -25,5 +25,7 @@ jobs: restore-keys: | ${{ runner.os }}-go- + - name: Prepare charts + run: make prepare - name: Run Chart unit tests run: make test diff --git a/Makefile b/Makefile index 0fef665..2f8dc29 100644 --- a/Makefile +++ b/Makefile @@ -55,3 +55,10 @@ lint\:versions: ## Checks if chart versions have been changed @changed_charts=$$(git diff --dirstat=files,0 origin/master..HEAD -- charts | cut -d '/' -f 2 | uniq) ; \ echo "Charts changed: $$changed_charts" ; echo ; \ for dir in $$changed_charts; do git diff origin/master..HEAD -- "charts/$${dir}/Chart.yaml" | grep -H --label=$${dir} "+version"; done + +.PHONY: prepare +prepare: ## Prepare the charts for testing + @echo --- Preparing charts + @find charts -type f -name Makefile | sed 's|/[^/]*$$||' | xargs -I '%' make -C '%' prepare + @echo 'Check for uncommitted changes ...' + git diff --exit-code diff --git a/charts/clustercode/Chart.yaml b/charts/clustercode/Chart.yaml index 8b2818c..84d2b16 100644 --- a/charts/clustercode/Chart.yaml +++ b/charts/clustercode/Chart.yaml @@ -15,7 +15,7 @@ type: application # This is the chart version. This version number should be incremented each time you make changes # to the chart and its templates, including the app version. # Versions are expected to follow Semantic Versioning (https://semver.org/) -version: 0.1.1 +version: 0.1.2 # This is the version number of the application being deployed. This version number should be # incremented each time you make changes to the application. Versions are not expected to diff --git a/charts/clustercode/Makefile b/charts/clustercode/Makefile index f49fafe..a00716c 100644 --- a/charts/clustercode/Makefile +++ b/charts/clustercode/Makefile @@ -38,3 +38,8 @@ update: rbac appVersion ## Updates all templates .PHONY: help help: ## Show this help @grep -E -h '\s##\s' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-20s\033[0m %s\n", $$1, $$2}' + +# +# "Interface" for parent Makefile +# +prepare: ## Prepare helm chart diff --git a/charts/clustercode/README.md b/charts/clustercode/README.md index 347a25e..c7eb779 100644 --- a/charts/clustercode/README.md +++ b/charts/clustercode/README.md @@ -1,6 +1,6 @@ # clustercode -![Version: 0.1.1](https://img.shields.io/badge/Version-0.1.1-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: v2.0.0-rc2](https://img.shields.io/badge/AppVersion-v2.0.0--rc2-informational?style=flat-square) +![Version: 0.1.2](https://img.shields.io/badge/Version-0.1.2-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: v2.0.0-rc2](https://img.shields.io/badge/AppVersion-v2.0.0--rc2-informational?style=flat-square) Movie and Series conversion Operator diff --git a/charts/fronius-stack/Makefile b/charts/fronius-stack/Makefile new file mode 100644 index 0000000..cb9a6bf --- /dev/null +++ b/charts/fronius-stack/Makefile @@ -0,0 +1,8 @@ + +# +# "Interface" for parent Makefile +# +prepare: ## Prepare helm chart + helm repo add ccremer https://ccremer.github.io/charts + helm repo add influx https://helm.influxdata.com + helm dep build