-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathJenkinsfile
51 lines (51 loc) · 2.07 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
49
50
51
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'
ant 'apache-ant-1.10.7'
}
stages {
stage('checkout') {
steps {
checkout([$class: 'GitSCM',
branches: [[name: '*/master']],
extensions: [],
userRemoteConfigs: [[url: 'https://github.com/Wetator/wetator-ant-task.git']]])
}
}
stage('build') {
steps {
wrap([$class: 'Xvfb']) {
sh "ant publish-local"
}
}
}
}
post {
always {
junit allowEmptyResults: true, testResults: 'deploy/junit/*.xml'
recordIssues enabledForFailure: true, sourceCodeEncoding: 'UTF-8', sourceDirectory: 'src', tools: [
checkStyle(pattern: 'deploy/checkstyle/checkstyle-report.xml', reportEncoding: 'UTF-8'),
spotBugs(pattern: 'deploy/spotbugs/spotbugs-report.xml', reportEncoding: 'UTF-8', useRankAsPriority: true),
pmdParser(pattern: 'deploy/pmd/pmd-report.xml', reportEncoding: 'UTF-8'),
cpd(pattern: 'deploy/pmd/cpd-report.xml', reportEncoding: 'UTF-8'),
java(),
javaDoc(),
taskScanner(includePattern: '**/*.java, **/*.xhtml, **/*.jsp, **/*.html, **/*.js, **/*.css, **/*.xml, **/*.wet, **/*.properties', highTags: 'FIXME, XXX', normalTags: 'TODO')]
archiveArtifacts artifacts: 'deploy/wetator-*.zip, deploy/wetator-*.jar', allowEmptyArchive: true, fingerprint: true
step([$class: 'Mailer',
notifyEveryUnstableBuild: true,
}
}
}