From ddff163c769c7aa1151bf735a667581dcfd86ed2 Mon Sep 17 00:00:00 2001 From: Yiqing Liu Date: Thu, 17 Dec 2020 17:00:24 +0800 Subject: [PATCH] Delete Jenkinsfile --- tests/Jenkinsfile | 147 ---------------------------------------------- 1 file changed, 147 deletions(-) delete mode 100644 tests/Jenkinsfile diff --git a/tests/Jenkinsfile b/tests/Jenkinsfile deleted file mode 100644 index 550a0d29ed..0000000000 --- a/tests/Jenkinsfile +++ /dev/null @@ -1,147 +0,0 @@ -import hudson.model.Result -import jenkins.model.CauseOfInterruption -properties([pipelineTriggers([githubPush()])]) -node { - git url: 'https://github.com/taosdata/TDengine.git' -} - - -def abortPreviousBuilds() { - def currentJobName = env.JOB_NAME - def currentBuildNumber = env.BUILD_NUMBER.toInteger() - def jobs = Jenkins.instance.getItemByFullName(currentJobName) - def builds = jobs.getBuilds() - - for (build in builds) { - if (!build.isBuilding()) { - continue; - } - - if (currentBuildNumber == build.getNumber().toInteger()) { - continue; - } - - build.doKill() //doTerm(),doKill(),doTerm() - } -} -//停止之前相同的分支。。 -abortPreviousBuilds() - -def pre_test(){ - catchError(buildResult: 'SUCCESS', stageResult: 'FAILURE') { - sh ''' - sudo rmtaos - ''' - } - sh ''' - - cd ${WKC} - rm -rf * - cd ${WK} - git reset --hard - git checkout develop - git pull - cd ${WKC} - rm -rf * - mv ${WORKSPACE}/* . - cd ${WK} - export TZ=Asia/Harbin - date - rm -rf ${WK}/debug - mkdir debug - cd debug - cmake .. > /dev/null - make > /dev/null - make install > /dev/null - cd ${WKC}/tests - ''' - return 1 -} -pipeline { - agent none - - environment{ - WK = '/var/lib/jenkins/workspace/TDinternal' - WKC= '/var/lib/jenkins/workspace/TDinternal/community' - } - - stages { - - - stage('Parallel test stage') { - //only pr triggering the build. - when { - changeRequest() - } - parallel { - stage('python') { - agent{label 'pytest'} - steps { - pre_test() - sh ''' - cd ${WKC}/tests - ./test-all.sh pytest - date''' - } - } - stage('test_b1') { - agent{label 'b1'} - steps { - pre_test() - sh ''' - cd ${WKC}/tests - ./test-all.sh b1 - date''' - } - } - - stage('test_crash_gen') { - agent{label "b2"} - steps { - pre_test() - catchError(buildResult: 'SUCCESS', stageResult: 'FAILURE') { - sh ''' - cd ${WKC}/tests/pytest - ./crash_gen.sh -a -p -t 4 -s 2000 - ''' - } - catchError(buildResult: 'SUCCESS', stageResult: 'FAILURE') { - sh ''' - cd ${WKC}/tests/pytest - ./handle_crash_gen_val_log.sh - ''' - } - sh ''' - date - cd ${WKC}/tests - ./test-all.sh b2 - date - ''' - } - } - - stage('test_valgrind') { - agent{label "b3"} - - steps { - pre_test() - catchError(buildResult: 'SUCCESS', stageResult: 'FAILURE') { - sh ''' - cd ${WKC}/tests/pytest - ./valgrind-test.sh 2>&1 > mem-error-out.log - ./handle_val_log.sh - ''' - } - sh ''' - date - cd ${WKC}/tests - ./test-all.sh b3 - date''' - } - } - - } - } - } - -} -- GitLab