Hudson
Hudson only needs a Java 5 or newer runtime. Stand alone model:
1. You can simply run the command line: Java -jar hudson.war
2. To see Hudson, simply bring up a web browser and go to URL http://myServer:8080 where myServer is the name of the system running Hudson.
Deploy Hudson in web container
Sometimes, installing the Hudson in web container is a better choice. Hudson also uses the 8080 port. It will cause confliction if you also use tomcat and Hudson seperatelly.
1. Copy hudson.war to C:\apache-tomcat-7.0.23\webapps, and startup the tomcat server by clicking C:\apache-tomcat-7.0.23\bin\startup.bat.
2. To see Hudson, simply bring up a web browser and go to URL http://myServer:8080/hudson, where myServer is the name of the system running Hudson.
Note: We’d better add this environment variable for tomcat. CATALINA_OPTS=-Xmx1024m -Dorg.apache.jasper.runtime.BodyContentImpl.LIMIT_BUFFER=true -XX:MaxPermSize=256m
Sonar Plug-in for Huson
Copy the sonar.hpi into %HUDSON_HOME%\plugins. And restart the Tomcat server. Then the sonar plug-in will take effective in Hudson.
Sonar
1. Create database Save the following script as create_database.sql, and execute it on mysql command line tool.
- #
-
#CreateSonardatabaseanduser.
- #
- #Command:mysql-uroot-p<create_database.sql
- #
-
CREATEDATABASEsonarCHARACTERSETutf8COLLATEutf8_general_ci;
-
CREATEUSER'sonar'IDENTIFIEDBY'sonar';
-
GRANTALLONsonar.*TO'sonar'@'%'IDENTIFIEDBY'sonar';
-
GRANTALLONsonar.*TO'sonar'@'localhost'IDENTIFIEDBY'sonar';
-
FLUSHPRIVILEGES;
#
# Create Sonar database and user.
#
# Command: mysql -u root -p < create_database.sql
#
CREATE DATABASE sonar CHARACTER SET utf8 COLLATE utf8_general_ci;
CREATE USER 'sonar' IDENTIFIED BY 'sonar';
GRANT ALL ON sonar.* TO 'sonar'@'%' IDENTIFIED BY 'sonar';
GRANT ALL ON sonar.* TO 'sonar'@'localhost' IDENTIFIED BY 'sonar';
FLUSH PRIVILEGES;
2. unzip the distribution to C:\
3. If you do not use the default embedded database, edit conf/sonar.properties to configure the database access. Templates are available for every supported database. Just uncomment the lines you want.
- sonar.jdbc.url:jdbc:mysql://localhost:3306/sonar?useUnicode=true&characterEncoding=utf8
- sonar.jdbc.driverClassName:com.mysql.jdbc.Driver
-
sonar.jdbc.validationQuery:select1
- sonar.jdbc.username:sonar
- sonar.jdbc.password:sonar
sonar.jdbc.url: jdbc:mysql://localhost:3306/sonar?useUnicode=true&characterEncoding=utf8
sonar.jdbc.driverClassName: com.mysql.jdbc.Driver
sonar.jdbc.validationQuery: select 1
sonar.jdbc.username: sonar
sonar.jdbc.password: sonar
4. You can run sonar in standalone model by click C:/sonar-2.12/bin/windows-x86-32/ StartSonar.bat, and it will take port 80, you can use it by this link http://localhost:80/sonar. But we strongly recommend that you deploy it in web container. Let’s see
the next step.
5. Add environment variable CATALINA_OPTS with value
-Xmx1024m -Dorg.apache.jasper.runtime.BodyContentImpl.LIMIT_BUFFER=true -XX:MaxPermSize=256m
6. Click C:\sonar-2.12\war\build-war.bat to create a war file. And then copy the sonar.war to C:\apache-tomcat-7.0.23\webapps
Note: do NOT remove C:\sonar-2.12 after you deployed war file. The original folder is still useful.
Prior to Sonar 2.2, the WAR file must be rebuilt each time the configuration is updated (new plugins or new extensions).
From Sonar 2.2 onwards, the WAR file is now linked to the Sonar directory (the directory where the distribution is unzipped). It implies that : •the directory where the distribution is unzipped cannot be removed
•there is no need to rebuild the WAR when installing/uninstalling plugins or rule extensions
•the WAR file must be deployed on the host which contains the Sonar directory
•the WAR file must be rebuilt when the Sonar directory is moved
•the WAR file must be rebuilt when a configuration file is updated (directory conf/)
7. Restart the tomcat server. Access sonar by http://localhost:8080/sonar .
1. Hudson needs some disk space to perform builds and keep archives. By default, this is set to windows user folder “ /.hudson”, but you can change this by adding environment variable “HUDSON_HOME".
2. Open http://localhost:8080/hudson/ , and click “Manage Hudson” at left side, and then click “Configure system” to setup global configurations. Some of the configurations are required; you cannot build successfully if you ignore them.
JDK: configure the java_home of java runtime.
Maven: specify the maven home path.
3. If you have installed sonar.hpi, you can see the following segment in the “Configure system” page.
set the following fields:
Server URL : http://localhost:8080/sonar/
Database URL: jdbc:mysql://localhost:3306/sonar?useUnicode=true&characterEncoding=utf8
Database Driver: com.mysql.jdbc.Driver
Database login: sonar
Database password: sonar
4. At the same page, you can also set value for the “SMTP server”, so that Hudson will send mails to notify you when the build is broken or someone submitted error code to the SVN server.
5. and click “New Job” at left side. Give a name of the project and choice Build a Maven 2/3 project (Legacy), click “OK” button to navigate to next page.
6. At the “Source Code Management” choose the “SVN” option, specify value for “Repository URL”, and you will be asked for username and password later. You’d better specify the full path directly point at the project source folder, so that Hudson can find
the pom.xml easily without any further configurations.
e.g. svn://svnserver/SEC/projects/Megafon SNAP PoC/source code/trunk/brtconnector
7. If your workspace has the top-level pom.xml in somewhere other than the module root directory, specify the path (relative to the module root) here, such as parent/pom.xml.
If left empty, defaults to pom.xml
8. If you have installed sona.phi plug-in, select the checkbox before “Sonar” at the bottom of the page at “Post build Action” section.
9. Click the “Save” button to save all changes.
分享到:
相关推荐
Hudson安装与使用,Hudson配置,Hudson插件Hudson安装与使用,Hudson配置,Hudson插件Hudson安装与使用,Hudson配置,Hudson插件Hudson安装与使用,Hudson配置,Hudson插件Hudson安装与使用,Hudson配置,Hudson插件...
非常简单的Hudson安装步骤,简洁可行,还不用积分哦
hudson安装,配置,图解安装过程,欢迎下载阅读
集成工具hudson与maven2的Hudson 安装及配置
资源为Hudson安装压缩包和安装配置文档,包含远程部署到服务器上。或者直接安装到服务器
hudson安装详细步骤
hudson安装及使用手册,包含了linux上安装hudson的具体步骤和用的所有文件
对于没使用过hudson的朋友,看完了它绝对让你入门. 并且里面还有许多配置的介绍..
自动化测试框架的部署文档,持续集成、CI.
centos环境hudson自动化部署报告.doc
hudson安装及其配置 hudson平台搭建及使用 Hudson使用参考手册 关于hudson远程自动构建发布 使用hudson_搭建daily_build_系统
Hudson持续集成服务器的安装与配置
Hudson持续集成服务器的安装配置和使用,介绍Hudson的安装
Hudson_安装配置手册
•易于安装-只要把hudson.war部署到servlet容器,不需要数据库支持。 •易于配置-所有配置都是通过其提供的web界面实现。 •集成RSS/E-mail/IM-通过RSS发布构建结果或当构建失败时通过e-mail实时通知。 •生成...
hudson插件加载失败解决方案.pdf
Linux中安装hudson,并实现自动化部署
hudson打包工具,可用,将hudson .war拷贝到tomcat的webapp下,浏览器输入:http://localhost:8080/hudson访问,点击install安装插件,完成