From 7617bdd2ef3abb8c1fb71534be74aa5b25dbc0e6 Mon Sep 17 00:00:00 2001 From: Igor Sirotin Date: Thu, 31 Oct 2024 10:50:58 +0000 Subject: [PATCH] ci_: configure test jobs (#6008) --- _assets/ci/Jenkinsfile.tests | 6 +++--- _assets/ci/Jenkinsfile.tests-rpc | 10 +++++++--- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/_assets/ci/Jenkinsfile.tests b/_assets/ci/Jenkinsfile.tests index a542284f1..c7727abff 100644 --- a/_assets/ci/Jenkinsfile.tests +++ b/_assets/ci/Jenkinsfile.tests @@ -22,7 +22,7 @@ pipeline { ) booleanParam( name: 'UNIT_TEST_RERUN_FAILS', - defaultValue: isPRJob(), + defaultValue: !isNightlyJob(), description: 'Should the job rerun failed tests?' ) booleanParam( @@ -56,7 +56,7 @@ pipeline { /* manage how many builds we keep */ buildDiscarder(logRotator( numToKeepStr: getAmountToKeep(), - daysToKeepStr: '30', + daysToKeepStr: '-1', artifactNumToKeepStr: getAmountToKeep(), )) } @@ -254,4 +254,4 @@ def getDefaultUnitTestCount() { isNightlyJob() ? '20' : '1' } def getDefaultTimeout() { isNightlyJob() ? 5*60 : 50 } -def getAmountToKeep() { isNightlyJob() ? '14' : isDevelopJob() ? '10' : '5' } +def getAmountToKeep() { isNightlyJob() ? '14' : isDevelopJob() ? '30' : '5' } \ No newline at end of file diff --git a/_assets/ci/Jenkinsfile.tests-rpc b/_assets/ci/Jenkinsfile.tests-rpc index 90d01e0eb..ad08c3407 100644 --- a/_assets/ci/Jenkinsfile.tests-rpc +++ b/_assets/ci/Jenkinsfile.tests-rpc @@ -24,9 +24,9 @@ pipeline { disableConcurrentBuilds() /* manage how many builds we keep */ buildDiscarder(logRotator( - numToKeepStr: '5', - daysToKeepStr: '30', - artifactNumToKeepStr: '1', + numToKeepStr: getAmountToKeep(), + daysToKeepStr: '-1', + artifactNumToKeepStr: getAmountToKeep(), )) } @@ -74,3 +74,7 @@ pipeline { cleanup { sh 'make git-clean' } } // post } // pipeline + +def isDevelopJob() { env.JOB_BASE_NAME == 'tests-rpc-develop' } + +def getAmountToKeep() { isDevelopJob() ? '30' : '5' } \ No newline at end of file