-
Notifications
You must be signed in to change notification settings - Fork 123
/
Jenkinsfile
78 lines (78 loc) · 2.15 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
pipeline {
agent {
kubernetes {
label 'regression-gitbase'
inheritFrom 'performance'
defaultContainer 'regression-gitbase'
nodeSelector 'srcd.host/type=jenkins-worker'
containerTemplate {
name 'regression-gitbase'
image 'srcd/regression-gitbase:v0.3.4'
ttyEnabled true
command 'cat'
}
}
}
environment {
GOPATH = "/go"
GO_IMPORT_PATH = "github.com/src-d/regression-gibase"
GO_IMPORT_FULL_PATH = "${env.GOPATH}/src/${env.GO_IMPORT_PATH}"
GO111MODULE = "on"
PROM_ADDRESS = "http://prom-pushgateway-prometheus-pushgateway.monitoring.svc.cluster.local:9091"
PROM_JOB = "gitbase_perfomance"
}
triggers { pollSCM('0 0,12 * * *') }
stages {
stage('Run performance tests') {
when { branch 'master' }
steps {
sh '/bin/regression --complexity=2 --csv --prom local:HEAD'
}
}
stage('PR-run') {
when { changeRequest target: 'master' }
steps {
sh '/bin/regression --complexity=0 remote:master local:HEAD'
}
}
stage('Plot') {
when { branch 'master' }
steps {
script {
plotFiles = findFiles(glob: "plot_*.csv")
plotFiles.each {
echo "plot ${it.getName()}"
sh "cat ${it.getName()}"
plot(
group: 'performance',
csvFileName: it.getName(),
title: it.getName(),
numBuilds: '100',
style: 'line',
csvSeries: [[
displayTableFlag: false,
exclusionValues: '',
file: it.getName(),
inclusionFlag: 'OFF',
]]
)
}
}
}
}
stage('Run bblfsh mockup tests') {
when { branch 'master' }
steps {
sh '/bin/regression-bblfsh-mockups local:HEAD'
}
}
}
post {
success {
slackSend (color: '#2eb886', message: "SUCCESS: `${env.JOB_NAME}` <${env.BUILD_URL}|build #${env.BUILD_NUMBER}>")
}
failure {
slackSend (color: '#b82e60', message: "FAILED: `${env.JOB_NAME}` <${env.BUILD_URL}|build #${env.BUILD_NUMBER}>")
}
}
}