Skip to content

Commit

Permalink
Test for version bump (#28)
Browse files Browse the repository at this point in the history
* Test for version bump

If a chart was changed without having it's version bumped, fail the
build. In order for this to work, all chart versions were bumped by a
patch version.

* Show changes in build

* Build dependencies instead of update

To honor the dependencies.lock file instead of updating.
  • Loading branch information
srueg authored and mhutter committed Mar 18, 2019
1 parent 7fe9c6f commit 9aec181
Show file tree
Hide file tree
Showing 8 changed files with 20 additions and 10 deletions.
16 changes: 13 additions & 3 deletions .ci/build.sh
Expand Up @@ -58,8 +58,8 @@ trap cleanup 0 1 2 3 6 15

charts=$(find ./* -maxdepth 1 -name Chart.yaml -exec dirname "{}" \;)
for chart in $charts; do
echo "----> Update dependencies for ${chart}"
helm dependency update "$chart"
echo "----> Build dependencies for ${chart}"
helm dependency build "$chart"

helm lint "$chart"

Expand All @@ -74,14 +74,24 @@ echo "----> Check out gh-pages branch"
git clone --depth=1 "$GIT_REPO" --branch=gh-pages "$OUT_DIR"

echo "----> Moving new charts into repo"
mv -nv "${tmp}"/*.tgz "${OUT_DIR}/"
mv -v "${tmp}"/*.tgz "${OUT_DIR}/"

pushd "$OUT_DIR"
new_charts="$(git status --short | grep '^??' --count ||:)"
modified_charts="$(git status --short | grep '^.M' --count ||:)"

if [ "$modified_charts" -ne 0 ]; then
echo 'ERROR: Chart version number was not updated'
git status --short | grep '^.M'
exit 1
fi

if [ "$new_charts" -eq 0 ]; then
echo '----> No new charts, exiting'
exit 0
fi

echo '----> Reindexing Helm repository'
helm repo index --url="$REPO_URL" .

git diff
2 changes: 1 addition & 1 deletion baas-operator/Chart.yaml
@@ -1,7 +1,7 @@
apiVersion: v1
description: Backup as a Service Operator
name: baas-operator
version: 1.2.2
version: 1.2.3
appVersion: v0.1.3
maintainers:
- name: APPUiO Team
Expand Down
2 changes: 1 addition & 1 deletion keycloak/Chart.yaml
@@ -1,5 +1,5 @@
name: keycloak
version: 4.1.0
version: 4.1.1
appVersion: 4.8.3.Final
description: Open Source Identity and Access Management For Modern Applications and Services
keywords:
Expand Down
2 changes: 1 addition & 1 deletion maxscale/Chart.yaml
@@ -1,7 +1,7 @@
---
apiVersion: v1
name: maxscale
version: 1.0.3
version: 1.0.4
appVersion: "2.2.19"
description: MaxScale Helm Chart
home: "https://mariadb.com/products/technology/maxscale"
Expand Down
2 changes: 1 addition & 1 deletion openshift-oauth-proxy/Chart.yaml
@@ -1,7 +1,7 @@
apiVersion: v1
description: OpenShift oauth-proxy
name: openshift-oauth-proxy
version: 0.2.0
version: 0.2.1
appVersion: 1.1.0
maintainers:
- name: APPUiO Team
Expand Down
2 changes: 1 addition & 1 deletion prometheus-blackbox-exporter/Chart.yaml
@@ -1,7 +1,7 @@
apiVersion: v1
description: Prometheus Blackbox Exporter
name: prometheus-blackbox-exporter
version: 0.1.1
version: 0.1.2
appVersion: 0.12.0
home: https://github.com/prometheus/blackbox_exporter
sources:
Expand Down
2 changes: 1 addition & 1 deletion prometheus/Chart.yaml
@@ -1,5 +1,5 @@
name: prometheus
version: 0.0.3
version: 0.0.4
appVersion: 2.4.2
description: Prometheus is a monitoring system and time series database.
home: https://prometheus.io/
Expand Down
2 changes: 1 addition & 1 deletion secret/Chart.yaml
@@ -1,7 +1,7 @@
apiVersion: v1
description: Deploy arbitrary secrets
name: secret
version: 1.0.0
version: 1.0.1
maintainers:
- name: APPUiO Team
email: info@appuio.ch

0 comments on commit 9aec181

Please sign in to comment.