Jenkinsfile 2.7 KB
Newer Older
Y
Yiqing Liu 已提交
1
pipeline {
L
liuyq-617 已提交
2 3 4 5 6
  agent none
  environment{
      WK = '/var/lib/jenkins/workspace/TDinternal'
      WKC= '/var/lib/jenkins/workspace/TDinternal/community'
  }
Y
Yiqing Liu 已提交
7 8
  stages {
    stage('build TDengine') {
L
liuyq-617 已提交
9
      agent{label 'master'}
Y
Yiqing Liu 已提交
10
      steps {
L
liuyq-617 已提交
11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26
        sh '''
        cd ${WKC}
        git checkout develop
        git pull
        git submodule update
        cd ${WK}
        git checkout develop
        git pull
        export TZ=Asia/Harbin
        date
        rm -rf ${WK}/debug
        mkdir debug
        cd debug
        #cmake .. > /dev/null
        #make > /dev/null
        '''
Y
Yiqing Liu 已提交
27 28 29
      }
    }

L
liuyq-617 已提交
30
    stage('Parallel test stage') {
Y
Yiqing Liu 已提交
31
      parallel {
L
liuyq-617 已提交
32 33
        stage('test_b1') {
          agent{label '184'}
Y
Yiqing Liu 已提交
34
          steps {
L
liuyq-617 已提交
35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52
            sh '''
            date
            cd ${WKC}
            git checkout develop
            git pull
            git submodule update
            cd ${WK}
            git checkout develop
            git pull
            export TZ=Asia/Harbin
            date
            rm -rf ${WK}/debug
            mkdir debug
            cd debug
            cmake .. > /dev/null
            make > /dev/null
            cd ${WKC}/tests
            #./test-all.sh smoke
L
liuyq-617 已提交
53
            ./test-all.sh b1
L
liuyq-617 已提交
54
            date'''
Y
Yiqing Liu 已提交
55 56 57 58
          }
        }

        stage('test_crash_gen') {
L
liuyq-617 已提交
59
          agent{label "185"}
Y
Yiqing Liu 已提交
60
          steps {
L
liuyq-617 已提交
61
            sh '''
L
liuyq-617 已提交
62
            
L
liuyq-617 已提交
63 64 65 66 67 68 69 70
            cd ${WKC}
            git checkout develop
            git pull
            git submodule update
            cd ${WK}
            git checkout develop
            git pull
            export TZ=Asia/Harbin
L
liuyq-617 已提交
71
            
L
liuyq-617 已提交
72 73 74 75 76 77
            rm -rf ${WK}/debug
            mkdir debug
            cd debug
            cmake .. > /dev/null
            make > /dev/null
            cd ${WKC}/tests/pytest
L
liuyq-617 已提交
78
            ./crash_gen.sh -a -p -t 4 -s 2000
L
liuyq-617 已提交
79 80
            date
            cd ${WKC}/tests
L
liuyq-617 已提交
81
            ./test-all.sh b2
L
liuyq-617 已提交
82 83
            date
            '''
Y
Yiqing Liu 已提交
84 85 86 87
          }
        }

        stage('test_valgrind') {
L
liuyq-617 已提交
88
          agent{label "186"}
Y
Yiqing Liu 已提交
89
          steps {
L
liuyq-617 已提交
90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106
            sh '''
            date
            cd ${WKC}
            git checkout develop
            git pull
            git submodule update
            cd ${WK}
            git checkout develop
            git pull
            export TZ=Asia/Harbin
            date
            rm -rf ${WK}/debug
            mkdir debug
            cd debug
            cmake .. > /dev/null
            make > /dev/null
            cd ${WKC}/tests/pytest
L
liuyq-617 已提交
107
            ./valgrind-test.sh 2>&1 > mem-error-out.log
108 109
            ./handle_val_log.sh
          
L
liuyq-617 已提交
110
            date
L
liuyq-617 已提交
111 112
            cd ${WKC}/tests
            ./test-all.sh b3
L
liuyq-617 已提交
113
            date'''
Y
Yiqing Liu 已提交
114 115 116 117 118 119 120
          }
        }

      }
    }

  }
L
liuyq-617 已提交
121 122
  
}