Mac OS 自动启动Jenkins slave

默北 自动化运维Mac OS 自动启动Jenkins slave已关闭评论26,577字数 960阅读3分12秒阅读模式

iOS打包需要在OS系统上,因此要使用Jenkins打包,需要添加一台Mac OS从。

配置slave节点

jenkins文章源自运维生存时间-https://www.ttlsa.com/auto/mac-os-autostart-jenkins-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 请根据自己实际情况进行修改。文章源自运维生存时间-https://www.ttlsa.com/auto/mac-os-autostart-jenkins-slave/

加载配置

$ launchctl load ~/Library/LaunchAgents/com.ttlsa.jenkins.plist
文章源自运维生存时间-https://www.ttlsa.com/auto/mac-os-autostart-jenkins-slave/文章源自运维生存时间-https://www.ttlsa.com/auto/mac-os-autostart-jenkins-slave/
weinxin
我的微信
微信公众号
扫一扫关注运维生存时间公众号,获取最新技术文章~
默北
  • 本文由 发表于 10/05/2016 15:48:09
  • 转载请务必保留本文链接:https://www.ttlsa.com/auto/mac-os-autostart-jenkins-slave/