From 83ff19e8ff883a8b41768f7029fc38e019d0986a Mon Sep 17 00:00:00 2001 From: Bob Caddy Date: Thu, 1 Feb 2024 15:32:51 -0500 Subject: [PATCH] Set jenkins pipeline to retry tests once on failure The tests sometimes fail due to external issues. This change will make the test step retry once if the first attempt fails. No other steps/stages are set to be retried --- Jenkinsfile | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 8928df96c..001e6a3f7 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -73,12 +73,15 @@ pipeline { steps { - sh ''' - source builds/run_tests.sh - setupTests -c gcc -t ${CHOLLA_MAKE_TYPE} + retry(2) + { + sh ''' + source builds/run_tests.sh + setupTests -c gcc -t ${CHOLLA_MAKE_TYPE} - runTests - ''' + runTests + ''' + } } } stage('Run Clang Tidy')