We have a matrix job with "SSH Agent" enabled in "Build Environment" with credentials and a post-build action of "Execute Scripts On Matrix" with a shell command that requires those credentials.
We recently upgraded from Jenkins v2.249.3 to v2.263.1 (and potentially upgraded some plugins at the same time, though I don't believe that we upgraded any of the ssh-related ones.) The aforementioned shell command now fails because it no longer has access to the ssh credentials it requires.
Comparing the parent logs, we see a new call to "ssh-agent -k" in the Jenkins v2.263.1 parent job log immediately after the matrix children complete and before "[PostBuildScript] - [INFO] Executing post build scripts." that wasn't present with Jenkins v2.249.3.
It would appear that the agent is being killed by Jenkins v2.263.1 whereas it wasn't with Jenkins v2.249.3. I was unable to find a setting that controls this.
(We also upgraded from Debian 10.6 to Debian 10.7 at the same time, which meant upgrading from openjdk-11-jre-headless from 11.0.9+11-1~deb10u1 to 11.0.9.1+1-1~deb10u2 which seems unlikely to be the cause.)
[JENKINS-64394] ssh-agent killed before "Execute Scripts on Matrix" post-build action run
Component/s | New: core [ 15593 ] |
Environment |
Original:
Debian GNU/Linux 10.7
SSH Agent Plugin (ssh-agent): 1.20 SSH Credentials Plugin (ssh-credentials): 1.18.1 Credentials Binding Plugin (credentials-binding): 1.24 Credentials Plugin (credentials): 2.3.14 |
New:
Jenkins v2.263.1, v2.263.2
Debian GNU/Linux 10.7 SSH Agent Plugin (ssh-agent): 1.20 SSH Credentials Plugin (ssh-credentials): 1.18.1 Credentials Binding Plugin (credentials-binding): 1.24 Credentials Plugin (credentials): 2.3.14 |
Summary | Original: ssh-agent killed before "Execute Scripts on Matrix" shell command run | New: ssh-agent killed before "Execute Scripts on Matrix" post-build action run |
Assignee | Original: Kohsuke Kawaguchi [ kohsuke ] |
Environment |
Original:
Jenkins v2.263.1, v2.263.2
Debian GNU/Linux 10.7 SSH Agent Plugin (ssh-agent): 1.20 SSH Credentials Plugin (ssh-credentials): 1.18.1 Credentials Binding Plugin (credentials-binding): 1.24 Credentials Plugin (credentials): 2.3.14 |
New:
Jenkins v2.263.1, v2.263.2, 2.277.1
Debian GNU/Linux 10.7 SSH Agent Plugin (ssh-agent): 1.20 SSH Credentials Plugin (ssh-credentials): 1.18.1 Credentials Binding Plugin (credentials-binding): 1.24 Credentials Plugin (credentials): 2.3.14 |