Browse Source

fix: use sh instead of docker plugin

develop
Apostolos Fanakis 4 years ago
parent
commit
589a062d91
Signed by: Apostolof GPG Key ID: 8600B4C4163B3269
  1. 20
      jenkins/Jenkinsfile

20
jenkins/Jenkinsfile

@ -143,14 +143,14 @@ pipeline {
-e WEB3_HOST=concordia-ganache-test-6${ganacheTestPort} \ -e WEB3_HOST=concordia-ganache-test-6${ganacheTestPort} \
-e WEB3_PORT=6${ganacheTestPort} \ -e WEB3_PORT=6${ganacheTestPort} \
--net=concordia_ganache_test_network""") --net=concordia_ganache_test_network""")
sh 'mkdir -p ./reports/${BUILD_NUMBER}/contracts'
sh 'find /mnt/janus/common/ -name "concordia-contracts-*" -exec cp \'{}\' ./reports/${BUILD_NUMBER}/contracts/ \\;'
} }
} catch (e) { } catch (e) {
error('Some tests failed!') error('Some tests failed!')
error('Aborting the build.') error('Aborting the build.')
throw e throw e
} finally {
sh 'mkdir -p ./reports/${BUILD_NUMBER}/contracts'
sh 'find /mnt/janus/common/ -name "concordia-contracts-*" -exec cp \'{}\' ./reports/${BUILD_NUMBER}/contracts/ \\;'
} }
} }
} }
@ -159,7 +159,7 @@ pipeline {
stage('TEST APP') { stage('TEST APP') {
steps { steps {
script { script {
appTestsImage = docker.build( docker.build(
"ecentrics/concordia-app:${sanitizedBranchName}-v${appPackageVersion}-b${BUILD_NUMBER}-tests", "ecentrics/concordia-app:${sanitizedBranchName}-v${appPackageVersion}-b${BUILD_NUMBER}-tests",
"-f docker/concordia-app/Dockerfile \ "-f docker/concordia-app/Dockerfile \
./ \ ./ \
@ -168,15 +168,17 @@ pipeline {
) )
try { try {
appTestsImage.run('--rm \ sh """docker run \
-v ecentrics_janus_common:/mnt/concordia/test-reports/') --rm \
-v ecentrics_janus_common:/mnt/concordia/test-reports/
sh 'mkdir -p ./reports/${BUILD_NUMBER}/app' ecentrics/concordia-app:${sanitizedBranchName}-v${appPackageVersion}-b${BUILD_NUMBER}-tests"""
sh 'find /mnt/janus/common/ -name "concordia-app-*" -exec cp \'{}\' ./reports/${BUILD_NUMBER}/app/ \\;'
} catch (e) { } catch (e) {
error('Some tests failed!') error('Some tests failed!')
error('Aborting the build.') error('Aborting the build.')
throw e throw e
} finally {
sh 'mkdir -p ./reports/${BUILD_NUMBER}/app'
sh 'find /mnt/janus/common/ -name "concordia-app-*" -exec cp \'{}\' ./reports/${BUILD_NUMBER}/app/ \\;'
} }
} }
} }

Loading…
Cancel
Save