forked from hyperledger/indy-node
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
copies similar activation changes from plenum
Signed-off-by: Andrey Kononykhin <[email protected]>
- Loading branch information
1 parent
0e3d4f4
commit 0db7c00
Showing
12 changed files
with
149 additions
and
71 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,10 @@ | ||
#!groovy | ||
|
||
@Library('[email protected]') _ | ||
// TODO doesn't exist yet | ||
@Library('[email protected]') _ | ||
|
||
def name = 'indy-node' | ||
String name = 'indy-node' | ||
String pkgName = name | ||
|
||
def nodeTestUbuntu = { | ||
try { | ||
|
@@ -49,17 +51,25 @@ def commonTestUbuntu = { | |
} | ||
} | ||
|
||
def buildDebUbuntu = { repoName, releaseVersion, sourcePath -> | ||
def buildDebUbuntu = { releaseVersion, sourcePath, packageVersion=null, missedPkgs=false -> | ||
def volumeName = "$name-deb-u1604" | ||
packageVersion = packageVersion ?: releaseVersion | ||
|
||
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" | ||
} | ||
|
||
// TODO build only missed ones | ||
dir('build-scripts/ubuntu-1604') { | ||
sh "./build-$name-docker.sh \"$sourcePath\" $releaseVersion $volumeName" | ||
sh "./build-3rd-parties-docker.sh $volumeName" | ||
sh "./build-$name-docker.sh \"$sourcePath\" $releaseVersion $volumeName $packageVersion" | ||
if (missedPkgs == [pkgName]) { | ||
echo "Skip 3rd parties building" | ||
} else { | ||
sh "./build-3rd-parties-docker.sh $volumeName" | ||
} | ||
} | ||
return "$volumeName" | ||
} | ||
|
@@ -106,7 +116,7 @@ def systemTests = { component, releaseVersion -> | |
|
||
stage("[${testFileName}] Ensure node services started") { | ||
// TODO explore and fix the reason why they (mostly Node1) not always active | ||
for (nodeNum = 1; nodeNum <= nodesNum; nodeNum++) { | ||
for (int nodeNum = 1; nodeNum <= nodesNum; nodeNum++) { | ||
for (service in ['indy-node', 'indy-node-control']) { | ||
sh """ | ||
for i in 1 2 3; do | ||
|
@@ -262,7 +272,7 @@ def systemTests = { component, releaseVersion -> | |
|
||
Map builds = [:] | ||
List tests = ['test_ledger.py', 'test_consensus.py', 'test_vc.py'] | ||
for (i = 0; i < tests.size(); i++) { | ||
for (int i = 0; i < tests.size(); i++) { | ||
String testFileName = tests[i] | ||
Boolean isFirst = (i == 0) | ||
builds[testFileName] = { | ||
|
@@ -295,10 +305,27 @@ def systemTests = { component, releaseVersion -> | |
} | ||
} | ||
|
||
options = new TestAndPublishOptions() | ||
def options = new TestAndPublishOptions() | ||
// TODO review that | ||
options.setApprovers(['QA']) | ||
options.setPkgName(pkgName) | ||
|
||
// TODO duplicates list from build scripts | ||
options.setPkgDeps([ | ||
'python3-timeout-decorator': '0.4.0', | ||
'python3-distro': '1.3.0', | ||
]) | ||
|
||
|
||
options.enable([StagesEnum.PACK_RELEASE_COPY, StagesEnum.PACK_RELEASE_COPY_ST]) | ||
options.setCopyWithDeps(true) | ||
options.setSystemTestsCb(systemTests) | ||
options.setPrContexts([env.INDY_GITHUB_PR_REQUIRED_CONTEXT ?: "ci/hyperledger-jenkins/pr-merge"]) | ||
|
||
testAndPublish(name, [ubuntu: [node: nodeTestUbuntu, common: commonTestUbuntu]], true, options, [ubuntu: buildDebUbuntu]) | ||
testAndPublish( | ||
name, | ||
[ | ||
ubuntu: [node: nodeTestUbuntu, common: commonTestUbuntu] | ||
], | ||
true, options, [ubuntu: buildDebUbuntu], 'indy_node' | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
recursive-include data * | ||
recursive-include sample * | ||
include post-setup.py | ||
include indy_node/__version__.json | ||
include indy_node/__manifest__.json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
#!/bin/bash | ||
|
||
set -e | ||
|
||
usage_str="Usage: $0" | ||
|
||
if [ "$1" = "--help" ] ; then | ||
echo $usage_str | ||
exit 0 | ||
fi | ||
|
||
repourl=$(git config --get remote.origin.url) | ||
hashcommit=$(git $repo rev-parse HEAD) | ||
|
||
python3 -c "import indy_node; indy_node.set_manifest({'repo': '$repourl', 'sha1': '$hashcommit', 'version': indy_node.__version__})" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters