I am trying to setup Jenkins Slave on mac mini. Have created /Library/LaunchDaemons/com.jenkins.ci.plist
with following contents
<?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>/usr/bin/java</string>
<string>-Djava.awt.headless=true</string>
<string>-jar</string>
<string>/Users/jenkins/agent.jar</string>
<string>-jnlpUrl</string>
<string>http://jenkins.example.com:8080/computer/jenkins2-slave3/slave-agent.jnlp</string>
<string>-secret</string>
<string>****************************</string>
<string>-workDir</string>
<string>"/Users/jenkins/jenkins_slave/"</string>
</array>
<key>RunAtLoad</key>
<true/>
<key>KeepAlive</key>
<true/>
<key>StandardErrorPath</key>
<string>/Users/jenkins/error.log</string>
<key>StandardOutPath</key>
<string>/Users/jenkins/stdout.log</string>
</dict>
</plist>
But when I reboot mac mini, jenkins agent doesn't start automatically. Every time i have to run manual command in the terminal.
jenkins2-slave3:~ jenkins$ java -version
java version "1.8.0_181"
Java(TM) SE Runtime Environment (build 1.8.0_181-b13)
Java HotSpot(TM) 64-Bit Server VM (build 25.181-b13, mixed mode)
What I am missing here ?
Best Answer
Removing double quotes from this like help to fix the issue.