douyinmian8151 2014-08-23 07:34
浏览 315
已采纳

Jenkins Ant同时在多个远程服务器上部署/发布

i try to solve the case where i need to make a PHP release on multiple remote Server nodes at the same time.

We got a Jenkins server wich does the following steps in his build (ant) script:

  • Git Checkout
  • PHP QA Tools Check (like PHPUnit, phpmd etc.)
  • Do some other tests

After everything is OK i want to deploy the sources to 3(later maybe more) remote Servers. After everything is pushed to the Webnodes i want to execute a symlink change on all 3 nodes at the same time.

Sounds kind of impossible to me, but i hoped that i get a solution somewhere here, but i didn't found anything that helps.

So hopefully someone here got a good idea or some experience to share.

Cheers,

Dennis

  • 写回答

1条回答 默认 最新

  • dongyouzhi7218 2014-08-24 07:49
    关注

    You should look at this link because PHP deployments are a bit different from Java/.Net related deployments. However, if you feel that using Phing along with Jenkins OR using Phing independently is not what you want, and would like to simply have some plugin which copies your content to few remote servers, then you should try using Publish Over SSH plugin. After the steps in ant script mentioned above completes, you can add the task of deploying the sources to remote servers in Post-build Actions section. Once you've installed the plugin, you will find Send build artifacts over SSH option in the drop-down menu of Post-build Actions. Here you will find options to select multiple servers and you also have option to run command over those machines once the sources have been copied using Exec command that i have highlighted in the snapshot below. Also don't forget to check the Advanced... options and the help (?) section for each option.

    enter image description here

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 关于#python#的问题:求帮写python代码
  • ¥20 MATLAB画图图形出现上下震荡的线条
  • ¥15 LiBeAs的带隙等于0.997eV,计算阴离子的N和P
  • ¥15 关于#windows#的问题:怎么用WIN 11系统的电脑 克隆WIN NT3.51-4.0系统的硬盘
  • ¥15 来真人,不要ai!matlab有关常微分方程的问题求解决,
  • ¥15 perl MISA分析p3_in脚本出错
  • ¥15 k8s部署jupyterlab,jupyterlab保存不了文件
  • ¥15 ubuntu虚拟机打包apk错误
  • ¥199 rust编程架构设计的方案 有偿
  • ¥15 回答4f系统的像差计算