[DO-416] tavro svace analyze (#17)
Reviewed-on: https://git.avroid.tech/DevOps/jenkins-shared-lib/pulls/17 Co-authored-by: aleksandr.vodyanov <aleksandr.vodyanov@avroid.tech> Co-committed-by: aleksandr.vodyanov <aleksandr.vodyanov@avroid.tech>
This commit is contained in:
committed by
Aleksandr Vodyanov
parent
4517589bdd
commit
040453bd90
@@ -113,8 +113,10 @@ class Nexus implements Serializable {
|
|||||||
url: url,
|
url: url,
|
||||||
authentication: this.credentials,
|
authentication: this.credentials,
|
||||||
httpMode: "GET",
|
httpMode: "GET",
|
||||||
quiet: true,
|
outputFile: artifact,
|
||||||
outputFile: artifact
|
contentType: 'APPLICATION_JSON',
|
||||||
|
acceptType: 'APPLICATION_JSON',
|
||||||
|
responseHandle: 'NONE'
|
||||||
)
|
)
|
||||||
|
|
||||||
return artifact
|
return artifact
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ Object alpineTemplate = """
|
|||||||
memory: 64Mi
|
memory: 64Mi
|
||||||
"""
|
"""
|
||||||
|
|
||||||
Object auroraV4Template = """
|
Object tavroAuroraV4Template = """
|
||||||
apiVersion: v1
|
apiVersion: v1
|
||||||
kind: Pod
|
kind: Pod
|
||||||
metadata:
|
metadata:
|
||||||
@@ -29,7 +29,7 @@ Object auroraV4Template = """
|
|||||||
spec:
|
spec:
|
||||||
containers:
|
containers:
|
||||||
- name: aurora
|
- name: aurora
|
||||||
image: ${env.JENKINS_DOCKER_REGISTRY}/devops/build-aurora-image:4.0.2.249-2
|
image: ${env.JENKINS_DOCKER_REGISTRY}/tavro/tavro-build-aurora:4.0.2.249
|
||||||
securityContext:
|
securityContext:
|
||||||
runAsUser: 1000
|
runAsUser: 1000
|
||||||
runAsGroup: 1000
|
runAsGroup: 1000
|
||||||
@@ -52,6 +52,38 @@ Object auroraV4Template = """
|
|||||||
- name: ${env.JENKINS_K8S_HARBOR_SECRET}
|
- name: ${env.JENKINS_K8S_HARBOR_SECRET}
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
Object tavroAuroraV5Template = """
|
||||||
|
apiVersion: v1
|
||||||
|
kind: Pod
|
||||||
|
metadata:
|
||||||
|
annotations:
|
||||||
|
container.apparmor.security.beta.kubernetes.io/aurora: unconfined
|
||||||
|
spec:
|
||||||
|
containers:
|
||||||
|
- name: aurora
|
||||||
|
image: ${env.JENKINS_DOCKER_REGISTRY}/tavro/tavro-build-aurora:5.0.0.60
|
||||||
|
securityContext:
|
||||||
|
runAsUser: 1000
|
||||||
|
runAsGroup: 1000
|
||||||
|
capabilities:
|
||||||
|
add:
|
||||||
|
- SYS_ADMIN
|
||||||
|
tty: true
|
||||||
|
resources:
|
||||||
|
limits:
|
||||||
|
cpu: 15
|
||||||
|
memory: 32Gi
|
||||||
|
requests:
|
||||||
|
cpu: 15
|
||||||
|
memory: 32Gi
|
||||||
|
volumeMounts:
|
||||||
|
- mountPath: ${global.AURORA_CUSTOM_WORKSPACE} # Because home path removed within chroot
|
||||||
|
name: "workspace-volume"
|
||||||
|
ttyEnabled: true
|
||||||
|
imagePullSecrets:
|
||||||
|
- name: ${env.JENKINS_K8S_HARBOR_SECRET}
|
||||||
|
"""
|
||||||
|
|
||||||
Object containerAuroraTemplate = """
|
Object containerAuroraTemplate = """
|
||||||
apiVersion: v1
|
apiVersion: v1
|
||||||
kind: Pod
|
kind: Pod
|
||||||
@@ -109,14 +141,40 @@ Object sonarCubeScannerTemplate = """
|
|||||||
name: "workspace-volume"
|
name: "workspace-volume"
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
Object tavroLinuxTemplate = """
|
||||||
|
apiVersion: v1
|
||||||
|
kind: Pod
|
||||||
|
spec:
|
||||||
|
containers:
|
||||||
|
- name: linux
|
||||||
|
image: ${env.JENKINS_DOCKER_REGISTRY}/tavro/tavro-build-linux:0.2
|
||||||
|
command:
|
||||||
|
- sleep
|
||||||
|
args:
|
||||||
|
- 99d
|
||||||
|
resources:
|
||||||
|
limits:
|
||||||
|
cpu: 7
|
||||||
|
memory: 16Gi
|
||||||
|
requests:
|
||||||
|
cpu: 7
|
||||||
|
memory: 4Gi
|
||||||
|
imagePullSecrets:
|
||||||
|
- name: ${env.JENKINS_K8S_HARBOR_SECRET}
|
||||||
|
"""
|
||||||
|
|
||||||
switch (podTemplateName) {
|
switch (podTemplateName) {
|
||||||
case 'alpine':
|
case 'alpine':
|
||||||
return alpineTemplate
|
return alpineTemplate
|
||||||
case 'auroraV4':
|
case 'tavroAuroraV4':
|
||||||
return auroraV4Template
|
return tavroAuroraV4Template
|
||||||
|
case 'tavroAuroraV5':
|
||||||
|
return tavroAuroraV5Template
|
||||||
case 'containerAurora':
|
case 'containerAurora':
|
||||||
return containerAuroraTemplate
|
return containerAuroraTemplate
|
||||||
case "sonarCubeScanner":
|
case "sonarCubeScanner":
|
||||||
return sonarCubeScannerTemplate
|
return sonarCubeScannerTemplate
|
||||||
|
case 'tavroLinux':
|
||||||
|
return tavroLinuxTemplate
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user