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:
@@ -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()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -20,28 +20,6 @@ Object alpineTemplate = """
|
|||||||
memory: 64Mi
|
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 = """
|
Object tavroAuroraV4Template = """
|
||||||
apiVersion: v1
|
apiVersion: v1
|
||||||
kind: Pod
|
kind: Pod
|
||||||
@@ -347,7 +325,5 @@ Object pythonBuildTemplate = """
|
|||||||
return flatpakTemplate
|
return flatpakTemplate
|
||||||
case 'pythonBuild':
|
case 'pythonBuild':
|
||||||
return pythonBuildTemplate
|
return pythonBuildTemplate
|
||||||
case 'jsNative':
|
|
||||||
return jsNativeBuildTemplate
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user