From 0755bf85e0dee7f383a580534012689a471e8b1d Mon Sep 17 00:00:00 2001 From: chenhaoran Date: Mon, 25 Nov 2024 17:48:46 +0800 Subject: [PATCH] ci: set test step in ci when tdgpt file changed --- Jenkinsfile2 | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/Jenkinsfile2 b/Jenkinsfile2 index 5f3acae08c..5a6868b907 100644 --- a/Jenkinsfile2 +++ b/Jenkinsfile2 @@ -467,9 +467,7 @@ pipeline { catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') { timeout(time: 126, unit: 'MINUTES'){ if (file_no_doc_changed =~ /forecastoperator.c|anomalywindowoperator.c/) { - sh ''' - echo "skip windows test because of tdgpt codes changed" - ''' + echo "skip windows test because of tdgpt codes changed" } else { pre_test_win() pre_test_build_win() @@ -484,13 +482,15 @@ pipeline { stage('mac test') { agent{label " Mac_catalina "} steps { - catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') { - timeout(time: 60, unit: 'MINUTES'){ - if (file_no_doc_changed =~ /forecastoperator.c|anomalywindowoperator.c/) { - echo "skip mac test because of tdgpt codes changed" - } else { - pre_test() - pre_test_build_mac() + script { + catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') { + timeout(time: 60, unit: 'MINUTES'){ + if (file_no_doc_changed =~ /forecastoperator.c|anomalywindowoperator.c/) { + echo "skip mac test because of tdgpt codes changed" + } else { + pre_test() + pre_test_build_mac() + } } } }