forked from hyperledger/indy-node
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Jenkinsfile.nightly
89 lines (80 loc) · 3.02 KB
/
Jenkinsfile.nightly
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
#!groovy
@Library('[email protected]') _
String pkgName = 'indy-node'
String mainModuleName = 'indy_node'
String emailRecipients = params.INDY_NODE_RECIPIENTS ?: env.INDY_NODE_RECIPIENTS ?: ''
Boolean gatherLogs = (params.GATHER_LOGS ?: env.GATHER_LOGS) != 'false'
def localLib
def err
String buildPkgVersion
String buildSrcVersion
String scmRepoUrl
String scmSha1
try {
nodeWrapper('ubuntu') {
stage('Resolve version to build') {
docker.image('hyperledger/indy-core-baseci:0.0.3-master').inside('-u 0') {
sh "apt-get update && apt-get install -y $pkgName"
releaseVersion = getReleaseVersion(mainModuleName, false)
buildPkgVersion = "${releaseVersion.release}~${releaseVersion.pre}${releaseVersion.revision}"
buildSrcVersion = sh(returnStdout: true, script: """
python3 -c "from $mainModuleName import load_manifest; print(load_manifest()['sha1'])"
""").trim()
}
echo "Version to build: buildSrcVersion=$buildSrcVersion, buildPkgVersion=$buildPkgVersion"
}
stage('Load local shared library') {
checkout scm
localLib = load 'ci/pipeline.groovy'
scmRepoUrl = gitHelper.repoUrl()
scmSha1 = gitHelper.sha1()
}
}
localLib.systemTests {
repoChannel = 'master'
pkgVersion = buildPkgVersion
srcVersion = buildSrcVersion
testSchema = [
['test_ledger.py'],
['test_state_proof.py'],
['test_vc.py'],
['test_off_ledger_signature.py'],
['test_consensus.py', 'TestTAASuite.py'],
['test_roles.py', 'test_freshness.py', 'TestMultiSigSuite.py'],
['TestAuditSuite.py'],
['TestCatchUpSuite.py'],
['TestCatchUpSuiteExtended.py'],
// set of authmap tests
// 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']
]
testVersion = 'v0.8.15'
testVersionByTag = true
delegate.gatherLogs = gatherLogs
}
} catch(Exception _err) {
currentBuild.result = "FAILED"
err = _err
throw _err
} finally {
stage('Build result notification') {
sendNotification.email {
to = emailRecipients
subject = "[${pkgName}][nightly] Build #${this.env.BUILD_NUMBER} ${err ? 'failed' : 'succeed'} for version ${buildPkgVersion} (${buildSrcVersion})"
srcUrl = "${scmRepoUrl}/tree/${scmSha1}"
}
}
if (err) {
stage('Error dump') {
echo "Pipeline failed: $err"
}
}
}