Jenkins学习笔记

简介

      Jenkins,之前叫做Hudson,是基于Java开发的一种持续集成工具,用于监控秩序重复的工作,包括:

1、持续的软件版本发布/测试项目。

2、监控外部调用执行的工作。

安装

安装方法有两种

1.       官网下载安装包http://jenkins-ci.org/

2.       直接下载.war文件

使用

使用之前,要确保已经安装JDK环境

启动

 

1.可以通过.warjava –jar /Applications/Jenkins/jenkins.war,也可以通过org.jenkins-ci.plistsudo launchctl load /Library/LaunchDaemons/org.jenkins-ci.plist)。注意这是两个完全独立的工作空间:.war的工作空间在/Users/labuser/.jenkins下;org.jenkins-ci.plist的工作空间在/Users/Shared/Jenkins/Home

2.Dubious ownership on file

Reason: if a plist is owned by root and writable by a user other than root, that’s a security issue.

Solution: “sudo chown root ”;and then “sudo chmod 644 ”(4 for read access,2 for write access,1 for execute accessthe first number for the owner,the second for the group, the third for everyone)

出现此问题,可以说明文件的所有者和操作者不是同一个用户。可以ls –l查看目录下的org.jenkins-ci.plist的文件所有者,若非root,则将“sudo launchctl unload ……”中的sudo去掉即可

3.       没有必要为了运行jenkins或者正确拷贝仓库而enable security,若想enable security 可以去manage JenkinsàConfigure System

4.        

配置

 

1.关于git urlhost key 权限问题,通过为当前用户创建SSH,并用.war启动即可解决;

org.jenkins-ci.plist启动的用户是配置文件中的用户,需要为该用户创建SSH而不一定是当前用户

新建SSH:https://help.github.com/articles/generating-ssh-keys

注意新建过程中passphrase不用输入,直接回车即可

2.邮件配置http://blog.sina.com.cn/s/blog_5c9288aa0101b45g.html

现在MAC上配置IMAP的服务器,之后在Jenkins系统配置中,IMAPnamail.corp.adobe.com

3.需要安装git plugin github plugin插件

 

应用

可以通过localhost:8080/reload重载配置

可以通过localhost:8080/restart重启

可以通过localhost:8080/exit关闭

卸载

      Terminal窗口运行

Sh /Library/Application Support/Jenkins/Uninstall.command

sudo launchctl unload /Library/LaunchDaemons/org.jenkins-ci.plist
sudo rm -rf /Applications/Jenkins “/Library/Application Support/Jenkins” /Library/Documentation/Jenkins
and if you want to get rid of all the jobs and builds:

sudo rm -rf /Users/Shared/Jenkins
and to delete the jenkins user and group (if you chose to use them):

sudo dscl . -delete /Users/jenkins
sudo dscl . -delete /Groups/Jenkins

 

 

参考资料

http://www.cnblogs.com/itech/archive/2011/11/23/2260009.html

http://my.oschina.net/fhck/blog/64635

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值