|
| 1 | +1. Get your '{{ .Values.master.adminUser }}' user password by running: |
| 2 | + printf $(kubectl get secret --namespace {{ template "jenkins.namespace" . }} {{ template "jenkins.fullname" . }} -o jsonpath="{.data.jenkins-admin-password}" | base64 --decode);echo |
| 3 | + |
| 4 | +{{- if .Values.master.ingress.hostName }} |
| 5 | + |
| 6 | +2. Visit http://{{ .Values.master.ingress.hostName }} |
| 7 | +{{- else }} |
| 8 | +2. Get the Jenkins URL to visit by running these commands in the same shell: |
| 9 | +{{- if contains "NodePort" .Values.master.serviceType }} |
| 10 | + export NODE_PORT=$(kubectl get --namespace {{ template "jenkins.namespace" . }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ template "jenkins.fullname" . }}) |
| 11 | + export NODE_IP=$(kubectl get nodes --namespace {{ template "jenkins.namespace" . }} -o jsonpath="{.items[0].status.addresses[0].address}") |
| 12 | + echo http://$NODE_IP:$NODE_PORT/login |
| 13 | + |
| 14 | +{{- else if contains "LoadBalancer" .Values.master.serviceType }} |
| 15 | + NOTE: It may take a few minutes for the LoadBalancer IP to be available. |
| 16 | + You can watch the status of by running 'kubectl get svc --namespace {{ template "jenkins.namespace" . }} -w {{ template "jenkins.fullname" . }}' |
| 17 | + export SERVICE_IP=$(kubectl get svc --namespace {{ template "jenkins.namespace" . }} {{ template "jenkins.fullname" . }} --template "{{ "{{ range (index .status.loadBalancer.ingress 0) }}{{ . }}{{ end }}" }}") |
| 18 | +{{- if .Values.master.httpsKeyStore.enable }} |
| 19 | + echo https://$SERVICE_IP:{{ .Values.master.servicePort }}/login |
| 20 | +{{- else }} |
| 21 | + echo http://$SERVICE_IP:{{ .Values.master.servicePort }}/login |
| 22 | +{{- end }} |
| 23 | + |
| 24 | +{{- else if contains "ClusterIP" .Values.master.serviceType }} |
| 25 | + export POD_NAME=$(kubectl get pods --namespace {{ template "jenkins.namespace" . }} -l "app.kubernetes.io/component={{ .Values.master.componentName }}" -l "app.kubernetes.io/instance={{ .Release.Name }}" -o jsonpath="{.items[0].metadata.name}") |
| 26 | + echo http://127.0.0.1:{{ .Values.master.servicePort }} |
| 27 | + kubectl --namespace {{ template "jenkins.namespace" . }} port-forward $POD_NAME {{ .Values.master.servicePort }}:{{ .Values.master.servicePort }} |
| 28 | + |
| 29 | +{{- end }} |
| 30 | +{{- end }} |
| 31 | + |
| 32 | +3. Login with the password from step 1 and the username: {{ .Values.master.adminUser }} |
| 33 | +{{ if .Values.master.JCasC.enabled }} |
| 34 | +4. Use Jenkins Configuration as Code by specifying configScripts in your values.yaml file, see documentation: http://{{ .Values.master.ingress.hostName }}/configuration-as-code and examples: https://github.com/jenkinsci/configuration-as-code-plugin/tree/master/demos |
| 35 | +{{- end }} |
| 36 | + |
| 37 | +For more information on running Jenkins on Kubernetes, visit: |
| 38 | +https://cloud.google.com/solutions/jenkins-on-container-engine |
| 39 | +{{- if .Values.master.JCasC.enabled }} |
| 40 | +For more information about Jenkins Configuration as Code, visit: |
| 41 | +https://jenkins.io/projects/jcasc/ |
| 42 | +{{- end }} |
| 43 | + |
| 44 | +{{- if .Values.persistence.enabled }} |
| 45 | +{{- else }} |
| 46 | +################################################################################# |
| 47 | +###### WARNING: Persistence is disabled!!! You will lose your data when ##### |
| 48 | +###### the Jenkins pod is terminated. ##### |
| 49 | +################################################################################# |
| 50 | +{{- end }} |
| 51 | + |
| 52 | +{{- if .Values.master.imageTag }} |
| 53 | +################################################################################# |
| 54 | +###### WARNING: `master.imageTag` will be obsoleted soon!!! ##### |
| 55 | +###### It has been renamed to `master.tag`. ##### |
| 56 | +################################################################################# |
| 57 | +{{- end }} |
| 58 | + |
| 59 | +{{- if .Values.agent.imageTag }} |
| 60 | +################################################################################# |
| 61 | +###### WARNING: `agent.imageTag` will be obsoleted soon!!! ##### |
| 62 | +###### It has been renamed to `agent.tag`. ##### |
| 63 | +################################################################################# |
| 64 | +{{- end }} |
0 commit comments