is this also affecting sshagent? ( so not only checkout scm ) ?
so the ssh keys in the following snippet are not setup correctly inside the container block in the following example
sh("do something that requires the ssh auth")
No issue with the sshagent step: the ssh-agent command is indeed executed in the correct container
but the knownhosts file was not updated:
the checkout scm step, updates automatically the knownhosts file
so if we run in the same container where the checkout scm was executed, sshagent works without problems.
but if we switch containers and execute on a different container than 'jnlp' ( reminder of the main topic in this ticket: checkout scm is always executed in the container named 'jnlp' )
then in the new container the knowshosts file needs to be updated manually...