-
Notifications
You must be signed in to change notification settings - Fork 4
/
Jenkinsfile
79 lines (68 loc) · 1.6 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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
#!/usr/bin/env groovy
pipeline {
agent { label 'executor-v2' }
triggers {
cron(getDailyCronString())
}
options {
timestamps()
buildDiscarder(logRotator(daysToKeepStr: '30'))
}
stages {
stage('Test') {
parallel {
stage('Run tests on EE') {
agent { label 'executor-v2-rhel-ee' }
steps {
sh './test.sh'
}
post { always {
stash name: 'eeTestResults', includes: 'spec/reports/*.xml', allowEmpty:true
}}
}
stage('Run tests') {
steps {
sh './test.sh'
}
}
}
}
stage('Publish to RubyGems') {
agent { label 'executor-v2' }
when {
allOf {
branch 'master'
expression {
boolean publish = false
try {
timeout(time: 5, unit: 'MINUTES') {
input(message: 'Publish to RubyGems?')
publish = true
}
} catch (final ignore) {
publish = false
}
return publish
}
}
}
steps {
checkout scm
sh './publish-rubygem.sh'
deleteDir()
}
}
}
post {
always {
dir('ee-results'){
unstash 'eeTestResults'
}
junit 'spec/reports/*.xml, ee-results/spec/reports/*.xml'
cobertura coberturaReportFile: 'spec/coverage/coverage.xml'
sh 'cp spec/coverage/coverage.xml cobertura.xml'
ccCoverage("cobertura", "github.com/cyberark/slosilo")
cleanupAndNotify(currentBuild.currentResult)
}
}
}