Skip to content

Commit

Permalink
[I/Y/P-Builds] Simplify Kubernetes pod definitions
Browse files Browse the repository at this point in the history
Inherit most of the configuration from the centos-8 pod-template.

Co-authored-by: Sébastien Heurtematte <[email protected]>
  • Loading branch information
HannesWell and heurtematte committed Jun 25, 2024
1 parent 13b52a1 commit d1baf6f
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 221 deletions.
76 changes: 1 addition & 75 deletions JenkinsJobs/Builds/I_build.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,6 @@ for (STREAM in STREAMS){
# Post M1, no nightlies, I-builds only. (Be sure to "turn off" for tests and sign off days)
#0 6 16-28 8 5-7,1-3
#0 18 16-28 8 5-7,1-3
""")
}
}
Expand Down Expand Up @@ -58,91 +55,20 @@ pipeline {
}
agent {
kubernetes {
label 'aggrbuild-pod'
inheritFrom 'centos-8'
yaml """
apiVersion: v1
kind: Pod
spec:
containers:
- name: "jnlp"
image: "eclipsecbi/jiro-agent-centos-8:latest"
imagePullPolicy: "Always"
resources:
limits:
memory: "8192Mi"
cpu: "4000m"
requests:
memory: "6144Mi"
cpu: "2000m"
securityContext:
privileged: false
tty: true
volumeMounts:
- mountPath: "/home/jenkins/agent"
name: "workspace-volume"
readOnly: false
- mountPath: "/home/jenkins/.m2/toolchains.xml"
name: "toolchains-xml"
readOnly: true
subPath: "toolchains.xml"
- mountPath: "/opt/tools"
name: "volume-0"
readOnly: false
- mountPath: "/home/jenkins"
name: "volume-2"
readOnly: false
- mountPath: "/home/jenkins/.m2/repository"
name: "volume-3"
readOnly: false
- mountPath: "/home/jenkins/.m2/settings-security.xml"
name: "settings-security-xml"
readOnly: true
subPath: "settings-security.xml"
- mountPath: "/home/jenkins/.m2/settings.xml"
name: "settings-xml"
readOnly: true
subPath: "settings.xml"
- mountPath: "/home/jenkins/.ssh"
name: "volume-1"
readOnly: false
workingDir: "/home/jenkins/agent"
nodeSelector: {}
restartPolicy: "Never"
volumes:
- name: "settings-security-xml"
secret:
items:
- key: "settings-security.xml"
path: "settings-security.xml"
secretName: "m2-secret-dir"
- name: "volume-0"
persistentVolumeClaim:
claimName: "tools-claim-jiro-releng"
readOnly: true
- configMap:
items:
- key: "toolchains.xml"
path: "toolchains.xml"
name: "m2-dir"
name: "toolchains-xml"
- emptyDir:
medium: ""
name: "volume-2"
- configMap:
name: "known-hosts"
name: "volume-1"
- name: "settings-xml"
secret:
items:
- key: "settings.xml"
path: "settings.xml"
secretName: "m2-secret-dir"
- emptyDir:
medium: ""
name: "workspace-volume"
- emptyDir:
medium: ""
name: "volume-3"
"""
}
}
Expand Down
74 changes: 1 addition & 73 deletions JenkinsJobs/YBuilds/P_build.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -32,92 +32,20 @@ pipeline {
}
agent {
kubernetes {
label 'aggrbuild-pod'
defaultContainer 'container'
inheritFrom 'centos-8'
yaml """
apiVersion: v1
kind: Pod
spec:
containers:
- name: "jnlp"
image: "eclipsecbi/jiro-agent-centos-8:latest"
imagePullPolicy: "Always"
resources:
limits:
memory: "8192Mi"
cpu: "4000m"
requests:
memory: "6144Mi"
cpu: "2000m"
securityContext:
privileged: false
tty: true
volumeMounts:
- mountPath: "/home/jenkins/agent"
name: "workspace-volume"
readOnly: false
- mountPath: "/home/jenkins/.m2/toolchains.xml"
name: "toolchains-xml"
readOnly: true
subPath: "toolchains.xml"
- mountPath: "/opt/tools"
name: "volume-0"
readOnly: false
- mountPath: "/home/jenkins"
name: "volume-2"
readOnly: false
- mountPath: "/home/jenkins/.m2/repository"
name: "volume-3"
readOnly: false
- mountPath: "/home/jenkins/.m2/settings-security.xml"
name: "settings-security-xml"
readOnly: true
subPath: "settings-security.xml"
- mountPath: "/home/jenkins/.m2/settings.xml"
name: "settings-xml"
readOnly: true
subPath: "settings.xml"
- mountPath: "/home/jenkins/.ssh"
name: "volume-1"
readOnly: false
workingDir: "/home/jenkins/agent"
nodeSelector: {}
restartPolicy: "Never"
volumes:
- name: "settings-security-xml"
secret:
items:
- key: "settings-security.xml"
path: "settings-security.xml"
secretName: "m2-secret-dir"
- name: "volume-0"
persistentVolumeClaim:
claimName: "tools-claim-jiro-releng"
readOnly: true
- configMap:
items:
- key: "toolchains.xml"
path: "toolchains.xml"
name: "m2-dir"
name: "toolchains-xml"
- emptyDir:
medium: ""
name: "volume-2"
- configMap:
name: "known-hosts"
name: "volume-1"
- name: "settings-xml"
secret:
items:
- key: "settings.xml"
path: "settings.xml"
secretName: "m2-secret-dir"
- emptyDir:
medium: ""
name: "workspace-volume"
- emptyDir:
medium: ""
name: "volume-3"
"""
}
}
Expand Down
74 changes: 1 addition & 73 deletions JenkinsJobs/YBuilds/Y_build.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -52,92 +52,20 @@ pipeline {
}
agent {
kubernetes {
label 'aggrbuild-pod'
defaultContainer 'container'
inheritFrom 'centos-8'
yaml """
apiVersion: v1
kind: Pod
spec:
containers:
- name: "jnlp"
image: "eclipsecbi/jiro-agent-centos-8:latest"
imagePullPolicy: "Always"
resources:
limits:
memory: "8192Mi"
cpu: "4000m"
requests:
memory: "6144Mi"
cpu: "2000m"
securityContext:
privileged: false
tty: true
volumeMounts:
- mountPath: "/home/jenkins/agent"
name: "workspace-volume"
readOnly: false
- mountPath: "/home/jenkins/.m2/toolchains.xml"
name: "toolchains-xml"
readOnly: true
subPath: "toolchains.xml"
- mountPath: "/opt/tools"
name: "volume-0"
readOnly: false
- mountPath: "/home/jenkins"
name: "volume-2"
readOnly: false
- mountPath: "/home/jenkins/.m2/repository"
name: "volume-3"
readOnly: false
- mountPath: "/home/jenkins/.m2/settings-security.xml"
name: "settings-security-xml"
readOnly: true
subPath: "settings-security.xml"
- mountPath: "/home/jenkins/.m2/settings.xml"
name: "settings-xml"
readOnly: true
subPath: "settings.xml"
- mountPath: "/home/jenkins/.ssh"
name: "volume-1"
readOnly: false
workingDir: "/home/jenkins/agent"
nodeSelector: {}
restartPolicy: "Never"
volumes:
- name: "settings-security-xml"
secret:
items:
- key: "settings-security.xml"
path: "settings-security.xml"
secretName: "m2-secret-dir"
- name: "volume-0"
persistentVolumeClaim:
claimName: "tools-claim-jiro-releng"
readOnly: true
- configMap:
items:
- key: "toolchains.xml"
path: "toolchains.xml"
name: "m2-dir"
name: "toolchains-xml"
- emptyDir:
medium: ""
name: "volume-2"
- configMap:
name: "known-hosts"
name: "volume-1"
- name: "settings-xml"
secret:
items:
- key: "settings.xml"
path: "settings.xml"
secretName: "m2-secret-dir"
- emptyDir:
medium: ""
name: "workspace-volume"
- emptyDir:
medium: ""
name: "volume-3"
"""
}
}
Expand Down

0 comments on commit d1baf6f

Please sign in to comment.