mac jenkins环境安装及jenkins使用(未完待续)

1.  installer方式安装

注:
也可以下载jenkins.war, 然后运行java -jar jenkins.war,进行安装。

步骤:

1) 从下面下载installer
http://jenkins-ci.org/content/thank-you-downloading-os-x-installer

2)   直接点击pkg安装即可

3)  安装后:
默认打开: http://localhost:8080

mac jenkins环境安装及jenkins使用(未完待续)_第1张图片


如果要修改端口,比如7070,可在第8步重启jenkins前执行以下命令修改端口参数:

sudo defaults write /Library/Preferences/org.jenkins-ci httpPort 7070  

然后重启jenkins:

sudo launchctl unload -w /Library/LaunchDaemons/org.jenkins-ci.plist  
sudo launchctl load -w /Library/LaunchDaemons/org.jenkins-ci.plist 

到此,可以访问了:http://localhost:7070


2.  使用

正确的启动方式是:

sudo launchctl unload /Library/LaunchDaemaons/org.jenkins-ci.plist

 java -jar /Applications/Jenkins/jenkins.war --httpPort=8080

这时,jenkies会在/Users/[user name]/.jenkins 下面建立工作目录,从而它就有权限去获取相关的keychain。访问http://localhost:8080即可。

注: 如果想使用7070端口,启动方式:

sudo launchctl unload /Library/LaunchDaemaons/org.jenkins-ci.plist

 java -jar /Applications/Jenkins/jenkins.war --httpPort=8080


3. 插件安装

例如:  jenkins github相关插件安装

到jenkins页面,jenkins->系统管理->插件管理->可选插件中安装以下插件

GIT plugin
GitHub plugin
Post-Build Script Plug-in


4. 开启用户权限

选中Jenkins->Manage Jenkins->Configure Global Security->Enable Security->Jenkins's own user database->Allow users to sign up
选中Jenkins->Manage Jenkins->Configure Global Security->Enable Security->Project-based Matrix Authorization Strategy

5.  详细使用

http://crazysky.iteye.com/blog/1763673
http://blog.csdn.net/qs_csu/article/details/9356023
https://wiki.jenkins-ci.org/display/JENKINS/Use+Jenkins



待做:

集成 sonar, junit , 

参考:

http://crazysky.iteye.com/blog/1763673

http://blog.csdn.net/qs_csu/article/details/9356023

http://www.cocoachina.com/ios/20150821/13061.html










你可能感兴趣的:(mac jenkins环境安装及jenkins使用(未完待续))