Jenkinsfile 3.2 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 10
      stage('pre build'){
        agent{label 'master'}
L
liuyq-617 已提交
11
        when{ changeset "develop"}
L
liuyq-617 已提交
12 13
        steps{
          sh '''
L
liuyq-617 已提交
14 15
              
              
L
liuyq-617 已提交
16 17 18 19
              echo "check OK!"
              '''
        }
      }
L
liuyq-617 已提交
20
      stage('Parallel test stage') {
Y
Yiqing Liu 已提交
21
      parallel {
L
liuyq-617 已提交
22
        stage('pytest') {
L
liuyq-617 已提交
23
          when{ changeset "develop"}
L
liuyq-617 已提交
24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47
          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 已提交
48
        stage('test_b1') {
L
liuyq-617 已提交
49
          when{ changeset "develop"}
L
liuyq-617 已提交
50
          agent{label '184'}
Y
Yiqing Liu 已提交
51
          steps {
L
liuyq-617 已提交
52 53 54 55
            sh '''
            cd ${WKC}
            git checkout develop
            git pull
L
liuyq-617 已提交
56
              
L
liuyq-617 已提交
57 58 59 60 61 62 63 64 65 66 67 68 69
            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 已提交
70
            ./test-all.sh b1
L
liuyq-617 已提交
71
            date'''
Y
Yiqing Liu 已提交
72 73 74 75
          }
        }

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

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

      }
    }

  }
L
liuyq-617 已提交
140 141
  
}