-
Notifications
You must be signed in to change notification settings - Fork 79
/
Jenkinsfile
103 lines (89 loc) · 3.51 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
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
#!groovy
@Library('SovrinHelpers@v1.2.1') _
def name = 'sovrin'
def buildDebUbuntu = { repoName, releaseVersion, sourcePath ->
def volumeName = "sovrin-deb-u1604"
if (env.BRANCH_NAME != '' && env.BRANCH_NAME != 'master') {
volumeName = "${volumeName}.${BRANCH_NAME}"
}
if (sh(script: "docker volume ls -q | grep -q '^$volumeName\$'", returnStatus: true) == 0) {
sh "docker volume rm $volumeName"
}
dir('build-scripts/ubuntu-1604') {
sh "./build-sovrin-docker.sh \"$sourcePath\" $releaseVersion $volumeName"
}
return "$volumeName"
}
def systemTests = { component, releaseVersion ->
def localLib
Map serverEnv = [:]
Map clientEnv = [:]
String clientRepoChannel = null
String emailRecipients = params.INDY_NODE_RECIPIENTS ?: env.INDY_NODE_RECIPIENTS ?: ''
Boolean gatherLogs = env.GATHER_LOGS != 'false'
node('ubuntu') {
try {
stage('Load local shared library') {
checkout scm
localLib = load 'build/pipeline.groovy'
}
stage("Get server env") {
serverEnv = localLib.resolveServerEnv(component, releaseVersion)
echo "Server env: $serverEnv"
}
stage("Get client env") {
clientEnv = localLib.resolveClientEnv(serverEnv.sovtoken.src)
echo "Client env: $clientEnv"
clientRepoChannel = (clientEnv.libindy.ver == clientEnv.libindy.src) ? 'stable' : 'master'
}
} finally {
cleanWs()
}
}
localLib.systemTests {
delegate.repoChannel = component
sovrinVer = serverEnv.sovrin.ver
sovtokenfeesVer = serverEnv.sovtokenfees.ver
sovtokenVer = serverEnv.sovtoken.ver
indyNodeVer = serverEnv.indyNode.ver
indyPlenumVer = serverEnv.indyPlenum.ver
libindyCryptoVer = serverEnv.libindyCrypto.ver
libsovtokenVer = clientEnv.libsovtoken.ver
libindyVer = clientEnv.libindy.ver
libindyPypiVer = clientEnv.libindy.pypi
testSchema = [
['test_ledger.py'],
['test_state_proof.py'],
['TestViewChangeSuite.py'],
['test_off_ledger_signature.py'],
['TestConsensusSuite.py', 'TestTAASuite.py'],
['test_roles.py', 'test_freshness.py', 'TestMultiSigSuite.py'],
['TestAuditSuite.py'],
['TestCatchUpSuite.py'],
['TestCatchUpSuiteExtended.py'],
// TODO might be groupped in parts once https://github.com/docker/docker-py/issues/2278 is resolved
['TestAuthMapAttribSuite.py'],
['TestAuthMapCredDefSuite.py'],
['TestAuthMapMiscSuite.py'],
['TestAuthMapNymSuite.py'],
['TestAuthMapPluginsSuite.py'],
['TestAuthMapRevocRegDefSuite.py'],
['TestAuthMapRevocRegEntrySuite.py'],
['TestAuthMapSchemaSuite.py'],
['TestAuthMapUpgradeSuite.py'],
['test_libsovtoken.py', 'TestFeesSuite.py'],
['TestAdHocSuite.py'],
['TestProductionSuite.py']
]
testVersion = 'v0.8.40'
testVersionByTag = true
delegate.gatherLogs = gatherLogs
}
}
options = new TestAndPublishOptions()
options.enable([StagesEnum.PACK_RELEASE_COPY, StagesEnum.PACK_RELEASE_COPY_ST])
options.setCopyWithDeps(false)
if (env.BRANCH_NAME == 'stable') {
options.setSystemTestsCb(systemTests)
}
testAndPublish(name, [ubuntu: [:]], true, options, [ubuntu: buildDebUbuntu])