0. 錯(cuò)誤Log
13:40:25 TestNG Reports Processing: START
13:40:25 Looking for TestNG results report in workspace using pattern: test-output/testng-results.xml
13:40:25 testng-results.xml was last modified before this build started. Ignoring it.
13:40:25 Saving reports...
13:40:25 Found matching files but did not find any TestNG results.
Jenkins TestNG 在解析report 時(shí)候出現(xiàn)上述錯(cuò)誤, 導(dǎo)致job 無論成功與否都是返回SUCCESS
1. Root Cause :
Jenkins slave 和 master 時(shí)間不同步

image.png
2. 解決方法(CentOS 7)
- 安裝NTP 服務(wù)
# install ntp service
yum install ntp -y
sed -i 's/^server/#server/g' /etc/ntp.conf
cat <<EOF >> /etc/ntp.conf
#Conifgure ntp servers same as jenkins-master
server 1.ntp.xxx.xxx.com iburst
server 2.ntp.xxx.xxx.com iburst
server ntp1.xxx.xxx.xxx.com iburst
server ntp2.xxx.xxx.xxx.com iburst
EOF
service ntpd start
- 確保slave 和master 處于
In sync狀態(tài)
image.png
