From e8c58967ecf04e3250db0d9f2d645f875a3f73e9 Mon Sep 17 00:00:00 2001 From: Artem Pikulin Date: Tue, 1 Jan 2019 14:45:25 +0700 Subject: [PATCH] Always do docker-compose down after Jenkins build. Show logs. --- Jenkinsfile | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index ef2e76a87..5d55f56a6 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -24,8 +24,14 @@ docker-compose build''' sh '''docker-compose up -d ./start_BEER_OTHER_trade.sh ETH timeout 600 grep -q "SWAP completed" <(COMPOSE_HTTP_TIMEOUT=600 docker-compose logs -f clientnode) -timeout 600 grep -q "SWAP completed" <(COMPOSE_HTTP_TIMEOUT=600 docker-compose logs -f seednode) +timeout 600 grep -q "SWAP completed" <(COMPOSE_HTTP_TIMEOUT=600 docker-compose logs -f seednode)''' + } + post { + always { + sh '''docker-compose logs --timestamps --tail=999 +docker ps docker-compose down''' + } } } stage('Trade ETH/BEER') { @@ -33,8 +39,14 @@ docker-compose down''' sh '''docker-compose up -d ./start_BEER_OTHER_trade_inverted.sh ETH timeout 600 grep -q "SWAP completed" <(COMPOSE_HTTP_TIMEOUT=600 docker-compose logs -f clientnode) -timeout 600 grep -q "SWAP completed" <(COMPOSE_HTTP_TIMEOUT=600 docker-compose logs -f seednode) +timeout 600 grep -q "SWAP completed" <(COMPOSE_HTTP_TIMEOUT=600 docker-compose logs -f seednode)''' + } + post { + always { + sh '''docker-compose logs --timestamps --tail=999 +docker ps docker-compose down''' + } } } }