forked from crate/crate
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathJenkinsfile
85 lines (83 loc) · 2.63 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
80
81
82
83
84
85
pipeline {
agent any
tools {
// used to run maven
jdk 'jdk11'
}
options {
timeout(time: 45, unit: 'MINUTES')
}
environment {
CI_RUN = 'true'
}
stages {
stage('Parallel') {
parallel {
stage('sphinx') {
agent { label 'small' }
steps {
sh './blackbox/bin/sphinx'
sh 'find ./blackbox/*/src/ -type f -name "*.py" | xargs ./blackbox/.venv/bin/pycodestyle'
}
}
stage('Java tests') {
agent { label 'large' }
environment {
CODECOV_TOKEN = credentials('cratedb-codecov-token')
}
steps {
sh 'git clean -xdff'
checkout scm
sh './mvnw compile'
sh '''
x=(~/.m2/jdks/jdk-$(./mvnw help:evaluate -Dexpression=versions.jdk -q -DforceStdout)*); JAVA_HOME="$x/" ./mvnw test \
-DforkCount=8 \
-DthreadCount=2 \
-Dcheckstyle.skip \
-Dforbiddenapis.skip=true \
-Dmaven.javadoc.skip=true \
-Dtests.crate.slow=true \
jacoco:report
'''.stripIndent()
// Upload coverage report to Codecov.
// https://about.codecov.io/blog/introducing-codecovs-new-uploader/
sh '''
# Download uploader program and perform integrity checks.
curl https://keybase.io/codecovsecurity/pgp_keys.asc | gpg --import # One-time step
curl -Os https://uploader.codecov.io/latest/linux/codecov
curl -Os https://uploader.codecov.io/latest/linux/codecov.SHA256SUM
curl -Os https://uploader.codecov.io/latest/linux/codecov.SHA256SUM.sig
gpg --verify codecov.SHA256SUM.sig codecov.SHA256SUM
shasum -a 256 -c codecov.SHA256SUM
# Invoke program.
chmod +x codecov
./codecov -t ${CODECOV_TOKEN}
'''.stripIndent()
}
post {
always {
junit '**/target/surefire-reports/*.xml'
}
}
}
stage('itest') {
agent { label 'medium && x64' }
steps {
sh 'git clean -xdff'
checkout scm
sh 'python3 ./blackbox/kill_4200.py'
sh './blackbox/bin/test-docs'
}
}
stage('blackbox tests') {
agent { label 'medium && x64' }
steps {
sh 'git clean -xdff'
checkout scm
sh './blackbox/bin/test test_decommission test_dns_discovery test_jmx test_s3 test_ssl'
}
}
}
}
}
}