From 198ea005d416a75e83e75bf1074d0c5e78b212f0 Mon Sep 17 00:00:00 2001 From: rjshrjndrn Date: Tue, 28 Jun 2022 15:06:26 +0200 Subject: [PATCH] chore(helm): override branch name for db migration Signed-off-by: rjshrjndrn --- scripts/helmcharts/openreplay/templates/job.yaml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/scripts/helmcharts/openreplay/templates/job.yaml b/scripts/helmcharts/openreplay/templates/job.yaml index c5624a0a5..623bc3093 100644 --- a/scripts/helmcharts/openreplay/templates/job.yaml +++ b/scripts/helmcharts/openreplay/templates/job.yaml @@ -36,7 +36,10 @@ spec: - -c args: - | - git clone https://github.com/openreplay/openreplay /opt/openreplay/openreplay -b {{ .Chart.AppVersion }} + mkdir -p /opt/openreplay/openreplay && cd "$_" + git clone https://github.com/openreplay/openreplay . + git checkout {{ default .Chart.AppVersion .Values.dbMigrationUpstreamBranch }} + # Checking variable is empty. Shell independant method. if [ "x$ENTERPRISE_EDITION_LICENSE" != "x" ]; then exit_count=0 @@ -61,7 +64,6 @@ spec: fi echo "Copying enterprise code" - cd /opt/openreplay/openreplay cp -rf ee/scripts/* scripts/ fi volumeMounts: