mirror of
https://github.com/helm/charts.git
synced 2026-08-23 22:37:45 +00:00
extracted "jenkins.url" into template (#16347)
This way we can re-use the logic when configuring the URL via JCasC or when we need the URL somewhere else. Signed-off-by: Torsten Walter <mail@torstenwalter.de>
This commit is contained in:
committed by
Kubernetes Prow Robot
parent
23399f8428
commit
f2fdf5332e
@@ -1,7 +1,7 @@
|
||||
apiVersion: v1
|
||||
name: jenkins
|
||||
home: https://jenkins.io/
|
||||
version: 1.5.2
|
||||
version: 1.5.3
|
||||
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
|
||||
|
||||
@@ -48,6 +48,25 @@ If release name contains chart name it will be used as a full name.
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Returns the Jenkins URL
|
||||
*/}}
|
||||
{{- define "jenkins.url" -}}
|
||||
{{- if .Values.master.jenkinsUrl }}
|
||||
{{- .Values.master.jenkinsUrl }}
|
||||
{{- else }}
|
||||
{{- if .Values.master.ingress.hostName }}
|
||||
{{- if .Values.master.ingress.tls }}
|
||||
{{- default "https" .Values.master.jenkinsUrlProtocol }}://{{ .Values.master.ingress.hostName }}{{ default "" .Values.master.jenkinsUriPrefix }}
|
||||
{{- else }}
|
||||
{{- default "http" .Values.master.jenkinsUrlProtocol }}://{{ .Values.master.ingress.hostName }}{{ default "" .Values.master.jenkinsUriPrefix }}
|
||||
{{- end }}
|
||||
{{- else }}
|
||||
{{- default "http" .Values.master.jenkinsUrlProtocol }}://{{ template "jenkins.fullname" . }}:{{.Values.master.servicePort}}{{ default "" .Values.master.jenkinsUriPrefix }}
|
||||
{{- end}}
|
||||
{{- end}}
|
||||
{{- end -}}
|
||||
|
||||
{{- define "jenkins.kubernetes-version" -}}
|
||||
{{- if .Values.master.installPlugins -}}
|
||||
{{- range .Values.master.installPlugins -}}
|
||||
|
||||
@@ -200,19 +200,7 @@ data:
|
||||
<?xml version='1.1' encoding='UTF-8'?>
|
||||
<jenkins.model.JenkinsLocationConfiguration>
|
||||
<adminAddress>{{ default "" .Values.master.jenkinsAdminEmail }}</adminAddress>
|
||||
{{- if .Values.master.jenkinsUrl }}
|
||||
<jenkinsUrl>{{ .Values.master.jenkinsUrl }}</jenkinsUrl>
|
||||
{{- else }}
|
||||
{{- if .Values.master.ingress.hostName }}
|
||||
{{- if .Values.master.ingress.tls }}
|
||||
<jenkinsUrl>{{ default "https" .Values.master.jenkinsUrlProtocol }}://{{ .Values.master.ingress.hostName }}{{ default "" .Values.master.jenkinsUriPrefix }}</jenkinsUrl>
|
||||
{{- else }}
|
||||
<jenkinsUrl>{{ default "http" .Values.master.jenkinsUrlProtocol }}://{{ .Values.master.ingress.hostName }}{{ default "" .Values.master.jenkinsUriPrefix }}</jenkinsUrl>
|
||||
{{- end }}
|
||||
{{- else }}
|
||||
<jenkinsUrl>{{ default "http" .Values.master.jenkinsUrlProtocol }}://{{ template "jenkins.fullname" . }}:{{.Values.master.servicePort}}{{ default "" .Values.master.jenkinsUriPrefix }}</jenkinsUrl>
|
||||
{{- end}}
|
||||
{{- end}}
|
||||
<jenkinsUrl>{{ template "jenkins.url" . }}</jenkinsUrl>
|
||||
</jenkins.model.JenkinsLocationConfiguration>
|
||||
jenkins.CLI.xml: |-
|
||||
<?xml version='1.1' encoding='UTF-8'?>
|
||||
|
||||
Reference in New Issue
Block a user