博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
基于私服nexus和jenkins搭建快嘉开发框架1.1环境
阅读量:6227 次
发布时间:2019-06-21

本文共 8058 字,大约阅读时间需要 26 分钟。

hot3.png

参考

###基本环境准备 1、服务器A(192.168.9.1)搭建私服Nexus Repository Manager OSS,其版本号2.13.0-01:

输入图片说明
2、服务器B(192.168.9.2)搭建Jenkins,其版本号1.638:
输入图片说明
3、jenkins安装插件TestNG Results Plugin
4、服务器B上部署maven、版本号3.3.9,其中maven中mirror指向服务器A搭建的私服地址
5、服务器B上/etc/hosts中配置项

192.168.9.1    www.mycompany.com

6、服务器C(192.168.9.3)参考如下博客搭建mysql、redis 、rabbitmq,另外参考官方文档搭建activemq5.13.1。

7、准备服务器D(192.168.9.4)用来部署demo-Rest、demo-Web和demo-Batch,服务器D上部署jdk1.7.0_75,tomcat8.0.35

8、服务器D上/etc/hosts中配置项

192.168.9.3    mysqlhost192.168.9.3    rabbitmqhost192.168.9.3    activemqhost192.168.9.3    redishost

9、参考如下博客对服务器B配置免登陆ssh到服务器D

###jenkins中配置ciHelper,deploy到私服,截图如下 输入图片说明输入图片说明

执行该任务,输出如下

[INFO] Reactor Summary:[INFO] [INFO] cihelper-parent .................................... SUCCESS [  1.192 s][INFO] base-test .......................................... SUCCESS [  3.801 s][INFO] base-common ........................................ SUCCESS [  3.315 s][INFO] MybatisEx .......................................... SUCCESS [  1.637 s][INFO] thirdparty ......................................... SUCCESS [  1.855 s][INFO] ------------------------------------------------------------------------[INFO] BUILD SUCCESS[INFO] ------------------------------------------------------------------------[INFO] Total time: 13.762 s[INFO] Finished at: 2016-08-21T22:06:08+08:00[INFO] Final Memory: 27M/167M[INFO] ------------------------------------------------------------------------[JENKINS] Archiving /root/.jenkins/workspace/ciHelper1.1/base-test/pom.xml to com.fastjrun.share/base-test/1.1/base-test-1.1.pom[JENKINS] Archiving /root/.jenkins/workspace/ciHelper1.1/base-test/target/base-test-1.1.jar to com.fastjrun.share/base-test/1.1/base-test-1.1.jar[JENKINS] Archiving /root/.jenkins/workspace/ciHelper1.1/base-test/target/base-test-1.1-sources.jar to com.fastjrun.share/base-test/1.1/base-test-1.1-sources.jar[JENKINS] Archiving /root/.jenkins/workspace/ciHelper1.1/pom.xml to com.fastjrun.share/cihelper-parent/1.1/cihelper-parent-1.1.pom[JENKINS] Archiving /root/.jenkins/workspace/ciHelper1.1/thirdparty/pom.xml to com.fastjrun/thirdparty/1.1/thirdparty-1.1.pom[JENKINS] Archiving /root/.jenkins/workspace/ciHelper1.1/thirdparty/target/thirdparty.jar to com.fastjrun/thirdparty/1.1/thirdparty-1.1.jar[JENKINS] Archiving /root/.jenkins/workspace/ciHelper1.1/MybatisEx/pom.xml to com.fastjrun/MybatisEx/1.1/MybatisEx-1.1.pom[JENKINS] Archiving /root/.jenkins/workspace/ciHelper1.1/MybatisEx/target/MybatisEx-1.1.jar to com.fastjrun/MybatisEx/1.1/MybatisEx-1.1.jar[JENKINS] Archiving /root/.jenkins/workspace/ciHelper1.1/MybatisEx/target/MybatisEx-1.1-sources.jar to com.fastjrun/MybatisEx/1.1/MybatisEx-1.1-sources.jar[JENKINS] Archiving /root/.jenkins/workspace/ciHelper1.1/base-common/pom.xml to com.fastjrun.share/base-common/1.1/base-common-1.1.pom[JENKINS] Archiving /root/.jenkins/workspace/ciHelper1.1/base-common/target/base-common-1.1.jar to com.fastjrun.share/base-common/1.1/base-common-1.1.jar[JENKINS] Archiving /root/.jenkins/workspace/ciHelper1.1/base-common/target/base-common-1.1-sources.jar to com.fastjrun.share/base-common/1.1/base-common-1.1-sources.jarchannel stoppedFinished: SUCCESS

