-
Notifications
You must be signed in to change notification settings - Fork 77
/
Copy pathJenkinsfile-k8s-gradle
43 lines (42 loc) · 1.02 KB
/
Jenkinsfile-k8s-gradle
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
pipeline {
agent {
kubernetes {
label 'gradle'
yaml """
apiVersion: v1
kind: Pod
spec:
containers:
- name: gradle
image: gradle:6.5.1
command:
- cat
tty: true
"""
}
}
stages {
stage("build") {
steps {
container("gradle") {
sh """
gradle clean check
"""
}
}
}
}
post {
always {
junit testResults: "**/test-results/test/TEST-*.xml"
recordIssues(
enabledForFailure: true,
qualityGates: [[threshold: 1, type: 'TOTAL', unstable: true]],
tools: [checkStyle(pattern: '**/build/reports/checkstyle/*.xml')]
)
//recordIssues enabledForFailure: true, tool: spotBugs()
//recordIssues enabledForFailure: true, tool: cpd(pattern: '**/target/cpd.xml')
//recordIssues enabledForFailure: true, tool: pmdParser(pattern: '**/target/pmd.xml')
}
}
}