I am trying to create a batch file that will connect slave node to master jenkins on boot.
I can successfully connect by manually typing:
java -jar slave.jar -jnlpUrl http://jenkinsURL:8080/jenkins/computer/Selenium%20Slave/slave-agent.jnlp -secret secret key
But when I try running the script that has the exact same command, it returns Failing to obtain http://jenkinsurl:8080/jenkins/computer/Selenium0Slave/slave-agent.jnlp?encrypt=true
and fails to process the connection.
Batch script:
start cmd /k java -jar slave.jar -jnlpUrl http://jenkinsurl:8080/jenkins/computer/Selenium%20Slave/slave-agent.jnlp -secret secretkey
Why does it return different URL when executed with a batch file? If anyone has successfully done this I would really appreciate your feedback. Thanks!