###jenkins中配置demo-parent,deploy到私服,截图如下 输入图片说明输入图片说明

执行该任务,任务如下

[INFO] Reactor Summary:[INFO] [INFO] demoSpring4-parent ................................. SUCCESS [  2.326 s][INFO] demoSpring4-base ................................... SUCCESS [  4.056 s][INFO] demoSpring4-util ................................... SUCCESS [  4.394 s][INFO] demoSpring4-bundle ................................. SUCCESS [  1.404 s][INFO] demoSpring4-persistence-impl ....................... SUCCESS [  2.034 s][INFO] demoSpring4-service-impl ........................... SUCCESS [  3.335 s][INFO] ------------------------------------------------------------------------[INFO] BUILD SUCCESS[INFO] ------------------------------------------------------------------------[INFO] Total time: 20.335 s[INFO] Finished at: 2016-08-21T22:10:33+08:00[INFO] Final Memory: 41M/301M[INFO] ------------------------------------------------------------------------[JENKINS] Archiving /root/.jenkins/workspace/demo-parent/Service-Impl/pom.xml to com.fastjrun.share/demoSpring4-service-impl/1.1-SNAPSHOT/demoSpring4-service-impl-1.1-SNAPSHOT.pom[JENKINS] Archiving /root/.jenkins/workspace/demo-parent/Service-Impl/target/demoSpring4-service-impl-1.1-SNAPSHOT.jar to com.fastjrun.share/demoSpring4-service-impl/1.1-20160821.141032-1/demoSpring4-service-impl-1.1-20160821.141032-1.jar[JENKINS] Archiving /root/.jenkins/workspace/demo-parent/Service-Impl/target/demoSpring4-service-impl-1.1-SNAPSHOT-sources.jar to com.fastjrun.share/demoSpring4-service-impl/1.1-20160821.141032-1/demoSpring4-service-impl-1.1-20160821.141032-1-sources.jar[JENKINS] Archiving /root/.jenkins/workspace/demo-parent/pom.xml to com.fastjrun.share/demoSpring4-parent/1.1-SNAPSHOT/demoSpring4-parent-1.1-SNAPSHOT.pom[JENKINS] Archiving /root/.jenkins/workspace/demo-parent/Base/pom.xml to com.fastjrun.share/demoSpring4-base/1.1-SNAPSHOT/demoSpring4-base-1.1-SNAPSHOT.pom[JENKINS] Archiving /root/.jenkins/workspace/demo-parent/Base/target/demoSpring4-base-1.1-SNAPSHOT.jar to com.fastjrun.share/demoSpring4-base/1.1-20160821.141020-1/demoSpring4-base-1.1-20160821.141020-1.jar[JENKINS] Archiving /root/.jenkins/workspace/demo-parent/Base/target/demoSpring4-base-1.1-SNAPSHOT-sources.jar to com.fastjrun.share/demoSpring4-base/1.1-20160821.141020-1/demoSpring4-base-1.1-20160821.141020-1-sources.jar[JENKINS] Archiving /root/.jenkins/workspace/demo-parent/Bundle/pom.xml to com.fastjrun.share/demoSpring4-bundle/1.1-SNAPSHOT/demoSpring4-bundle-1.1-SNAPSHOT.pom[JENKINS] Archiving /root/.jenkins/workspace/demo-parent/Bundle/target/demoSpring4-bundle-1.1-SNAPSHOT.jar to com.fastjrun.share/demoSpring4-bundle/1.1-20160821.141026-1/demoSpring4-bundle-1.1-20160821.141026-1.jar[JENKINS] Archiving /root/.jenkins/workspace/demo-parent/Bundle/target/demoSpring4-bundle-1.1-SNAPSHOT-sources.jar to com.fastjrun.share/demoSpring4-bundle/1.1-20160821.141026-1/demoSpring4-bundle-1.1-20160821.141026-1-sources.jar[JENKINS] Archiving /root/.jenkins/workspace/demo-parent/Util/pom.xml to com.fastjrun.share/demoSpring4-util/1.1-SNAPSHOT/demoSpring4-util-1.1-SNAPSHOT.pom[JENKINS] Archiving /root/.jenkins/workspace/demo-parent/Util/target/demoSpring4-util-1.1-SNAPSHOT.jar to com.fastjrun.share/demoSpring4-util/1.1-20160821.141024-1/demoSpring4-util-1.1-20160821.141024-1.jar[JENKINS] Archiving /root/.jenkins/workspace/demo-parent/Util/target/demoSpring4-util-1.1-SNAPSHOT-sources.jar to com.fastjrun.share/demoSpring4-util/1.1-20160821.141024-1/demoSpring4-util-1.1-20160821.141024-1-sources.jar[JENKINS] Archiving /root/.jenkins/workspace/demo-parent/Persistence-Impl/pom.xml to com.fastjrun.share/demoSpring4-persistence-impl/1.1-SNAPSHOT/demoSpring4-persistence-impl-1.1-SNAPSHOT.pom[JENKINS] Archiving /root/.jenkins/workspace/demo-parent/Persistence-Impl/target/demoSpring4-persistence-impl-1.1-SNAPSHOT.jar to com.fastjrun.share/demoSpring4-persistence-impl/1.1-20160821.141028-1/demoSpring4-persistence-impl-1.1-20160821.141028-1.jar[JENKINS] Archiving /root/.jenkins/workspace/demo-parent/Persistence-Impl/target/demoSpring4-persistence-impl-1.1-SNAPSHOT-sources.jar to com.fastjrun.share/demoSpring4-persistence-impl/1.1-20160821.141028-1/demoSpring4-persistence-impl-1.1-20160821.141028-1-sources.jarchannel stoppedFinished: SUCCESS

