Jenkins 自動化構建與部署

1.用Maven構建web項目autotest,並傳到svn(http://10.90.3.84/svn/autotest/trunck/)上。


2.Jenkins服務器(10.90.3.84)


  Jenkins的安裝及插件(hpi),不再描述。
  
  主要配置如下:
  a> 新建autotest的maven構建項目;
  b> 配置autotest對應項目的svn地址;
  c> 配置build,需要設置package -Dmaven.test.skip=true
  d> 配置PostSteps,需要選擇SSH Server(與部署機ssh免登錄),主要Transfers的相關配置:
     Source files:target/autotest.war
     Remove prefix:target
     Remote directory:deploy/apps
     Exec command:sh  deploy/bin/autodeploy.sh
  e>配置email,選擇Editable Email Notification的默認選項,並選高級設定什麼條件發送項目郵件通知。


3.app部署機(10.90.3.81)


  a>resin3.1.12:
    /user/local/resin/
    /user/local/resin/conf/resinAutoTest.conf
    /user/local/resin/bin/resinAutoTest.sh


  b>jdk7
    /user/local/java
    


  c>autoapp的單項免登錄


    /home/autoapp/deploy/apps  ->  /data/ifengsite/apps
    /home/autoapp/deploy/bin/autodeploy.sh
 
    /home/autoapp/deploy/apps:
    autotest -> autotest_20161102144339
    autotest_20161102144010
    autotest_20161102144339
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章