Created
July 19, 2017 13:15
-
-
Save th3hunt/13bcab138614c06d07911537c96a07c1 to your computer and use it in GitHub Desktop.
Jenkins LaunchAgent on OS X for user hudson
This file contains hidden or 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
<!-- | |
Set | |
--> | |
<?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>loginhook</string> | |
<key>ProgramArguments</key> | |
<array> | |
<string>USER_HOME/.loginhook</string> | |
</array> | |
<key>RunAtLoad</key> | |
<true/> | |
</dict> | |
</plist> |
This file contains hidden or 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
<!-- | |
Launch Jenkins Agent as a LaunchAgent. | |
launchd will keep this job running at all times | |
--> | |
<?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> | |
<!-- make sure /var/log/jenkins-agent directory exists and user has can write to it --> | |
<key>StandardOutPath</key> | |
<string>/var/log/jenkins-agent/jenkins-agent.log</string> | |
<key>StandardErrorPath</key> | |
<string>/var/log/jenkins-agent/jenkins-agent.log</string> | |
<key>KeepAlive</key> | |
<true/> | |
<key>Label</key> | |
<string>org.jenkins-agent</string> | |
<key>ProgramArguments</key> | |
<array> | |
<string>/usr/bin/java</string> | |
<string>-Duser.home=USER_HOME</string> | |
<string>-jar</string> | |
<string>PATH TO SLAVE.JAR</string> | |
<string>-jnlpUrl</string> | |
<string>JNLP URL</string> | |
<string>-secret</string> | |
<string>JNLP SECRET</string> | |
</array> | |
<key>RunAtLoad</key> | |
<true/> | |
</dict> | |
</plist> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment