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 高德地图点聚合中Marker的位置无法实时更新
  • ¥15 DIFY API Endpoint 问题。
  • ¥20 sub地址DHCP问题
  • ¥15 delta降尺度计算的一些细节,有偿
  • ¥15 Arduino红外遥控代码有问题
  • ¥15 数值计算离散正交多项式
  • ¥30 数值计算均差系数编程
  • ¥15 redis-full-check比较 两个集群的数据出错
  • ¥15 Matlab编程问题
  • ¥15 训练的多模态特征融合模型准确度很低怎么办