forked from valpackett/octohipster
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathJenkinsfile
executable file
·54 lines (39 loc) · 1.14 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
52
53
54
#!groovy
stage 'Prepare environment'
// Set build properties
properties([[$class: 'GithubProjectProperty',
displayName: 'Octohipster',
projectUrlStr: 'https://github.com/duck1123/octohipster/'],
[$class: 'BuildDiscarderProperty',
strategy: [$class: 'LogRotator', numToKeepStr: '5']]]);
def clojure = docker.image('clojure:alpine')
clojure.pull()
node {
sh 'env | sort'
}
stage 'Unit Tests'
clojure.inside('-u root') {
checkout scm
wrap([$class: 'AnsiColorBuildWrapper']) {
sh 'lein midje'
}
step([$class: 'JUnitResultArchiver', testResults: 'target/surefire-reports/TEST-*.xml'])
}
stage 'Generate Reports'
clojure.inside('-u root') {
checkout scm
sh 'lein doc'
step([$class: 'JavadocArchiver', javadocDir: 'doc', keepAll: true])
step([$class: 'TasksPublisher', high: 'FIXME', normal: 'TODO', pattern: '**/*.clj,**/*.cljs'])
}
stage 'Generate Artifacts'
node {
archive 'target/*jar'
}
// TODO: Skip for features and PRs
// stage 'Deploy Artifacts'
// sh 'lein deploy'
stage 'Set Status'
node {
step([$class: 'GitHubCommitStatusSetter'])
}