使用Heredoc块时,如何避免在Jenkins上被ssh-agent杀死?

我在Jenkins的构建步骤“执行外壳”中使用了Heredoc块:

ssh $INSTANCE << EOSSH
sudo systemctl restart my.service
timeout 10 tail -f /srv/myService/myService.log
EOSSH

执行有效,但是在处理完詹金斯工作后失败:

Build step 'Execute shell' marked build as failure

在处理ssh块后如何执行它而不会失败?

woxxx123 回答:使用Heredoc块时,如何避免在Jenkins上被ssh-agent杀死?

暂时没有好的解决方案,如果你有好的解决方案,请发邮件至:iooj@foxmail.com
本文链接:https://www.f2er.com/3103364.html

大家都在问