migrate(jenkins): Migrate to new common (#12473)

**Description**
<!--
Please include a summary of the change and which issue is fixed. Please
also include relevant motivation and context. List any dependencies that
are required for this change.
-->
⚒️ Fixes  # <!--(issue)-->

**⚙️ Type of change**

- [ ] ⚙️ Feature/App addition
- [ ] 🪛 Bugfix
- [ ] ⚠️ Breaking change (fix or feature that would cause existing
functionality to not work as expected)
- [ ] 🔃 Refactor of current code

**🧪 How Has This Been Tested?**
<!--
Please describe the tests that you ran to verify your changes. Provide
instructions so we can reproduce. Please also list any relevant details
for your test configuration
-->

**📃 Notes:**
<!-- Please enter any other relevant information here -->

**✔️ Checklist:**

- [ ] ⚖️ My code follows the style guidelines of this project
- [ ] 👀 I have performed a self-review of my own code
- [ ] #️⃣ I have commented my code, particularly in hard-to-understand
areas
- [ ] 📄 I have made corresponding changes to the documentation
- [ ] ⚠️ My changes generate no new warnings
- [ ] 🧪 I have added tests to this description that prove my fix is
effective or that my feature works
- [ ] ⬆️ I increased versions for any altered app according to semantic
versioning

** App addition**

If this PR is an app addition please make sure you have done the
following.

- [ ] 🪞 I have opened a PR on
[truecharts/containers](https://github.com/truecharts/containers) adding
the container to TrueCharts mirror repo.
- [ ] 🖼️ I have added an icon in the Chart's root directory called
`icon.png`

---

_Please don't blindly check all the boxes. Read them and only check
those that apply.
Those checkboxes are there for the reviewer to see what is this all
about and
the status of this PR with a quick glance._

---------

Signed-off-by: StevenMcElligott <89483932+StevenMcElligott@users.noreply.github.com>
Signed-off-by: Stavros Kois <47820033+stavros-k@users.noreply.github.com>
Co-authored-by: Xstar97TheNoob <9399967+xstar97@users.noreply.github.com>
Co-authored-by: Stavros Kois <47820033+stavros-k@users.noreply.github.com>
This commit is contained in:
StevenMcElligott
2023-09-17 14:13:19 -04:00
committed by GitHub
co-authored by Xstar97TheNoob Stavros Kois
parent db811db831
commit dca8f5b145
6 changed files with 53 additions and 52 deletions
+4 -3
View File
@@ -1,9 +1,9 @@
apiVersion: v2 apiVersion: v2
appVersion: "2.392.0" appVersion: "2.422.0"
dependencies: dependencies:
- name: common - name: common
repository: https://library-charts.truecharts.org repository: https://library-charts.truecharts.org
version: 11.1.2 version: 14.0.1
deprecated: false deprecated: false
description: The gold standard in devops tools for running CI/CD pipelines. description: The gold standard in devops tools for running CI/CD pipelines.
home: https://truecharts.org/charts/incubator/jenkins home: https://truecharts.org/charts/incubator/jenkins
@@ -19,8 +19,9 @@ maintainers:
name: jenkins name: jenkins
sources: sources:
- https://github.com/truecharts/charts/tree/master/charts/incubator/jenkins - https://github.com/truecharts/charts/tree/master/charts/incubator/jenkins
- https://github.com/jenkinsci/docker
type: application type: application
version: 3.0.15 version: 4.0.0
annotations: annotations:
truecharts.org/catagories: | truecharts.org/catagories: |
- productivity - productivity
+4 -6
View File
@@ -146,16 +146,15 @@ questions:
# Include{ingressAdvanced} # Include{ingressAdvanced}
# Include{ingressList} # Include{ingressList}
# Include{securityContextRoot} # Include{securityContextRoot}
- variable: runAsUser - variable: runAsUser
label: runAsUser label: "runAsUser"
description: The UserID of the user running the application description: "The UserID of the user running the application"
schema: schema:
type: int type: int
default: 1000 default: 1000
- variable: runAsGroup - variable: runAsGroup
label: runAsGroup label: "runAsGroup"
description: The groupID this App of the user running the application description: "The groupID of the user running the application"
schema: schema:
type: int type: int
default: 1000 default: 1000
@@ -168,7 +167,6 @@ questions:
schema: schema:
type: int type: int
default: 1000 default: 1000
# Include{resources} # Include{resources}
# Include{advanced} # Include{advanced}
# Include{addons} # Include{addons}
@@ -0,0 +1 @@
{{- include "tc.v1.common.lib.chart.notes" $ -}}
+2 -10
View File
@@ -1,15 +1,7 @@
{{/* Define the secret */}} {{/* Define the secret */}}
{{- define "jenkins.secret" -}} {{- define "jenkins.secret" -}}
enabled: true
{{- $secretName := printf "%s-secret" (include "tc.common.names.fullname" .) -}} data:
---
apiVersion: v1
kind: Secret
metadata:
name: {{ $secretName }}
labels:
{{- include "tc.common.labels" . | nindent 4 }}
stringData:
JAVA_OPTS: {{ join " " (include "java.opts" . | fromYaml).opts | quote }} JAVA_OPTS: {{ join " " (include "java.opts" . | fromYaml).opts | quote }}
JENKINS_OPTS: {{ join " " (include "jenkins.opts" . | fromYaml).opts | quote }} JENKINS_OPTS: {{ join " " (include "jenkins.opts" . | fromYaml).opts | quote }}
JENKINS_JAVA_OPTS: {{ join " " (include "jenkins.java.opts" . | fromYaml).opts | quote }} JENKINS_JAVA_OPTS: {{ join " " (include "jenkins.java.opts" . | fromYaml).opts | quote }}
@@ -1,8 +1,11 @@
{{/* Make sure all variables are set properly */}} {{/* Make sure all variables are set properly */}}
{{- include "tc.common.loader.init" . }} {{- include "tc.v1.common.loader.init" . }}
{{/* Render secret */}} {{/* Render secrets for jenkins */}}
{{- include "jenkins.secret" . }} {{- $secret := include "jenkins.secret" . | fromYaml -}}
{{- if $secret -}}
{{- $_ := set .Values.secret "jenkins-secret" $secret -}}
{{- end -}}
{{/* Render the templates */}} {{/* Render the templates */}}
{{ include "tc.common.loader.apply" . }} {{ include "tc.v1.common.loader.apply" . }}
+18 -12
View File
@@ -1,11 +1,13 @@
image: image:
repository: tccr.io/truecharts/jenkins repository: tccr.io/truecharts/jenkins
pullPolicy: IfNotPresent pullPolicy: IfNotPresent
tag: 2.392.0@sha256:362ac8a36b4a1d603a0bce6e5c35097b33d6aae0544ba1cef8f300d2788dd09b tag: 2.422.0@sha256:c046d180b498bbeab33fbcd0900ef14bcd4272fc85350f5cbdfa19b5ac45e283
podSecurityContext: security:
container:
runAsGroup: 1000 runAsGroup: 1000
runAsUser: 1000 runAsUser: 1000
pod:
fsGroup: 1000 fsGroup: 1000
# securityContext: # securityContext:
@@ -18,26 +20,29 @@ jenkins:
plugins_force_upgrade: false plugins_force_upgrade: false
upgrade_if_no_marker: false upgrade_if_no_marker: false
envFrom: workload:
- secretRef: main:
name: '{{ include "tc.common.names.fullname" . }}-secret' podSpec:
containers:
probes: main:
probes:
liveness: liveness:
type: HTTP type: http
path: /login path: /login
readiness: readiness:
type: HTTP type: http
path: /login path: /login
startup: startup:
type: HTTP type: tcp
path: /login envFrom:
- secretRef:
name: 'jenkins-secret'
service: service:
main: main:
ports: ports:
main: main:
protocol: HTTP protocol: http
port: 10280 port: 10280
agent: agent:
enabled: true enabled: true
@@ -52,4 +57,5 @@ persistence:
mountPath: /var/jenkins_home mountPath: /var/jenkins_home
portal: portal:
open:
enabled: true enabled: true