Publish over ssh error

112 views
Skip to first unread message

Chris McCallan

unread,
Apr 19, 2018, 10:39:32 AM4/19/18
to jenkins...@googlegroups.com
I'm running an ansible playbook with jenkins using the Publish Over SSH Plugin. The jenkins jobs pulls the source code down from a bitbucket repository, transfers the files over to the remote server and runs the playbook.

Some of the tasks in the playbook will fail, which is fine as the playbook catches these fails and runs other commands because of this. But the job is failing because of this. Error is below

SSH: EXEC: completed after 403,590 ms
SSH: Disconnecting configuration [server] ...
ERROR: Exception when publishing, exception message [Exec exit status not zero. Status [2]]
Build step 'Send files or execute commands over SSH' changed build result to UNSTABLE
Finished: UNSTABLE

Can't find anything on this error, would anyone have any experience with it?

Slide

unread,
Apr 19, 2018, 10:49:34 AM4/19/18
to jenkins...@googlegroups.com
It looks like you are using commands in the exec area of the publish-over-ssh plugin. If the status of those commands is non-zero (the normal success exit code on *NIX systems), then the exec will cause the build to change to unstable. You just need to make sure the exit code for the commands is zero in the end.

--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-use...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/6e1454ef-eedb-4fba-b1d8-25b7d6b54ec6%40me.com.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages