diff --git a/stable/sonarqube/Chart.yaml b/stable/sonarqube/Chart.yaml index b7de6d44047d..173ff6be6841 100644 --- a/stable/sonarqube/Chart.yaml +++ b/stable/sonarqube/Chart.yaml @@ -1,7 +1,7 @@ name: sonarqube description: Sonarqube is an open sourced code quality scanning tool -version: 0.11.0 -appVersion: 6.7.6 +version: 0.12.0 +appVersion: 7.4 keywords: - coverage - security diff --git a/stable/sonarqube/templates/copy-plugins.yaml b/stable/sonarqube/templates/copy-plugins.yaml new file mode 100644 index 000000000000..f06c8157ab39 --- /dev/null +++ b/stable/sonarqube/templates/copy-plugins.yaml @@ -0,0 +1,16 @@ +apiVersion: v1 +kind: ConfigMap +metadata: + name: {{ template "sonarqube.fullname" . }}-copy-plugins + labels: + app: {{ template "sonarqube.name" . }} + chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }} + release: {{ .Release.Name }} + heritage: {{ .Release.Service }} +data: + copy_plugins.sh: |- + #! /bin/sh + cp /opt/sonarqube/extensions/plugins/tmp/*.jar /opt/sonarqube/extensions/plugins/ + /opt/sonarqube/bin/run.sh + + \ No newline at end of file diff --git a/stable/sonarqube/templates/deployment.yaml b/stable/sonarqube/templates/deployment.yaml index a52f2bece4b3..c3b5d90b0dfd 100644 --- a/stable/sonarqube/templates/deployment.yaml +++ b/stable/sonarqube/templates/deployment.yaml @@ -26,16 +26,16 @@ spec: {{- end }} command: ["sh", "-c", - "mkdir -p /opt/sonarqube/extensions/plugins/ && - cp /tmp/scripts/install_plugins.sh /opt/sonarqube/extensions/plugins/install_plugins.sh && - chmod 0775 /opt/sonarqube/extensions/plugins/install_plugins.sh && - /opt/sonarqube/extensions/plugins/install_plugins.sh + "mkdir -p /opt/sonarqube/extensions/plugins/tmp && + cp /tmp/scripts/install_plugins.sh /opt/sonarqube/extensions/plugins/tmp/install_plugins.sh && + chmod 0775 /opt/sonarqube/extensions/plugins/tmp/install_plugins.sh && + /opt/sonarqube/extensions/plugins/tmp/install_plugins.sh && pwd && ls -lah " ] volumeMounts: - - mountPath: /opt/sonarqube/extensions + - mountPath: /opt/sonarqube/extensions/plugins/tmp name: sonarqube - subPath: extensions + subPath: tmp - name: install-plugins mountPath: /tmp/scripts/ resources: @@ -123,9 +123,11 @@ spec: - mountPath: /opt/sonarqube/data name: sonarqube subPath: data - - mountPath: /opt/sonarqube/extensions + - mountPath: /opt/sonarqube/extensions/plugins/tmp name: sonarqube - subPath: extensions + subPath: tmp + - name: copy-plugins + mountPath: /usr/local/ resources: {{ toYaml .Values.resources | indent 12 }} {{- if .Values.nodeSelector }} @@ -155,6 +157,13 @@ spec: items: - key: install_plugins.sh path: install_plugins.sh + - name: copy-plugins + configMap: + name: {{ template "sonarqube.fullname" . }}-copy-plugins + defaultMode: 0755 + items: + - key: copy_plugins.sh + path: copy_plugins.sh - name: startup configMap: name: {{ template "sonarqube.fullname" . }}-startup diff --git a/stable/sonarqube/templates/install-plugins.yaml b/stable/sonarqube/templates/install-plugins.yaml index d09373580b2e..21bd53321fe9 100644 --- a/stable/sonarqube/templates/install-plugins.yaml +++ b/stable/sonarqube/templates/install-plugins.yaml @@ -9,7 +9,7 @@ metadata: heritage: {{ .Release.Service }} data: install_plugins.sh: |- - cd /opt/sonarqube/extensions/plugins + cd /opt/sonarqube/extensions/plugins/tmp {{- if .Values.plugins.install }} {{- range $index, $val := .Values.plugins.install }} wget {{ $val }} --no-check-certificate diff --git a/stable/sonarqube/values.yaml b/stable/sonarqube/values.yaml index 3618db07a6bb..681c49e3f43a 100755 --- a/stable/sonarqube/values.yaml +++ b/stable/sonarqube/values.yaml @@ -4,7 +4,7 @@ replicaCount: 1 image: repository: sonarqube - tag: 6.7.6-community + tag: 7.4-community # If using a private repository, the name of the imagePullSecret to use # pullSecret: my-repo-secret # Starting 6.7.6 and 7.4 official sonarqube docker image, command is not required