blob: 10aac934f344ffd121c21316806ca1bf7681fbd4 [file] [log] [blame]
yuezonghe824eb0c2024-06-27 02:32:26 -07001#!/usr/bin/env groovy
2
3pipeline_worknode = "10.235.74.94"
4
5pipeline {
6 agent {
7 node {
8 label pipeline_worknode
9 }
10 }
11 options {
12 timestamps()
13 timeout(time: 3, unit: 'HOURS')
14 }
15 stages {
16 stage("prepare") {
17 steps {
18 sh 'echo prepare'
19 sh "printenv"
20 }
21 }
22 stage("build") {
23 parallel {
24 stage('verifyCI_v3t_ap_linux_kw') {
25 steps{
26 script {
27 try{
28 build job: "verifyCI_v3t_ap_linux_kw", parameters: [string(name: 'GERRIT_REFSPEC', value: env.GERRIT_REFSPEC), string(name: 'GERRIT_PATCHSET_REVISION', value: env.GERRIT_PATCHSET_REVISION), string(name: 'GERRIT_CHANGE_NUMBER', value: env.GERRIT_CHANGE_NUMBER), string(name: 'GERRIT_CHANGE_OWNER_EMAIL', value: env.GERRIT_CHANGE_OWNER_EMAIL), string(name: 'GERRIT_BRANCH', value: env.GERRIT_BRANCH)]
29 env.ap_linux_kw_ret="true"
30 }catch (exc) {
31 env.ap_linux_kw_ret="false"
32 echo "verifyCI_v3t_ap_linux_kw error ${env.ap_linux_kw_ret}"
33 }
34 }
35 }
36 }
37
38 stage('verifyCI_v3t_ap_linux_cov') {
39 steps {
40 script {
41 try {
42 build job: "verifyCI_v3t_ap_linux_cov", parameters: [string(name: 'GERRIT_REFSPEC', value: env.GERRIT_REFSPEC), string(name: 'GERRIT_PATCHSET_REVISION', value: env.GERRIT_PATCHSET_REVISION), string(name: 'GERRIT_CHANGE_NUMBER', value: env.GERRIT_CHANGE_NUMBER), string(name: 'GERRIT_CHANGE_OWNER_EMAIL', value: env.GERRIT_CHANGE_OWNER_EMAIL), string(name: 'GERRIT_BRANCH', value: env.GERRIT_BRANCH)]
43 env.ap_linux_cov_ret="true"
44 }catch (exc) {
45 env.ap_linux_cov_ret="false"
46 echo "verifyCI_v3t_ap_linux_cov error ${env.ap_linux_cov_ret}"
47 }
48 }
49 }
50 }
51 }
52 }
53 stage("check") {
54 steps {
55 sh 'echo check'
56 script {
57 echo "ap_linux_cov_ret=${env.ap_linux_cov_ret}"
58 echo "ap_linux_kw_ret=${env.ap_linux_kw_ret}"
59 if (env.ap_linux_cov_ret == "false") {
60 error("ap coverity check fail")
61 }
62 if (env.ap_linux_kw_ret == "false") {
63 error("ap linux klocwork check fail")
64 }
65
66 }
67 }
68 }
69 }
70}