Skip to content

Commit

Permalink
Bump helm chart version fro CRD updates (#415)
Browse files Browse the repository at this point in the history
  • Loading branch information
nhudson authored Dec 11, 2023
1 parent ac897bc commit 24346ee
Show file tree
Hide file tree
Showing 3 changed files with 55 additions and 13 deletions.
39 changes: 39 additions & 0 deletions .github/workflows/helm-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,49 @@ jobs:
changed_relative_to_branch: ${{ github.base_ref || 'not-a-branch' }}
ignore_dirs: ".tembo"

# We can check versions using ct, but there is a bug checking 1 chart. So lets
# just do it this way for now.
# https://github.com/helm/chart-testing/pull/594
check_version:
name: Check Helm chart version
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
path: 'code'

- name: Fetch main branch
run: |
cd code
git fetch origin main:main
- name: Check chart version
run: |
cd code
CURR_VERSION=$(cat charts/tembo-operator/Chart.yaml | grep version: | cut -d ' ' -f 2)
MAIN_VERSION=$(git show main:charts/tembo-operator/Chart.yaml | grep version: | cut -d ' ' -f 2)
echo -n "Current version: ${CURR_VERSION}\n"
echo -n "Previous version: ${MAIN_VERSION}\n"
if [ "$CURR_VERSION" = "$MAIN_VERSION" ]; then
echo "Helm chart version is unchanged and needs to be bumped!"
exit 1
fi
LOWEST_VERSION=$(printf "%s\n%s" "$CURR_VERSION" "$MAIN_VERSION" | sort -V | head -n1)
if [ "$LOWEST_VERSION" != "$MAIN_VERSION" ]; then
echo "Helm chart version has been downgraded, please bump it!"
exit 1
fi
lint:
name: Lint charts
runs-on: ubuntu-latest
needs:
- find_directories
- check_version
strategy:
fail-fast: false
matrix: ${{ fromJson(needs.find_directories.outputs.directories) }}
Expand All @@ -51,6 +89,7 @@ jobs:
runs-on: ubuntu-latest
needs:
- find_directories
- check_version
steps:
- name: Checkout
uses: actions/checkout@v3
Expand Down
2 changes: 1 addition & 1 deletion charts/tembo-operator/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: tembo-operator
description: 'Helm chart to deploy the tembo-operator'
type: application
icon: https://cloud.tembo.io/images/TemboElephant.png
version: 0.2.0
version: 0.2.1
home: https://tembo.io
sources:
- https://github.com/tembo-io/tembo-stacks
Expand Down
27 changes: 15 additions & 12 deletions ct.yaml
Original file line number Diff line number Diff line change
@@ -1,13 +1,16 @@
Remote: origin
TargetBranch: main
CheckVersionIncrement: true
ProcessAllCharts: false
Charts: [charts/tembo-operator]
ChartRepos: [cloudnative-pg=https://cloudnative-pg.github.io/charts]
ChartDirs: [charts]
HelmExtraArgs: --timeout 10m
Debug: false
KubectlTimeout: 0s
PrintLogs: true
remote: origin
target-branch: main
check-version-infrement: true
process-all-charts: false
charts:
- charts/tembo-operator
chart-repos:
- cloudnative-pg=https://cloudnative-pg.github.io/charts
chart-dirs:
- charts
helm-extra-args: --timeout 10m
debug: false
kubectl-timeout: 0s
print-logs: true
# Disable upgrade testing due to CNPG CRD annotation "helm.sh/resource-policy: keep"
Upgrade: false
upgrade: false

0 comments on commit 24346ee

Please sign in to comment.