| | |
| | | stage('deploy') { |
| | | when { branch 'master' } |
| | | steps { |
| | | sh 'echo test' |
| | | sh 'echo test2' |
| | | } |
| | | } |
| | | } |
| | |
| | | post { |
| | | unsuccessful { |
| | | script{ |
| | | def msg = "当前构建失败<br>---------------------<br>提交人:${GIT_COMMIT_AUTHOR}<br>提交信息:<br>${GIT_COMMIT_MSG}<br>---------------------<br>构建内网链接:${BUILD_URL}console" |
| | | String msg = ''' |
| | | 当前构建失败<br> |
| | | ---------------------<br> |
| | | 提交人:${GIT_COMMIT_AUTHOR}<br> |
| | | 提交信息:<br> |
| | | ${GIT_COMMIT_MSG}<br> |
| | | ---------------------<br> |
| | | 构建内网链接:${BUILD_URL}console |
| | | ''' |
| | | msg = msg.split("\n") |
| | | def number = "964606955" |
| | | sendMessage(false,number,msg); |
| | | |
| | | sendMessage(true,number,msg); |
| | | } |
| | | } |
| | | } |
| | | } |