Jenkinsfile 3.3 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 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56
        stage('pytest') {
          agent{label 'master'}
          steps {
            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
            ./test-all.sh pytest
            date'''
          }
        }
L
liuyq-617 已提交
57 58
        stage('test_b1') {
          agent{label '184'}
Y
Yiqing Liu 已提交
59
          steps {
L
liuyq-617 已提交
60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77
            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 已提交
78
            ./test-all.sh b1
L
liuyq-617 已提交
79
            date'''
Y
Yiqing Liu 已提交
80 81 82 83
          }
        }

        stage('test_crash_gen') {
L
liuyq-617 已提交
84
          agent{label "185"}
Y
Yiqing Liu 已提交
85
          steps {
L
liuyq-617 已提交
86
            sh '''
L
liuyq-617 已提交
87
            
L
liuyq-617 已提交
88 89 90 91 92 93 94 95
            cd ${WKC}
            git checkout develop
            git pull
            git submodule update
            cd ${WK}
            git checkout develop
            git pull
            export TZ=Asia/Harbin
L
liuyq-617 已提交
96
            
L
liuyq-617 已提交
97 98 99 100 101 102
            rm -rf ${WK}/debug
            mkdir debug
            cd debug
            cmake .. > /dev/null
            make > /dev/null
            cd ${WKC}/tests/pytest
L
liuyq-617 已提交
103
            ./crash_gen.sh -a -p -t 4 -s 2000
L
liuyq-617 已提交
104 105
            date
            cd ${WKC}/tests
L
liuyq-617 已提交
106
            ./test-all.sh b2
L
liuyq-617 已提交
107 108
            date
            '''
Y
Yiqing Liu 已提交
109 110 111 112
          }
        }

        stage('test_valgrind') {
L
liuyq-617 已提交
113
          agent{label "186"}
Y
Yiqing Liu 已提交
114
          steps {
L
liuyq-617 已提交
115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131
            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 已提交
132
            ./valgrind-test.sh 2>&1 > mem-error-out.log
133 134
            ./handle_val_log.sh
          
L
liuyq-617 已提交
135
            date
L
liuyq-617 已提交
136 137
            cd ${WKC}/tests
            ./test-all.sh b3
L
liuyq-617 已提交
138
            date'''
Y
Yiqing Liu 已提交
139 140 141 142 143 144 145
          }
        }

      }
    }

  }
L
liuyq-617 已提交
146 147
  
}