Showing
1 changed file
with
24 additions
and
30 deletions
@@ -79,7 +79,6 @@ pipeline { | @@ -79,7 +79,6 @@ pipeline { | ||
79 | steps { | 79 | steps { |
80 | script { | 80 | script { |
81 | sh "sh ${PROJECT_WORK_DIR}/docker.sh ${PROJECT_WORK_DIR}" | 81 | sh "sh ${PROJECT_WORK_DIR}/docker.sh ${PROJECT_WORK_DIR}" |
82 | - sh "tree ${PROJECT_WORK_DIR}" | ||
83 | } | 82 | } |
84 | } | 83 | } |
85 | } | 84 | } |
@@ -93,37 +92,32 @@ pipeline { | @@ -93,37 +92,32 @@ pipeline { | ||
93 | } | 92 | } |
94 | } | 93 | } |
95 | 94 | ||
96 | - // stage('deploy to qcloud') { | ||
97 | - // steps { | ||
98 | - // script { | ||
99 | - // if(params.callBack!='noNeedDeploy'){ | ||
100 | - // build job: 'Docker-Image-Deplopy', parameters: [ | ||
101 | - // string(name: 'callBack', value: "noNeedCallBack"), | ||
102 | - // string(name: 'clusterId', value: "${params.clusterId}"), | ||
103 | - // string(name: 'serviceName', value: "${params.deployName}"), | ||
104 | - // string(name: 'containerName', value: "${params.deployName}"), | ||
105 | - // string(name: 'imageInfo', value: "${QCLOUD_IMAGE_VERSION}"), | ||
106 | - // string(name: 'deployEnv', value: 'qcloud')] | ||
107 | - // } | ||
108 | - // } | ||
109 | - // } | ||
110 | - // } | 95 | + stage('make deploy yaml version') { |
96 | + steps { | ||
97 | + script { | ||
98 | + sh "sed -i 's/REPLACE_QCLOUD_IMAGE_STORE/$QCLOUD_IMAGE_STORE/g' ${env.WORKSPACE}/k8s-deploy-yaml/${params.clusterId}/${params.deployName}.yaml" | ||
99 | + } | ||
100 | + } | ||
101 | + } | ||
111 | } | 102 | } |
112 | 103 | ||
113 | - // post { | ||
114 | - // always { | ||
115 | - // script { | ||
116 | - // echo "Pipeline is done,begin send mail" | ||
117 | - // deleteDir() | ||
118 | - // if(params.callBack!='noNeedCallBack'){ | ||
119 | - // sh "curl '${params.callBack}&status=${currentBuild.currentResult}&jobID=${JOB_NAME},${BUILD_NUMBER}'" | ||
120 | - // } | ||
121 | - // mail to: "${env.QA_EMAIL},${params.userMail}", | ||
122 | - // subject: "PineLine '${JOB_NAME}' (${BUILD_NUMBER}),构建结果: ${currentBuild.currentResult}", | ||
123 | - // body: "构建的内容为:${params.projectName},提交人员:${params.userMail}" | ||
124 | - // } | ||
125 | - // } | ||
126 | - // } | 104 | + post { |
105 | + always { | ||
106 | + script { | ||
107 | + echo "Pipeline is done,begin send mail" | ||
108 | + sh "cat ${env.WORKSPACE}/k8s-deploy-yaml/${params.clusterId}/${params.deployName}.yaml" | ||
109 | + } | ||
110 | + } | ||
111 | + failure { | ||
112 | + script { | ||
113 | + echo 'This will run only if failed' | ||
114 | + echo 'list the package result ' | ||
115 | + sh "tree ${PROJECT_WORK_DIR}" | ||
116 | + echo 'list the deploy yaml ' | ||
117 | + sh "cat ${env.WORKSPACE}/k8s-deploy-yaml/${params.clusterId}/${params.deployName}.yaml" | ||
118 | + } | ||
119 | + } | ||
120 | + } | ||
127 | } | 121 | } |
128 | 122 | ||
129 | 123 |
-
Please register or login to post a comment