Reputation: 39
I have a Jenkins server in my localhost that is trying to connect to a remote server. Using the plugin ssh publish over I am copying my workspace to a folder in my remote server. Now what I whould like to do is ones the folders are copied across I would like to run npm install and npm start from jenkins to start the node service in the remote computer but I get the following error:
SSH: EXEC: STDOUT/STDERR from command [npm intall && npm start && exit ] ... SSH: EXEC: completed after 200 ms SSH: Disconnecting configuration [api] ... ERROR: Exception when publishing, exception message [Exec exit status not zero. Status [-1]] Build step 'Send build artifacts over SSH' changed build result to UNSTABLE Finished: UNSTABLE
my screen in my job looks like this :
can someone tell me why this simple exec commands are making the build unstable? the files are being copied fine the only problem re the commands which don't do anything. Thanks
Upvotes: 1
Views: 18997
Reputation: 77
Looks like you have typo in running first command itself, post successful transfer of files.
You can enable verbose output to get more info of ssh Transfer : https://web.archive.org/web/20181012120424/https://wiki.jenkins.io/download/attachments/53608875/pos-server-advanced.png?version=2&modificationDate=1321576167000&api=v2
'Çlick' Advanced.. button below 'Name' textbox & enable 'Verbose output in console'
First it does file Transfer then runs command.
So try running command in sequence first by correcting typo on 'npm install'
And use echo $? after every command run
Upvotes: 4