###jenkins中配置demo-Rest-config,将config.tar.gz直接scp到服务器D(192.168.9.4),截图如下 输入图片说明输入图片说明

执行该任务,成功后可ssh到服务器D(192.168.9.3)在目录/app/demoSpring4/Rest下解压config.tar.gz

tar -zxvf config.tar.gz

###jenkins中配置demo-Rest,将demo-Rest.war直接scp到服务器D(192.168.9.4)的tomcat下,截图如下 输入图片说明输入图片说明 执行该任务,成功后后服务器D(192.168.9.3)的tomcat会重新部署demo-Rest.war

###参考demo-Rest-config配置demo-Web-config ###参考demo-Web-config配置demo-Web

###jenkins中配置demo-Batch,将batch.tar.gz直接scp到服务器D(192.168.9.4),截图如下

输入图片说明输入图片说明输入图片说明 执行该任务,成功后可ssh到服务器D(192.168.9.4)在目录/app/demoSpring4下解压batch.tar.gz

tar -zxvf batch.tar.gzcd batchnohup ./startup.sh

###示例环境

  • demo-Web
  • demo-Rest

###使用jenkins配置rest-test任务,可形成testng报告如下 输入图片说明

转载于:https://my.oschina.net/fastjrun/blog/735815

你可能感兴趣的文章
总结bash编程基础,引入函数结构化编程。
查看>>
redhat linux忘记登陆密码之解决办法
查看>>
RHEL 6 LAMP(一)
查看>>
Nginx负载均衡
查看>>
理解 virbr0 - 每天5分钟玩转 OpenStack(11)
查看>>
屡败屡战,攻克中项(系统集成项目管理师考试经历分享)
查看>>
SQL 2008 群集配置详尽攻略[2]--设置故障转移集群
查看>>
OSPF中使用完全次末节区域--total nssa
查看>>
unity3D与网页的交互---做项目的一点总结
查看>>
Nginx—核心配置location匹配规则说明
查看>>
分布式监控之Zabbix-Server
查看>>
Zone-based User Based Firewall
查看>>
AWS CLI使用s3
查看>>
在jfinal中使用druid,并配置查看权限
查看>>
视频+书签 Powerpiont2010可以这样玩
查看>>
如何限制GNS3中CPU的使用率(ASA)
查看>>
首都机场以后也能刷脸坐飞机了
查看>>
PyQt的Layout的比例化分块。
查看>>
python os模块
查看>>
随机生成验证码
查看>>