|
@ -19,9 +19,7 @@ def sharedPackageVersion |
|
|
|
|
|
|
|
|
// Docker images |
|
|
// Docker images |
|
|
def appImage |
|
|
def appImage |
|
|
def appTestsImage |
|
|
|
|
|
def contractsImage |
|
|
def contractsImage |
|
|
def contractsTestsImage |
|
|
|
|
|
def contractsProviderImage |
|
|
def contractsProviderImage |
|
|
def pinnerImage |
|
|
def pinnerImage |
|
|
|
|
|
|
|
@ -113,7 +111,6 @@ pipeline { |
|
|
stage('TEST CONTRACTS') { |
|
|
stage('TEST CONTRACTS') { |
|
|
steps { |
|
|
steps { |
|
|
script { |
|
|
script { |
|
|
try { |
|
|
|
|
|
def ganacheTestPort = sh(script: "bash ./jenkins/hash_build_properties.sh ${BRANCH_NAME} ${BUILD_NUMBER} | xargs bash ./jenkins/map_to_thousand.sh", returnStdout: true).trim() |
|
|
def ganacheTestPort = sh(script: "bash ./jenkins/hash_build_properties.sh ${BRANCH_NAME} ${BUILD_NUMBER} | xargs bash ./jenkins/map_to_thousand.sh", returnStdout: true).trim() |
|
|
|
|
|
|
|
|
def ganacheTestImage = docker.build( |
|
|
def ganacheTestImage = docker.build( |
|
@ -122,14 +119,7 @@ pipeline { |
|
|
./" |
|
|
./" |
|
|
) |
|
|
) |
|
|
|
|
|
|
|
|
sh 'docker network create --driver bridge concordia_ganache_test_network || true' |
|
|
docker.build( |
|
|
|
|
|
|
|
|
ganacheTestImage.withRun("""-d -p 6${ganacheTestPort}:8546 \ |
|
|
|
|
|
--env-file=./jenkins/env/ganache.test.jenkins.env \ |
|
|
|
|
|
--name concordia-ganache-test-6${ganacheTestPort} \ |
|
|
|
|
|
--net=concordia_ganache_test_network""") { concordiaGanacheTest -> |
|
|
|
|
|
|
|
|
|
|
|
contractsTestsImage = docker.build( |
|
|
|
|
|
"ecentrics/concordia-contracts-tests:${sanitizedBranchName}-v${contractsPackageVersion}-b${BUILD_NUMBER}-tests", |
|
|
"ecentrics/concordia-contracts-tests:${sanitizedBranchName}-v${contractsPackageVersion}-b${BUILD_NUMBER}-tests", |
|
|
"-f docker/concordia-contracts/Dockerfile \ |
|
|
"-f docker/concordia-contracts/Dockerfile \ |
|
|
./ \ |
|
|
./ \ |
|
@ -137,13 +127,22 @@ pipeline { |
|
|
--build-arg TZ=Europe/Athens" |
|
|
--build-arg TZ=Europe/Athens" |
|
|
) |
|
|
) |
|
|
|
|
|
|
|
|
contractsTestsImage.run("""--rm \ |
|
|
sh 'docker network create --driver bridge concordia_ganache_test_network || true' |
|
|
|
|
|
|
|
|
|
|
|
ganacheTestImage.withRun("""-d -p 6${ganacheTestPort}:8546 \ |
|
|
|
|
|
--env-file=./jenkins/env/ganache.test.jenkins.env \ |
|
|
|
|
|
--name concordia-ganache-test-6${ganacheTestPort} \ |
|
|
|
|
|
--net=concordia_ganache_test_network""") { concordiaGanacheTest -> |
|
|
|
|
|
|
|
|
|
|
|
try { |
|
|
|
|
|
sh """docker run \ |
|
|
|
|
|
--rm \ |
|
|
-v ecentrics_janus_common:/mnt/concordia/test-reports/ \ |
|
|
-v ecentrics_janus_common:/mnt/concordia/test-reports/ \ |
|
|
--env-file=./jenkins/env/contracts.test.jenkins.env \ |
|
|
--env-file=./jenkins/env/contracts.test.jenkins.env \ |
|
|
-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 \ |
|
|
} |
|
|
ecentrics/concordia-contracts-tests:${sanitizedBranchName}-v${contractsPackageVersion}-b${BUILD_NUMBER}-tests""" |
|
|
} catch (e) { |
|
|
} catch (e) { |
|
|
error('Some tests failed!') |
|
|
error('Some tests failed!') |
|
|
error('Aborting the build.') |
|
|
error('Aborting the build.') |
|
@ -155,6 +154,7 @@ pipeline { |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
stage('TEST APP') { |
|
|
stage('TEST APP') { |
|
|
steps { |
|
|
steps { |
|
|