在/ Library/LaunchAgents創建com.jenkins.slave.plist:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>com.jenkins.slave</string>
<key>ProgramArguments</key>
<array>
<string>/usr/bin/java</string>
<string>-jar</string>
<string>/Users/jenkins/slave.jar</string>
<string>-jnlpUrl</string>
<string>https://YOUR_JENKINS/computer/mac-os-x/slave-agent.jnlp</string>
<string>-noCertificateCheck</string>
<string>-secret</string>
<string>YOUR_SECRET</string>
</array>
<key>RunAtLoad</key>
<true/>
<key>KeepAlive</key>
<true/>
<key>StandardOutPath</key>
<string>/Users/jenkins/stdout.log</string>
<key>StandardErrorPath</key>
<string>/Users/jenkins/error.log</string>
</dict>
</plist>
然後,更新YOUR_JENKINS和YOUR_SECRET憑據,負載服務通過:
sudo launchctl load /Library/LaunchAgents/com.jenkins.slave.plist
在下一次登錄時,您的從站將自動連接到Jenkins Maste河
看到這個,我真的很興奮。但它在步驟失敗。 「無法使用此API令牌驗證」。我確保我輸入正確。 –
KitKarson
2014-10-17 15:29:40