only install casc support plugin when needed (#14862)

The latest released version of the configuration
as code support plugin is 1.19 for newer versions
of the configuration as code plugin it's no longer
needed. Using semver compare to check for this condition.

Signed-off-by: Torsten Walter <mail@torstenwalter.de>
This commit is contained in:
Torsten Walter
2019-06-17 12:49:50 -07:00
committed by Kubernetes Prow Robot
parent f8a6ecb0f1
commit a56fc05409
3 changed files with 8 additions and 4 deletions
+1 -1
View File
@@ -1,7 +1,7 @@
apiVersion: v1
name: jenkins
home: https://jenkins.io/
version: 1.2.2
version: 1.3.0
appVersion: lts
description: Open source continuous integration server. It supports multiple SCM tools
including CVS, Subversion and Git. It can execute Apache Ant and Apache Maven-based
+3 -1
View File
@@ -323,8 +323,10 @@ data:
{{- if not (contains "configuration-as-code" (quote .Values.master.installPlugins)) }}
configuration-as-code:{{ .Values.master.JCasC.pluginVersion }}
{{- end }}
{{- if not (contains "configuration-as-code-support" (quote .Values.master.installPlugins)) }}
{{- if semverCompare "<=1.19" (printf "%v" .Values.master.JCasC.pluginVersion) }}
{{- if not (contains "configuration-as-code-support" (quote .Values.master.installPlugins)) }}
configuration-as-code-support:{{ .Values.master.JCasC.supportPluginVersion }}
{{- end }}
{{- end }}
{{- end }}
{{- end }}
+4 -2
View File
@@ -194,8 +194,10 @@ master:
# etc. Best reference is https://<jenkins_url>/configuration-as-code/reference. The example below creates a welcome message:
JCasC:
enabled: false
pluginVersion: 1.5
supportPluginVersion: 1.5
pluginVersion: 1.19
# it's only used when plugin version is <=1.18 for later version the
# configuration as code support plugin is no longer needed
supportPluginVersion: 1.19
configScripts:
welcome-message: |
jenkins: