-
-
Notifications
You must be signed in to change notification settings - Fork 308
Description
Jenkins#getJnlpJars() API is used to retrieve remoting.jar and jenkins-cli.jar, e.g. SSH Build Agents plugin uses it to install the agent executable on the target host. When Jenkins is packaged with Jenkinsfile Runner, the Jenkins core's logic identifies the source of the Remoting launcher class as JAR and tries to load remoting.jar from a hardcoded WEB-INF/lib/remoting.jar resource. This resource is present in Jenkins WAR packaging, but in JFR the library is located eslewhere. So SSH Build Agents and a few other plugins will fail to retireve the resource
Workaround
Specify a path to WAR by using the -w argument. Full WAR is not required in this directory, just the WEB-INF/lib/remoting.jar file
Full solution
Jenkins core needs to be updated to support custom part to Remoting and Jenkins CLI paths on the filesystem. To do that, a custom system property might be required in the Jenkins core.