forked from hyperledger/indy-plenum
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathJenkinsfile
75 lines (60 loc) · 2.1 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
#!groovy
@Library('SovrinHelpers') _
def name = 'plenum'
def testUbuntu = {
try {
echo 'Ubuntu Test: Checkout csm'
checkout scm
echo 'Ubuntu Test: Build docker image'
def testEnv = dockerHelpers.build(name)
testEnv.inside('--network host') {
echo 'Ubuntu Test: Install dependencies'
testHelpers.install()
echo 'Ubuntu Test: Test'
testHelpers.testRunner(resFile: "test-result.${NODE_NAME}.txt")
}
}
finally {
echo 'Ubuntu Test: Cleanup'
step([$class: 'WsCleanup'])
}
}
def testWindows = {
echo 'TODO: Implement me'
/* win2016 for now (03-23-2017) is not supported by Docker for Windows
* (Hyper-V version), so we can't use linux containers
* https://github.com/docker/for-win/issues/448#issuecomment-276328342
*
* possible solutions:
* - use host-installed OrientDB (trying this one)
* - wait until Docker support will be provided for win2016
*/
//try {
// echo 'Windows Test: Checkout csm'
// checkout scm
// echo 'Windows Test: Build docker image'
// dockerHelpers.buildAndRunWindows(name, testHelpers.installDepsWindowsCommands() + ["cd C:\\test && python -m pytest -k orientdb --junit-xml=C:\\testOrig\\$testFile"] /*testHelpers.testJunitWindowsCommands()*/)
// junit 'test-result.xml'
//}
//finally {
// echo 'Windows Test: Cleanup'
// step([$class: 'WsCleanup'])
//}
}
def testWindowsNoDocker = {
try {
echo 'Windows No Docker Test: Checkout csm'
checkout scm
testHelpers.createVirtualEnvAndExecute({ python, pip ->
echo 'Windows No Docker Test: Install dependencies'
testHelpers.install(python: python, pip: pip, isVEnv: true)
echo 'Windows No Docker Test: Test'
testHelpers.testRunner(resFile: "test-result.${NODE_NAME}.txt", python: python)
})
}
finally {
echo 'Windows No Docker Test: Cleanup'
step([$class: 'WsCleanup'])
}
}
testAndPublish(name, [ubuntu: testUbuntu])