@@ -36,20 +36,21 @@ def publishWheels() {
3636def 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} \n IROHA_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} \n IROHA_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
5556return this
0 commit comments