Jenkins
Last updated
Last updated
1 or
Linux写入/etc/profile
or windows系统环境变量配置
3 Tomcat / Maven / Gradle / Ant if needed
Maven
Tomcat
install
configuration
access
开启自启动
1 System Configuration & global security & global tools & users
2 plugin related
change update site if needed
http://mirror.xmission.com/jenkins/updates/current/update-center.json
一些推荐插件
Git / Git Parameter / Rebuilder / GitHub Branch Source
Mailer Plugin / Email Extension Plugin
Timestamper、Ansicolor、Workspace Cleanup
Monitoring、Project statistics、Test Result Analyzer Plugin
Matrix Authorization Stratery Plugin
ThinBackup
Folders
...
3 change httpPort
locate jenkins.xml--> change --httpPort=8888
4 smtp server
basic
register 163 or other email for 授权码
System Admin email address must be same as below SMTP Username
==SMTP Password是客户端授权码不是邮箱密码==
Charset / Content Type / Recipients / Subject / Maxinum Attachment Size / Content / Triggers if needed
Item add post-build action -> E-mail Notification
Then test email funciton
advanced
finish basic email configuration
==check Enable Debug Mode==
add Always Trigger
readd Recipient List (==maybe bug==)
change content type to html
==change content templete==
Attach Build Log
item add post-build action -> Editable Email Notification
5 configure DingTalk
前置条件
将Jenkins的秘钥拷贝到Git服务器,以使其在拉取代码的时候免密码操作
将Jenkins的秘钥拷贝到tomcat服务器,以使其在同步等操作的时候免密码
命名规则:项目前缀 - 说明 - Job类型
配置Item(SCM、Build Triggers、Pre/Post-actions等)
SCM
System Configuration -> add Github server -> add secret text凭据 -> github创建token (check repo、admin:repo_hook) -> 添加凭据 -> 测试jenkins和Github 连通性
Item check github项目 -> 项目url
Item check git -> url -> github登录凭证
git开头的url才需要加公钥私钥
公钥加入github,私钥加入jenkins
ssh-keygen不是命令则需要加入环境变量
check GitHub hook trigger for GITScm polling
==webhook必须是外网可以访问的地址,github才能通知到jenkins==
check Use secret text or file -> add secret text ?????
then push to github for auto-build test
2
4