This repository has been archived by the owner on Nov 30, 2017. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 43
/
Copy pathJenkinsfile
63 lines (49 loc) · 1.9 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
#!groovy
@Library('SovrinHelpers') _
def name = 'sovrin-client'
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'
def sovrinCommon = helpers.extractVersion('sovrin-common')
def sovrinNode = helpers.extractVersion('sovrin-node')
def plenum = helpers.extractVersionOfSubdependency(sovrinCommon, 'plenum')
testHelpers.install(deps: [plenum, sovrinNode])
echo 'Ubuntu Test: Test'
testHelpers.testRunner(resFile: "test-result.${NODE_NAME}.txt")
//testHelpers.testJUnit(resFile: "test-result.${NODE_NAME}.xml")
}
}
finally {
echo 'Ubuntu Test: Cleanup'
step([$class: 'WsCleanup'])
}
}
def testWindows = {
echo 'TODO: Implement me'
}
def testWindowsNoDocker = {
try {
echo 'Windows No Docker Test: Checkout csm'
checkout scm
testHelpers.createVirtualEnvAndExecute({ python, pip ->
echo 'Windows No Docker Test: Install dependencies'
def sovrinNode = helpers.extractVersion('sovrin-node')
testHelpers.install(python: python, pip: pip, deps: [sovrinNode], isVEnv: true)
echo 'Windows No Docker Test: Test'
testHelpers.testJUnit(resFile: "test-result.${NODE_NAME}.xml", python: python)
})
}
finally {
echo 'Windows No Docker Test: Cleanup'
step([$class: 'WsCleanup'])
}
}
//testAndPublish(name, [ubuntu: testUbuntu, windows: testWindowsNoDocker, windowsNoDocker: testWindowsNoDocker])
options = new TestAndPublishOptions()
options.enable([StagesEnum.PACK_RELEASE_DEPS, StagesEnum.PACK_RELEASE_ST_DEPS])
testAndPublish(name, [ubuntu: testUbuntu], true, options)