From 6555dcf4776f41bf30bc7e8a30d19f5aa8d62677 Mon Sep 17 00:00:00 2001 From: liuyq-617 Date: Tue, 23 Mar 2021 12:55:34 +0800 Subject: [PATCH] [TD-3432]fix jenkins --- Jenkinsfile | 22 ++-------------------- tests/test-all.sh | 2 +- 2 files changed, 3 insertions(+), 21 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 71214d1495..c8fd2083f6 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -6,26 +6,7 @@ node { } def skipstage=0 -// def cancelPreviousBuilds() { -// def jobName = env.JOB_NAME -// def buildNumber = env.BUILD_NUMBER.toInteger() -// /* Get job name */ -// def currentJob = Jenkins.instance.getItemByFullName(jobName) -// /* Iterating over the builds for specific job */ -// for (def build : currentJob.builds) { -// def exec = build.getExecutor() -// /* If there is a build that is currently running and it's not current build */ -// if (build.isBuilding() && build.number.toInteger() != buildNumber && exec != null) { -// /* Then stop it */ -// exec.interrupt( -// Result.ABORTED, -// new CauseOfInterruption.UserInterruption("Aborted by #${currentBuild.number}") -// ) -// println("Aborted previously running build #${build.number}") -// } -// } -// } def abortPreviousBuilds() { def currentJobName = env.JOB_NAME def currentBuildNumber = env.BUILD_NUMBER.toInteger() @@ -52,7 +33,8 @@ def abort_previous(){ milestone(buildNumber) } def pre_test(){ - + abort_previous() + abortPreviousBuilds() sh ''' sudo rmtaos || echo "taosd has not installed" ''' diff --git a/tests/test-all.sh b/tests/test-all.sh index 8e03c75f9a..c44737a8e8 100755 --- a/tests/test-all.sh +++ b/tests/test-all.sh @@ -100,7 +100,7 @@ function runSimCaseOneByOnefq { cp -r ../../sim ~/sim_`date "+%Y_%m_%d_%H:%M:%S" ` rm -rf ../../sim/case.log fi - dohavecore 1 + dohavecore $2 exit 8 fi end_time=`date +%s` -- GitLab