[DO-1373] refactoring_pod_templates (#48)
Co-authored-by: Rustam Tagaev <rustam.tagaev@avroid.tech> Reviewed-on: https://git.avroid.tech/DevOps/jenkins-shared-lib/pulls/48
This commit is contained in:
@@ -20,13 +20,13 @@ class PodTemplates implements Serializable {
|
||||
"""
|
||||
}
|
||||
|
||||
public void jnlp(body) {
|
||||
public void jnlp(imageVersion='jdk17', body) {
|
||||
this.script.podTemplate(
|
||||
containers: [
|
||||
this.script.containerTemplate(
|
||||
alwaysPullImage: true,
|
||||
name: 'jnlp',
|
||||
image: "${this.registry}/docker-hub-proxy/jenkins/inbound-agent:jdk17",
|
||||
image: "${this.registry}/docker-hub-proxy/jenkins/inbound-agent:${imageVersion}",
|
||||
envVars: [
|
||||
this.script.containerEnvVar(key: 'HOME', value: '/home/jenkins'),
|
||||
],
|
||||
@@ -56,14 +56,14 @@ class PodTemplates implements Serializable {
|
||||
}
|
||||
}
|
||||
|
||||
public void poetry(body) {
|
||||
public void poetry(imageVersion='1.8.4', body) {
|
||||
this.script.podTemplate(
|
||||
imagePullSecrets: this.dockerCreds,
|
||||
containers: [
|
||||
this.script.containerTemplate(
|
||||
alwaysPullImage: true,
|
||||
name: 'poetry',
|
||||
image: "${this.registry}/devops/poetry:1.8.4",
|
||||
image: "${this.registry}/devops/poetry:${imageVersion}",
|
||||
envVars: [
|
||||
this.script.containerEnvVar(key: 'HOME', value: '/home/jenkins'),
|
||||
],
|
||||
@@ -91,14 +91,14 @@ class PodTemplates implements Serializable {
|
||||
}
|
||||
}
|
||||
|
||||
public void docker(body) {
|
||||
public void docker(imageVersion='27.3.1-dind',body) {
|
||||
this.script.podTemplate(
|
||||
imagePullSecrets: this.dockerCreds,
|
||||
containers: [
|
||||
this.script.containerTemplate(
|
||||
alwaysPullImage: true,
|
||||
name: 'docker',
|
||||
image: "${registry}/docker-hub-proxy/docker:27.3.1-dind",
|
||||
image: "${registry}/docker-hub-proxy/docker:${imageVersion}",
|
||||
envVars: [
|
||||
this.script.containerEnvVar(key: 'HOME', value: '/home/jenkins'),
|
||||
],
|
||||
|
||||
Reference in New Issue
Block a user