node
{
def credentials = 'somecredentials'
sshagent (credentials: [credentials])
{
sh ( script:"""
rm -rf common_jenkins_jobs
git clone ssh://gito...@somerepos.git
""")
}
}
node ( "ci-server-slave" )
{
def credentials = 'somecredentials
'
sshagent (credentials: [credentials])
{
sh ( script:"""
rm -rf common_jenkins_jobs
git clone ssh://gito...@somerepos.git
""")
}
}
but the part that runs on the slave shows the sequence:
leaving the git clone out of the ssh-agent environment and failing due to lack of crecedentials.
I attached the log of the second node on a simpler test where the sh step only runs an ls ltr command. There you can clearly see that the ls command runs after the ssh-agent ends.
¿ Can this behaviour be part of some missconfiguration on my part or is a bug on the ssh agent step ?