Merge pull request #5540 from taosdata/test/jenkins
<test>abort last job
This commit is contained in:
commit
1b3048dc96
|
@ -6,6 +6,7 @@ node {
|
|||
}
|
||||
|
||||
def skipstage=0
|
||||
|
||||
def abortPreviousBuilds() {
|
||||
def currentJobName = env.JOB_NAME
|
||||
def currentBuildNumber = env.BUILD_NUMBER.toInteger()
|
||||
|
@ -24,7 +25,7 @@ def abortPreviousBuilds() {
|
|||
build.doKill() //doTerm(),doKill(),doTerm()
|
||||
}
|
||||
}
|
||||
//abort previous build
|
||||
// abort previous build
|
||||
abortPreviousBuilds()
|
||||
def abort_previous(){
|
||||
def buildNumber = env.BUILD_NUMBER as int
|
||||
|
@ -32,7 +33,8 @@ def abort_previous(){
|
|||
milestone(buildNumber)
|
||||
}
|
||||
def pre_test(){
|
||||
|
||||
|
||||
|
||||
sh '''
|
||||
sudo rmtaos || echo "taosd has not installed"
|
||||
'''
|
||||
|
@ -79,6 +81,10 @@ pipeline {
|
|||
changeRequest()
|
||||
}
|
||||
steps {
|
||||
script{
|
||||
abort_previous()
|
||||
abortPreviousBuilds()
|
||||
}
|
||||
sh'''
|
||||
cp -r ${WORKSPACE} ${WORKSPACE}.tes
|
||||
cd ${WORKSPACE}.tes
|
||||
|
|
|
@ -100,7 +100,10 @@ function runSimCaseOneByOnefq {
|
|||
cp -r ../../sim ~/sim_`date "+%Y_%m_%d_%H:%M:%S" `
|
||||
rm -rf ../../sim/case.log
|
||||
fi
|
||||
exit 8
|
||||
dohavecore $2
|
||||
if [[ $2 == 1 ]];then
|
||||
exit 8
|
||||
fi
|
||||
fi
|
||||
end_time=`date +%s`
|
||||
echo execution time of $case was `expr $end_time - $start_time`s. | tee -a out.log
|
||||
|
@ -169,10 +172,13 @@ function runPyCaseOneByOnefq() {
|
|||
out_log=`tail -1 pytest-out.log `
|
||||
if [[ $out_log =~ 'failed' ]];then
|
||||
cp -r ../../sim ~/sim_`date "+%Y_%m_%d_%H:%M:%S" `
|
||||
echo '=====================log====================='
|
||||
echo '=====================log===================== '
|
||||
cat ../../sim/case.log
|
||||
rm -rf ../../sim/case.log
|
||||
exit 8
|
||||
dohavecore $2
|
||||
if [[ $2 == 1 ]];then
|
||||
exit 8
|
||||
fi
|
||||
fi
|
||||
echo execution time of $case was `expr $end_time - $start_time`s. | tee -a pytest-out.log
|
||||
else
|
||||
|
|
Loading…
Reference in New Issue