Skip to content

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

@oleg-nenashev

Description

@oleg-nenashev

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions