From 46754df8bc3771261e57e4846866a85cae4587f7 Mon Sep 17 00:00:00 2001 From: Tarun Pothulapati Date: Sat, 24 Aug 2019 01:04:59 +0530 Subject: [PATCH] Single version Variable for both charts and docker images (#36) * use a single version through out Signed-off-by: Tarun Pothulapati * remove unnecessary rm Signed-off-by: Tarun Pothulapati --- Makefile | 3 +++ chart/Chart.yaml | 2 +- chart/values.yaml | 2 +- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 8b01f7b..c3ef183 100644 --- a/Makefile +++ b/Makefile @@ -66,6 +66,9 @@ ifndef CIRCLE_TAG endif cp -R chart tmp/smi-metrics sed -i.bak 's/CHART_VERSION/${VERSION}/g' tmp/smi-metrics/Chart.yaml + for fname in $$(grep -rnl '$*' tmp/smi-metrics); do \ + sed -i.bak 's/VERSION/${CIRCLE_TAG}/g' $$fname; \ + done helm package tmp/smi-metrics -d tmp --save=false rm -rf tmp/smi-metrics/ diff --git a/chart/Chart.yaml b/chart/Chart.yaml index d55693b..8979c26 100644 --- a/chart/Chart.yaml +++ b/chart/Chart.yaml @@ -1,5 +1,5 @@ apiVersion: v1 -appVersion: "0.1" +appVersion: CHART_VERSION description: Provider for metrics.smi-spec.io name: smi-metrics version: CHART_VERSION diff --git a/chart/values.yaml b/chart/values.yaml index 6fa7360..957dbb3 100644 --- a/chart/values.yaml +++ b/chart/values.yaml @@ -1,7 +1,7 @@ replicaCount: 1 image: - name: thomasr/smi-metrics:v1alpha1-0.1 + name: deislabs/smi-metrics:VERSION pullPolicy: IfNotPresent config: