[DO-1497] Add alpine podTemplate (#55)

[DO-1497]

Co-authored-by: Boris Shestov <boris.shestov@avroid.tech>
Reviewed-on: https://git.avroid.tech/DevOps/jenkins-shared-lib/pulls/55
Reviewed-by: Aleksandr Vodyanov <aleksandr.vodyanov@avroid.team>
This commit is contained in:
Boris Shestov
2025-01-20 18:34:00 +03:00
parent cd98e12b7d
commit 7b983d1c62

View File

@@ -272,6 +272,35 @@ class PodTemplates implements Serializable {
}
}
public void alpine(imageVersion='3.18.5', body) {
this.script.podTemplate(
cloud: this.cloud,
imagePullSecrets: this.dockerCreds,
containers: [
this.script.containerTemplate(
alwaysPullImage: true,
name: 'alpine',
image: "${this.registry}/docker-hub-proxy/library/alpine:${imageVersion}",
ttyEnabled: true,
command: "cat",
resourceRequestCpu: '100m',
resourceRequestMemory: '64Mi',
resourceLimitCpu: '100m',
resourceLimitMemory: '64Mi',
),
],
showRawYaml: false,
volumes: [
this.script.emptyDirVolume(memory: false, mountPath: '/tmp'),
],
workspaceVolume: this.script.emptyDirWorkspaceVolume(false),
)
{
body.call()
}
}
public void containerAurora(imageVersion='5.1.0.100-2', body) {
this.script.podTemplate(
runAsUser: "1000",
@@ -307,4 +336,5 @@ class PodTemplates implements Serializable {
body.call()
}
}
}