Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Jenkins#getJnlpJars() API does not work properly in Jenkinsfile Runner when running without --war #413

Open
oleg-nenashev opened this issue Nov 1, 2020 · 0 comments
Labels
bug Something isn't working

Comments

@oleg-nenashev
Copy link
Member

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.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant