Hudson 配置javaEE 任务
来源:互联网 发布:天刀优化 编辑:程序博客网 时间:2024/05/17 04:29
新建任务
- 主页面 ——> 新建任务 ——> 任务名称:Job1(选中“构建一个自由风格的软件项目”)
- 完成
- 主页面 ——> 新建任务 ——> 任务名称:Job1(选中“构建一个自由风格的软件项目”)
- 完成
配置 Git
* Git上下载的项目一般分3类,父工程,主工程,模块工程。 * 不同的工程在hudson工作区下的目录分级也不同。 * 父工程中的内容(一个pom.xml文件)放在hudson工作区的根下 * 主工程,模块工程中的内容都放在hudson工作区下以项目命名的文件夹中
- 父工程(聚合主工程及其木块工程的工程。其实只有一个pom.xml文件)
配置项目 选中Git URL of repository:ssh://xxx@192.168.41.191:29418/father
- 主工程(主程序)
配置项目 选中Git URL of repository:ssh://xxx@192.168.41.191:29418/main Advanced Local subdirectory for repo (optional):main
- 模块工程(模块,提供一些jar包)
配置项目 选中Git URL of repository:ssh://xxx@192.168.41.191:29418/moudle1 Advanced Local subdirectory for repo (optional):moudle1
git下载完毕后的目录结构为hudson_workspace$ lspom.xml main moudle1
* Git上下载的项目一般分3类,父工程,主工程,模块工程。 * 不同的工程在hudson工作区下的目录分级也不同。 * 父工程中的内容(一个pom.xml文件)放在hudson工作区的根下 * 主工程,模块工程中的内容都放在hudson工作区下以项目命名的文件夹中
- 父工程(聚合主工程及其木块工程的工程。其实只有一个pom.xml文件)
配置项目 选中Git URL of repository:ssh://xxx@192.168.41.191:29418/father
- 主工程(主程序)
配置项目 选中Git URL of repository:ssh://xxx@192.168.41.191:29418/main Advanced Local subdirectory for repo (optional):main
- 模块工程(模块,提供一些jar包)
配置项目 选中Git URL of repository:ssh://xxx@192.168.41.191:29418/moudle1 Advanced Local subdirectory for repo (optional):moudle1
git下载完毕后的目录结构为hudson_workspace$ lspom.xml main moudle1
编译周期设置
Build Triggers 勾选“Build periodically” Schedule:0 0 * * *(每天凌晨执行)
Build Triggers 勾选“Build periodically” Schedule:0 0 * * *(每天凌晨执行)
编译过程配置
Add build step Maven3:Bundled Goals:clean package(只打包)
Add build step Maven3:Bundled Goals:clean package(只打包)
发布到tomcat设置
为tomcat配置一个管理员(稍后发布时用到) vim tomcat-users.xml 添加 <user username="admin" password="admin" roles="manager,tomcat,admin,manager-script"/>
勾选“Deploy war/ear to a container” WAR/EAR files:主工程名/target/*.war Container:Tomcat 7.x Manager user name:admin Manager password:admin Tomcat URL:http://192.168.41.191:8000/(发布到tomcat根目录下)
为tomcat配置一个管理员(稍后发布时用到) vim tomcat-users.xml 添加 <user username="admin" password="admin" roles="manager,tomcat,admin,manager-script"/>
勾选“Deploy war/ear to a container” WAR/EAR files:主工程名/target/*.war Container:Tomcat 7.x Manager user name:admin Manager password:admin Tomcat URL:http://192.168.41.191:8000/(发布到tomcat根目录下)
邮件通知配置
勾选“Editable Email Notification” Global Recipient List:收件人列表(逗号分隔) Advanced Add a Triger Failure(失败时通知) Success(成功时通知) ……
勾选“Editable Email Notification” Global Recipient List:收件人列表(逗号分隔) Advanced Add a Triger Failure(失败时通知) Success(成功时通知) ……
配置SSH
用插件发布到tomcat有时会出错,还是用ssh命令比较稳定。
安装插件:Publish over SSH Plugin(安装后重启Hudson)
将本机的ssh公钥复制到远程主机上的authorized_keys文件中
系统管理 系统设置 Publish over SSH Path to key:/root/.ssh/id_rsa SSH Servers name:名称 hostname:xxx.xxx.xxx.xxx username:root Remote Directory:/home/wepu/hudson_workspace (服务器上存文件的基路径) Test Configuration(点击测试,测试是否连通)
对每个Job的设置 (勾选)Send build artifacts over SSH Name:上一步设置的名称 Source files:WpAuthService/target/*.war Remove prefix:WpAuthService/target(复制到服务器上时不要这个前缀,只复制*.war) Remote directory:wars/(所有的文件放到服务器上基路径下 的wars 目录下) Exec command:输入要执行的命令,这些命令在文件传输结束之后才被执行
0 0
- Hudson 配置javaEE 任务
- hudson任务配置说明
- hudson任务配置说明
- Hudson任务配置说明
- hudson配置
- 脚本启动hudson任务
- Hudson中新建任务
- 13 Maven-创建Hudson任务
- Hudson配置slave machine
- hudson 安全配置
- Hudson邮件配置
- Hudson安装、配置
- hudson 安装配置
- Ubuntu Hudson 安装配置
- Hudson环境配置
- hudson配置说明
- hudson新建项目配置
- hudson自动化配置小结
- Ubuntu 更新源
- ubuntu 镜像,使用本地源
- 定时清理 /tmp 目录
- Huson安装配置
- Mantis 规范
- Hudson 配置javaEE 任务
- Nexus安装配置
- 安装Maven,配置eclipse插件
- Maven 功能及其语法
- Tesklink
- Ubuntu 安装sogou flash
- GIT命令
- RAID 磁盘阵列 级别
- 内核架构