Skip to content

Commit 7a45fdc

Browse files
committed
Fix tests
Signed-off-by: Alexey Rodionov <[email protected]>
1 parent 0eab990 commit 7a45fdc

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

.jenkinsci/linux-build-wheels.groovy

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -36,20 +36,21 @@ def publishWheels() {
3636
def testWheels() {
3737
def scmVars = checkout scm
3838
def tests = ['tx-example.py', 'batch-example.py', 'blocks-query.py']
39+
DOCKER_NETWORK = "${scmVars.CHANGE_ID}-${scmVars.GIT_COMMIT}-${BUILD_NUMBER}"
40+
writeFile file: ".env", text: "SUBNET=${DOCKER_NETWORK}\nIROHA_VERSION=${IROHA_VERSION}"
41+
sh(script: "wget https://raw.githubusercontent.com/hyperledger/iroha/develop/example/config.docker -O docker/iroha/config.docker")
42+
sh(returnStdout: true, script: "docker-compose -f docker/docker-compose.yaml pull")
43+
sh(returnStdout: true, script: "docker-compose -f docker/docker-compose.yaml up --build -d")
3944
for (String item : tests) {
40-
DOCKER_NETWORK = "${scmVars.CHANGE_ID}-${scmVars.GIT_COMMIT}-${BUILD_NUMBER}"
41-
writeFile file: ".env", text: "SUBNET=${DOCKER_NETWORK}\nIROHA_VERSION=${IROHA_VERSION}"
42-
sh(script: "wget https://raw.githubusercontent.com/hyperledger/iroha/develop/example/config.docker -O docker/iroha/config.docker")
43-
sh(returnStdout: true, script: "docker-compose -f docker/docker-compose.yaml pull")
44-
sh(returnStdout: true, script: "docker-compose -f docker/docker-compose.yaml up --build -d")
4545
iC = docker.image('python:3.5-slim')
4646
iC.inside("--network='${DOCKER_NETWORK}'") {
4747
sh(script: "find wheelhouse -type f -name \"iroha*.whl\" -exec pip install {} \\;")
4848
sh(script: "while ! timeout 2 bash -c \"echo > /dev/tcp/iroha/50051\"; do sleep 2; done")
4949
sh(script: "IROHA_HOST_ADDR=iroha ./examples/${item}")
5050
}
51-
sh(returnStdout: true, script: "docker-compose -f docker/docker-compose.yaml down")
51+
sh(returnStdout: true, script: "docker-compose -f docker/docker-compose.yaml restart")
5252
}
53+
sh(returnStdout: true, script: "docker-compose -f docker/docker-compose.yaml down")
5354
}
5455

5556
return this

0 commit comments

Comments
 (0)