-
Notifications
You must be signed in to change notification settings - Fork 0
/
Jenkinsfile
48 lines (48 loc) · 1.75 KB
/
Jenkinsfile
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
44
45
46
47
48
pipeline {
agent any
triggers {
pollSCM 'H 6 * * *'
}
options {
buildDiscarder(logRotator(numToKeepStr: '100', artifactNumToKeepStr: '1'))
disableConcurrentBuilds()
timestamps()
timeout(time: 1, unit: 'HOURS')
skipDefaultCheckout true
}
tools {
jdk 'openjdk-1.8'
maven 'apache-maven-3.6.3'
}
stages {
stage('checkout') {
steps {
checkout([$class: 'GitSCM',
branches: [[name: '*/master']],
extensions: [],
userRemoteConfigs: [[url: 'https://github.com/Wetator/wetator-jenkins-plugin.git']]])
}
}
stage('build') {
steps {
sh "mvn -B clean install"
}
}
}
post {
always {
junit allowEmptyResults: true, testResults: 'target/surefire-reports/*.xml'
recordIssues enabledForFailure: true, sourceCodeEncoding: 'UTF-8', sourceDirectory: 'src', tools: [
spotBugs(reportEncoding: 'UTF-8', useRankAsPriority: true),
pmdParser(reportEncoding: 'UTF-8'),
cpd(reportEncoding: 'UTF-8'),
java(),
javaDoc(),
taskScanner(includePattern: '**/*.java, **/*.xhtml, **/*.jsp, **/*.html, **/*.js, **/*.css, **/*.xml, **/*.wet, **/*.properties', highTags: 'FIXME, XXX', normalTags: 'TODO')]
archiveArtifacts artifacts: 'target/wetator-jenkins-plugin*.hpi', allowEmptyArchive: true, fingerprint: true
step([$class: 'Mailer',
notifyEveryUnstableBuild: true,
recipients: "[email protected]"])
}
}
}