Created
August 1, 2018 10:57
-
-
Save rhodrid/7ba81fba3a1f8fa0c809154cc0cdef8c to your computer and use it in GitHub Desktop.
MacOS: Run Jenkins Slave as a Service
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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.ci</string> | |
<key>UserName</key> | |
<string>jenkins</string> | |
<key>SessionCreate</key> | |
<true/> | |
<key>ProgramArguments</key> | |
<array> | |
<string>java</string> | |
<string>-Djava.awt.headless=true</string> | |
<string>-jar</string> | |
<string>/Users/jenkins/Desktop/slave.jar</string> | |
<string>-jnlpUrl</string> | |
<string>http://192.168.1.151:8080/computer/mac_vm/slave-agent.jnlp</string> | |
</array> | |
<key>KeepAlive</key> | |
<true/> | |
<key>StandardOutPath</key> | |
<string>/Users/jenkins/Desktop/stdout.log</string> | |
<key>StandardErrorPath</key> | |
<string>/Users/jenkins/Desktop/error.log</string> | |
</dict> | |
</plist> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cp com.jenkins.ci.plist /Library/LaunchDaemons | |
sudo chown root /Library/LaunchDaemons/com.jenkins.ci.plist | |
sudo chmod 644 /Library/LaunchDaemons/com.jenkins.ci.plist |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment