Formal Models pod update (#59)

Co-authored-by: aleksandr.vodyanov <aleksandr.vodyanov@avroid.tech>
Reviewed-on: https://git.avroid.tech/DevOps/jenkins-shared-lib/pulls/59
This commit is contained in:
Aleksandr Vodyanov
2025-01-27 11:54:56 +03:00
parent 6ca21661e4
commit b1fd950061
2 changed files with 30 additions and 24 deletions

View File

@@ -337,4 +337,34 @@ class PodTemplates implements Serializable {
}
}
public void jsNative(imageVersion='1.2', body) {
this.script.podTemplate(
cloud: this.cloud,
imagePullSecrets: this.dockerCreds,
containers: [
this.script.containerTemplate(
alwaysPullImage: true,
name: 'linux',
privileged: true,
image: "${this.registry}/formal-models/jsn-build-linux:${imageVersion}",
ttyEnabled: true,
command: "cat",
resourceRequestCpu: '30',
resourceRequestMemory: '64Gi',
resourceLimitCpu: '30',
resourceLimitMemory: '128Gi',
),
],
showRawYaml: false,
volumes: [
this.script.emptyDirVolume(memory: false, mountPath: '/tmp'),
],
workspaceVolume: this.script.emptyDirWorkspaceVolume(false),
)
{
body.call()
}
}
}

View File

@@ -20,28 +20,6 @@ Object alpineTemplate = """
memory: 64Mi
"""
Object jsNativeBuildTemplate = """
apiVersion: v1
kind: Pod
spec:
containers:
- name: linux
image: ${env.JENKINS_DOCKER_REGISTRY}/formal-models/jsn-build-linux:1.0
command:
- sleep
args:
- 99d
resources:
limits:
cpu: 30
memory: 128Gi
requests:
cpu: 30
memory: 128Gi
imagePullSecrets:
- name: ${env.JENKINS_K8S_HARBOR_SECRET}
"""
Object tavroAuroraV4Template = """
apiVersion: v1
kind: Pod
@@ -347,7 +325,5 @@ Object pythonBuildTemplate = """
return flatpakTemplate
case 'pythonBuild':
return pythonBuildTemplate
case 'jsNative':
return jsNativeBuildTemplate
}
}