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

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

        stage('test_valgrind') {
L
liuyq-617 已提交
91
          agent{label "186"}
Y
Yiqing Liu 已提交
92
          steps {
L
liuyq-617 已提交
93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109
            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 已提交
110
            ./valgrind-test.sh 2>&1 > mem-error-out.log
111 112
            ./handle_val_log.sh
          
L
liuyq-617 已提交
113
            date
L
liuyq-617 已提交
114 115
            cd ${WKC}/tests
            ./test-all.sh b3
L
liuyq-617 已提交
116
            date'''
Y
Yiqing Liu 已提交
117 118 119 120 121 122 123
          }
        }

      }
    }

  }
L
liuyq-617 已提交
124 125
  
}