From 8ac4c7bdc4e865192331dd3fef4f2b2c4b13b3d0 Mon Sep 17 00:00:00 2001 From: Rajesh Rajendran Date: Sun, 12 Dec 2021 20:43:33 +0530 Subject: [PATCH] chore(helm): add enterprise copy support Signed-off-by: Rajesh Rajendran --- .../helm/database-migrate/templates/Job.yaml | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/scripts/helm/helm/database-migrate/templates/Job.yaml b/scripts/helm/helm/database-migrate/templates/Job.yaml index 074c51954..f53557fe4 100644 --- a/scripts/helm/helm/database-migrate/templates/Job.yaml +++ b/scripts/helm/helm/database-migrate/templates/Job.yaml @@ -27,14 +27,19 @@ spec: initContainers: - name: git image: alpine/git + env: + - name: ENTERPRISE_EDITION_LICENSE + value: "{{ .Values.global.enterprise_edition_license }}" command: - - git + - /bin/sh + - -c args: - - clone - - https://github.com/openreplay/openreplay - - -b - - {{ .Chart.AppVersion }} - - /opt/openreplay/openreplay + - | + git clone https://github.com/openreplay/openreplay -b {{ .Chart.AppVersion }} /opt/openreplay/openreplay + if [ ENTERPRISE_EDITION_LICENSE != "" ]; then + cd /opt/openreplay/openreplay + cp -rf ee/scripts/* scripts/ + fi volumeMounts: - name: shared mountPath: /opt/openreplay