Mac OS 自动启动Jenkins slave
iOS打包需要在OS系统上,因此要使用Jenkins打包,需要添加一台Mac OS从。
配置slave节点
mac 上设置自启动
$ vi ~/Library/LaunchAgents/com.ttlsa.jenkins.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.ttlsa.jenkins</string> <key>ProgramArguments</key> <array> <string>/usr/bin/java</string> <string>-jar</string> <string>/Users/ttlsa/Downloads/slave.jar</string> <string>-jnlpUrl</string> <string>https://jenkins.ttlsa.com/computer/mac%20node/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>/var/log/jenkins-stdout.log</string> <key>StandardErrorPath</key> <string>/var/log/jenkins-error.log</string> </dict> </plist>
-jar、-jnlpUrl、-secret 请根据自己实际情况进行修改。
加载配置
$ launchctl load ~/Library/LaunchAgents/com.ttlsa.jenkins.plist
本文由主机测评网发布,不代表主机测评网立场,转载联系作者并注明出处:https://zhuji.jb51.net/yunwei/8329.html