一jenkins啟動命令:jenkins
查看端口號:
1、lsof -i:端口號
2、netstat -tunlp|grep 端口號
3 查看:ps -ef | grep -v grep |grep jenkins
Mac下盡量使用命令行安裝 jenkins 方法
https://blog.csdn.net/u011537073/article/details/80025716
1、安裝brew
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" 1
2、安裝jenkins
brew install jenkins
3、鏈接launchd配置文件
ln -sfv /usr/local/opt/jenkins/*.plist ~/Library/LaunchAgents
4、啟動jenkins
launchctl load ~/Library/LaunchAgents/homebrew.mxcl.jenkins.plist
5、停止jenkins
launchctl unload ~/Library/LaunchAgents/homebrew.mxcl.jenkins.plist
卸載:
方法1:執行命令/Library/Application Support/Jenkins/Uninstall.command
方法2:前往文件夾:/Library/Application Support/Jenkins,雙擊Uninstall.command
完成
二: 登錄:http://localhost:8080
輸入:userName :****
password:*****
三 jenkins安裝maven 插件
系統管理-插件管理-可選插件:maven Intergration 直接安裝,然后重啟jenkins;
可安裝其他插件:git....
四 全局工具配置
1)maven 本地安裝路徑:
2)jdk 本地安裝路徑:
3)git 本地安裝路徑:
阿里郵箱:
1)郵箱插件:
2)填寫全局郵件配置:
項目中配置接受人和模版:
五 git 賬戶設置
1) 進入Credentials -System(圖一),進行新建add-domain;
2)填寫git 相關信息(圖二):
ssh-key 獲取:cat /Users/***/.ssh/id_rsa.pub()
六 新建項目:
1)圖一:輸入項目名稱,選擇maven 構建
2) 選擇“丟棄舊的構建”
3)源碼管理(圖三):
1 配置git 項目路徑
2 選擇git 賬戶,無則添加
3 填寫管理分支
4 )構建設置,然后保存/應用即可:
build 設置執行命令: clean test -DxmlFileName=testNG.xml
打包不執行test:mvn clean package -DskipTests
備注:此處不能添加mvn
5) 若有其他需要可進行添加