You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@devlake.apache.org by wa...@apache.org on 2023/01/31 04:30:34 UTC
[incubator-devlake-helm-chart] 01/01: test(ci): add ci to check image version and chart version
This is an automated email from the ASF dual-hosted git repository.
warren pushed a commit to branch feat-check-image-version
in repository https://gitbox.apache.org/repos/asf/incubator-devlake-helm-chart.git
commit 3dbb1dcc117b74562c97bb09616f976c32a0370d
Author: Yingchu Chen <yi...@merico.dev>
AuthorDate: Tue Jan 31 12:30:05 2023 +0800
test(ci): add ci to check image version and chart version
---
.github/workflows/lint-image-chart-versions.yml | 34 +++++++++++++++++++++++++
1 file changed, 34 insertions(+)
diff --git a/.github/workflows/lint-image-chart-versions.yml b/.github/workflows/lint-image-chart-versions.yml
new file mode 100644
index 0000000..1f84607
--- /dev/null
+++ b/.github/workflows/lint-image-chart-versions.yml
@@ -0,0 +1,34 @@
+name: validate image and chart version
+on:
+ pull_request:
+ branches:
+ - main
+ paths:
+ - charts/**
+jobs:
+ check:
+ name: validate image and chart version
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/checkout@v3
+ - name: install yq
+ run: echo yq should already in github ubuntu-latest
+ - name: chart version align with image version
+ run: |
+ set -e
+ chart_version_text=$(yq .version ${GITHUB_WORKSPACE}/charts/devlake/Chart.yaml)
+ devlake_version_text=$(yq .lake.image.tag ${GITHUB_WORKSPACE}/charts/devlake/values.yaml)
+ grafana_version_text=$(yq .grafana.image.tag ${GITHUB_WORKSPACE}/charts/devlake/values.yaml)
+ configui_version_text=$(yq .ui.image.tag ${GITHUB_WORKSPACE}/charts/devlake/values.yaml)
+ if [[ $chart_version_text != $devlake_version_text ]] ; then
+ echo chart version $chart_version_text is not equal to devlake version $devlake_version_text
+ exit 1
+ elif [[ $chart_version_text != $grafana_version_text ]] ; then
+ echo chart version $chart_version_text is not equal to grafana version $grafana_version_text
+ exit 1
+ elif [[ $chart_version_text != $devlake_version_text ]] ; then
+ echo chart version $chart_version_text is not equal to configui version $configui_version_text
+ exit 1
+ else
+ echo all images version are equal to chart version
+ fi