Skip to content

417: The new executable property broke freestyle builds #303

Description

@hostalp

Jenkins and plugins versions report

Jenkins: 2.568.2
OS: Linux - 4.18.0-553.153.1.el8_10.x86_64
Java: 21.0.12 - Red Hat, Inc. (OpenJDK 64-Bit Server VM)
---
ssh-agent:417.v1d50b_f28f0e0

What Operating System are you using (both controller, and any agents involved in the problem)?

Rocky Linux 8.10
Rocky Linux 9.8

Reproduction steps

The executable property introduced in #296 appears to break at minimum our freestyle jobs. These now fail with an exception:

FATAL: [ssh-agent] Unable to start agent
java.lang.IllegalArgumentException: Not an ssh-agent executable path (filename must be ssh-agent(.exe)):
	at PluginClassLoader for ssh-agent//com.cloudbees.jenkins.plugins.sshagent.exec.ExecRemoteAgent.toSSHAgentPath(ExecRemoteAgent.java:93)
	at PluginClassLoader for ssh-agent//com.cloudbees.jenkins.plugins.sshagent.exec.ExecRemoteAgent.<init>(ExecRemoteAgent.java:79)
	at PluginClassLoader for ssh-agent//com.cloudbees.jenkins.plugins.sshagent.SSHAgentBuildWrapper$SSHAgentEnvironment.<init>(SSHAgentBuildWrapper.java:368)
	at PluginClassLoader for ssh-agent//com.cloudbees.jenkins.plugins.sshagent.SSHAgentBuildWrapper.createSSHAgentEnvironment(SSHAgentBuildWrapper.java:305)

Job configuration before the plugin upgrade:

<com.cloudbees.jenkins.plugins.sshagent.SSHAgentBuildWrapper plugin="[email protected]">
  <credentialIds>
    <string>...</string>
  </credentialIds>
  <ignoreMissing>false</ignoreMissing>
</com.cloudbees.jenkins.plugins.sshagent.SSHAgentBuildWrapper>

After the plugin upgrade:

<com.cloudbees.jenkins.plugins.sshagent.SSHAgentBuildWrapper plugin="[email protected]_5d68">
  <credentialIds>
    <string>...</string>
  </credentialIds>
  <ignoreMissing>false</ignoreMissing>
  <timeout>0</timeout>
  <executable></executable>
</com.cloudbees.jenkins.plugins.sshagent.SSHAgentBuildWrapper>

It appears that the executable must be specified to avoid the failure.

Also, the timeout appears to be 0 by default, but when setting the executable in the Web UI, it's required to specify the timeout as well, but only positive integer values may be specified and thus the non-default executable can't be used together with the default timeout.

Expected Results

Successful use of the ssh-agent.

Actual Results

Exception shown above.

Anything else?

No response

Are you interested in contributing a fix?

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions