From e7e7de1d05720dc45b712effb8aa01e013ab6b69 Mon Sep 17 00:00:00 2001 From: stefano Date: Fri, 1 Nov 2019 15:52:20 +0000 Subject: [PATCH] add regression test jenkins file --- .ci/dev/regression/Jenkinsfile | 35 +++++++++++++--------------------- 1 file changed, 13 insertions(+), 22 deletions(-) diff --git a/.ci/dev/regression/Jenkinsfile b/.ci/dev/regression/Jenkinsfile index 5fb46d4e81..9d6140f87b 100644 --- a/.ci/dev/regression/Jenkinsfile +++ b/.ci/dev/regression/Jenkinsfile @@ -1,4 +1,4 @@ -@Library('existing-build-control') +@org.gradle.platform.base.Library('existing-build-control') import static com.r3.build.BuildControl.killAllExistingBuildsForJob killAllExistingBuildsForJob(env.JOB_NAME, env.BUILD_NUMBER.toInteger()) @@ -8,7 +8,7 @@ pipeline { options { timestamps() } environment { - DOCKER_TAG_TO_USE = "${UUID.randomUUID().toString().toLowerCase().subSequence(0, 12)}" + DOCKER_TAG_TO_USE = "${env.GIT_COMMIT.subSequence(0, 8)}" EXECUTOR_NUMBER = "${env.EXECUTOR_NUMBER}" BUILD_ID = "${env.BUILD_ID}-${env.JOB_NAME}" } @@ -21,37 +21,28 @@ pipeline { "-Dkubenetize=true " + "-Ddocker.push.password=\"\${DOCKER_PUSH_PWD}\" " + "-Ddocker.work.dir=\"/tmp/\${EXECUTOR_NUMBER}\" " + - "-Ddocker.provided.tag=\"\${DOCKER_TAG_TO_USE}\"" + - " clean pushBuildImage" + "-Ddocker.build.tag=\"\${DOCKER_TAG_TO_USE}\"" + + " clean pushBuildImage preAllocateForParallelRegressionTest --stacktrace" } sh "kubectl auth can-i get pods" } } - stage('Corda Pull Request - Run Tests') { - stage('Unit and Integration Tests') { - steps { - sh "./gradlew " + - "-DbuildId=\"\${BUILD_ID}\" " + - "-Dkubenetize=true " + - "-Ddocker.tag=\"\${DOCKER_TAG_TO_USE}\"" + - " allParallelUnitAndIntegrationTest" - } - } - stage('Slow Integration Tests') { - steps { - sh "./gradlew " + - "-DbuildId=\"\${BUILD_ID}\" " + - "-Dkubenetize=true " + - "-Ddocker.tag=\"\${DOCKER_TAG_TO_USE}\"" + - " allParallelSlowIntegrationTest" - } + stage('Regression Test') { + steps { + sh "./gradlew " + + "-DbuildId=\"\${BUILD_ID}\" " + + "-Dkubenetize=true " + + "-Ddocker.run.tag=\"\${DOCKER_TAG_TO_USE}\"" + + " deAllocateForParallelRegressionTest parallelRegressionTest --stacktrace" } } } + post { always { + archiveArtifacts artifacts: '**/pod-logs/**/*.log', fingerprint: false junit '**/build/test-results-xml/**/*.xml' } cleanup {