Skip to content

Commit dfe3068

Browse files
authored
fix: release (#196)
* fix: add checkout * add retry/backoff * fix: version * fix: version * fix: versions
1 parent c0f0820 commit dfe3068

5 files changed

Lines changed: 38 additions & 9 deletions

File tree

Lines changed: 31 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,37 @@
11
#!/usr/bin/env bash
22
set -euo pipefail
33

4-
app_version="$(yq '.metabase.metabaseImage.tag' charts/nr-metabase/values.yaml)"
4+
# Get Metabase version from values.yaml (the actual image tag)
5+
values_version="$(yq '.metabase.metabaseImage.tag' charts/nr-metabase/values.yaml)"
56

6-
if [ "$app_version" = "null" ]; then
7-
app_version=""
7+
if [ "$values_version" = "null" ] || [ -z "$values_version" ]; then
8+
echo "❌ ERROR: Failed to extract metabase.metabaseImage.tag from values.yaml" >&2
9+
exit 1
810
fi
911

10-
printf '%s\n' "$app_version"
12+
# Get appVersion from Chart.yaml
13+
chart_app_version="$(yq '.appVersion' charts/nr-metabase/Chart.yaml)"
14+
15+
if [ "$chart_app_version" = "null" ] || [ -z "$chart_app_version" ]; then
16+
echo "❌ ERROR: Failed to extract appVersion from Chart.yaml" >&2
17+
exit 1
18+
fi
19+
20+
# Normalize versions for comparison (both should have 'v' prefix)
21+
normalized_values="${values_version#v}" # Remove leading 'v' if present
22+
normalized_chart="${chart_app_version#v}" # Remove leading 'v' if present
23+
24+
# Check for version mismatch
25+
if [ "$normalized_values" != "$normalized_chart" ]; then
26+
echo "❌ VERSION MISMATCH DETECTED:" >&2
27+
echo " values.yaml (metabase.metabaseImage.tag): $values_version" >&2
28+
echo " Chart.yaml (appVersion): $chart_app_version" >&2
29+
echo "" >&2
30+
echo "🔧 ACTION REQUIRED:" >&2
31+
echo " Update Chart.yaml to match values.yaml:" >&2
32+
echo " 1. Set 'version' to: $normalized_values" >&2
33+
echo " 2. Set 'appVersion' to: $values_version" >&2
34+
exit 1
35+
fi
36+
37+
printf '%s\n' "$values_version"

.github/workflows/merge-main.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,8 @@ jobs:
7777
run: |
7878
APP_VERSION="$(bash .github/scripts/get-metabase-version.sh)"
7979
VERSION="${APP_VERSION#v}"
80+
echo "APP_VERSION=$APP_VERSION"
81+
echo "VERSION=$VERSION"
8082
helm package -u --destination=.cr-release-packages --app-version="$APP_VERSION" --version=$VERSION charts/${{ github.event.repository.name }}
8183
8284
- name: Run chart-releaser

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ The stock Metabase image cannot talk to Oracle, and it certainly cannot talk to
5050
5151
┌─────────────────────────────────────────────────────────┐
5252
│ Metabase Pod (custom image) │
53-
│ • metabase.jar (v0.61.1) on Temurin 25 │
53+
│ • metabase.jar (vx.x.x) on Temurin 25 │
5454
│ • ojdbc8-full Oracle driver in /plugins │
5555
│ • run_app.sh imports Oracle TLS certs → JVM cacerts │
5656
│ • log4j2 config mounted from ConfigMap │
@@ -133,7 +133,7 @@ All values live in `charts/nr-metabase/values.yaml` and are validated against `v
133133
|---|---|---|
134134
| `metabase.enabled` | `true` | Toggle the Metabase component. |
135135
| `metabase.replicaCount` | `1` | Pod replicas (Metabase is not horizontally scalable by default). |
136-
| `metabase.metabaseImage.tag` | `v0.61.1` | Metabase version deployed by the pod. |
136+
| `metabase.metabaseImage.tag` | `vx.x.x` | Metabase version deployed by the pod. |
137137
| `metabase.dbHostPortEnv` | `~` | Comma-separated `host:port` list of Oracle endpoints whose TLS certs are imported at startup. |
138138
| `metabase.service.port` / `targetPort` | `80` / `3000` | Service port mapping. |
139139
| `metabase.resources.requests` | `250m` CPU / `1200Mi` | Resource requests. |

charts/nr-metabase/Chart.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,12 @@ type: application
1313
# This is the chart version. This version number should be incremented each time you make changes
1414
# to the chart and its templates, including the app version.
1515
# Versions are expected to follow Semantic Versioning (https://semver.org/)
16-
version: 0.48.7
16+
version: 0.62.4
1717
# This is the version number of the application being deployed. This version number should be
1818
# incremented each time you make changes to the application. Versions are not expected to
1919
# follow Semantic Versioning. They should reflect the version the application is using.
2020
# It is recommended to use it with quotes.
21-
appVersion: "v0.48.7" # aligned with metabase version. ALso update the global values appversion, there is no way to pass to
21+
appVersion: "v0.62.4" # aligned with metabase version in values.yaml
2222
dependencies:
2323
- name: database
2424
condition: database.enabled

charts/nr-metabase/values.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ metabase:
2525
# Track the upstream Metabase image tag used by the deployment template.
2626
metabaseImage:
2727
repository: metabase/metabase
28-
tag: v0.62.4.3
28+
tag: v0.62.4
2929
containerPort: 3000
3030
environment: production
3131
service:

0 commit comments

Comments
 (0)