Jenkinsfile 3.4 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'
  }
L
liuyq-617 已提交
7

Y
Yiqing Liu 已提交
8
  stages {
L
liuyq-617 已提交
9
      stage('Parallel test stage') {
Y
Yiqing Liu 已提交
10
      parallel {
L
liuyq-617 已提交
11
        stage('pytest') {
L
liuyq-617 已提交
12
          agent{label '184'}
L
liuyq-617 已提交
13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35
          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 已提交
36
        stage('test_b1') {
L
liuyq-617 已提交
37
          agent{label 'master'}
Y
Yiqing Liu 已提交
38
          steps {
L
liuyq-617 已提交
39 40 41 42
            sh '''
            cd ${WKC}
            git checkout develop
            git pull
L
liuyq-617 已提交
43
              
L
liuyq-617 已提交
44 45 46 47 48 49 50 51 52 53 54 55 56
            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 已提交
57
            ./test-all.sh b1
L
liuyq-617 已提交
58
            date'''
Y
Yiqing Liu 已提交
59 60 61 62
          }
        }

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

        stage('test_valgrind') {
L
liuyq-617 已提交
92
          agent{label "186"}
L
liuyq-617 已提交
93

Y
Yiqing Liu 已提交
94
          steps {
L
liuyq-617 已提交
95 96 97 98
            sh '''
            cd ${WKC}
            git checkout develop
            git pull
L
liuyq-617 已提交
99
              
L
liuyq-617 已提交
100 101 102 103 104 105 106 107 108 109 110 111
            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 已提交
112
            ./valgrind-test.sh 2>&1 > mem-error-out.log
113 114
            ./handle_val_log.sh
          
L
liuyq-617 已提交
115
            date
L
liuyq-617 已提交
116 117
            cd ${WKC}/tests
            ./test-all.sh b3
L
liuyq-617 已提交
118
            date'''
Y
Yiqing Liu 已提交
119 120
          }
        }
L
liuyq-617 已提交
121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136
       stage('connector'){
         agent{label "release"}
         steps{
            sh'''
            cd ${WORKSPACE}
            git checkout develop
            cd tests/gotest
            bash batchtest.sh
            cd ${WORKSPACE}/tests/examples/JDBC/JDBCDemo/
            mvn clean package assembly:single >/dev/null 
            java -jar target/jdbcChecker-SNAPSHOT-jar-with-dependencies.jar -host 127.0.0.1
            cd ${WORKSPACE}/tests/examples/python/PYTHONConnectorChecker
            python3 PythonChecker.py
            '''
         }
       }
Y
Yiqing Liu 已提交
137 138 139 140 141

      }
    }

  }
L
liuyq-617 已提交
142 143
  
}