jenkis 部署eclipse 项目时使用ant打包,处理ant打包出错

获取ant 打包的返回的code,然后根据code来处理逻辑

 

cd $PROJECT_PATH/ && ant -buildfile jenkins_build.xml war
antReturnCode=$?
echo "ANT: Return code is: \""$antReturnCode"\""
if [ $antReturnCode -ne 0 ];then
    echo "ant deploy failed!"
    exit 1;
else
    echo "ant deploy success!"
fi

  

posted @ 2020-05-29 11:44  皓贤  阅读(233)  评论(0编辑  收藏  举报