[DO-674] Add pod template for sonarqube (!65)
Co-authored-by: Denis Patrakeev <denis.patrakeev@avroid.team> Reviewed-on: https://git.avroid.tech/DevOps/jenkins-shared-lib/pulls/65 Reviewed-by: Denis Patrakeev <denis.patrakeev@avroid.team> Co-authored-by: Dmitrij Prokov <dmitrij.prokov@avroid.team> Co-committed-by: Dmitrij Prokov <dmitrij.prokov@avroid.team>
This commit is contained in:
committed by
Denis Patrakeev
parent
80f3b8bedb
commit
8a094da52f
@@ -463,4 +463,33 @@ class PodTemplates implements Serializable {
|
|||||||
body.call()
|
body.call()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void sonarQube(imageVersion='11.2', body) {
|
||||||
|
this.script.podTemplate(
|
||||||
|
cloud: this.cloud,
|
||||||
|
imagePullSecrets: this.dockerCreds,
|
||||||
|
containers: [
|
||||||
|
this.script.containerTemplate(
|
||||||
|
alwaysPullImage: true,
|
||||||
|
name: 'sonar-scanner-cli',
|
||||||
|
image: "${this.registry}/docker-hub-proxy/sonar-scanner-cli:${imageVersion}",
|
||||||
|
ttyEnabled: true,
|
||||||
|
command: "cat",
|
||||||
|
resourceRequestCpu: '5',
|
||||||
|
resourceRequestMemory: '10Gi',
|
||||||
|
resourceLimitCpu: '7',
|
||||||
|
resourceLimitMemory: '16Gi',
|
||||||
|
),
|
||||||
|
],
|
||||||
|
showRawYaml: false,
|
||||||
|
volumes: [
|
||||||
|
this.script.emptyDirVolume(memory: false, mountPath: '/tmp'),
|
||||||
|
],
|
||||||
|
workspaceVolume: this.script.emptyDirWorkspaceVolume(false),
|
||||||
|
)
|
||||||
|
|
||||||
|
{
|
||||||
|
body.call()
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user