We are deploying a Netlify site as part of a Jenkins build, and sometimes are seeing what look like network connection issues between our CI provider and Netlify. The troublesome aspect here is that Jenkins fails to flag these builds as failed, thinking that they've succeeded regardless of this error output at the bottom of the console log:
+ netlify deploy -t deadbeef .
Deploying folder: .
{ client:
{ access_token: 'acdc1234',
client_id: 'abba4321',
client_secret: undefined,
redirect_uri: undefined,
ENDPOINT: 'https://api.netlify.com',
VERSION: 'v1',
hostname: 'api.netlify.com',
ssl: [ 'https://', index: 0, input: 'https://api.netlify.com' ],
port: 443,
http:
{ Server: [Object],
createServer: [Function],
globalAgent: [Object],
Agent: [Object],
request: [Function],
get: [Function] } },
data:
{ Error: socket hang up
at createHangUpError (_http_client.js:250:15)
at TLSSocket.socketOnEnd (_http_client.js:342:23)
at emitNone (events.js:91:20)
at TLSSocket.emit (events.js:185:7)
at endReadableNT (_stream_readable.js:926:12)
at _combinedTickCallback (internal/process/next_tick.js:74:11)
at process._tickCallback (internal/process/next_tick.js:98:9) code: 'ECONNRESET' },
meta: null }
Potentially unhandled rejection [3] SyntaxError: Unexpected token E in JSON at position 0
at Object.parse (native)
at Object.exports.log (/data/jenkins-vrci/home/tools/jenkins.plugins.nodejs.tools.NodeJSInstallation/Node.js_6.2.0/lib/node_modules/netlify-cli/lib/helpers/error_logger.js:11:21)
at /data/jenkins-vrci/home/tools/jenkins.plugins.nodejs.tools.NodeJSInstallation/Node.js_6.2.0/lib/node_modules/netlify-cli/lib/commands/deploy.js:144:17
at tryCatchReject (/data/jenkins-vrci/home/tools/jenkins.plugins.nodejs.tools.NodeJSInstallation/Node.js_6.2.0/lib/node_modules/netlify-cli/node_modules/when/lib/makePromise.js:845:30)
at runContinuation1 (/data/jenkins-vrci/home/tools/jenkins.plugins.nodejs.tools.NodeJSInstallation/Node.js_6.2.0/lib/node_modules/netlify-cli/node_modules/when/lib/makePromise.js:804:4)
at Rejected.when (/data/jenkins-vrci/home/tools/jenkins.plugins.nodejs.tools.NodeJSInstallation/Node.js_6.2.0/lib/node_modules/netlify-cli/node_modules/when/lib/makePromise.js:625:4)
at Pending.run (/data/jenkins-vrci/home/tools/jenkins.plugins.nodejs.tools.NodeJSInstallation/Node.js_6.2.0/lib/node_modules/netlify-cli/node_modules/when/lib/makePromise.js:483:13)
at Scheduler._drain (/data/jenkins-vrci/home/tools/jenkins.plugins.nodejs.tools.NodeJSInstallation/Node.js_6.2.0/lib/node_modules/netlify-cli/node_modules/when/lib/Scheduler.js:62:19)
at Scheduler.drain (/data/jenkins-vrci/home/tools/jenkins.plugins.nodejs.tools.NodeJSInstallation/Node.js_6.2.0/lib/node_modules/netlify-cli/node_modules/when/lib/Scheduler.js:27:9)
at _combinedTickCallback (internal/process/next_tick.js:67:7)
The "error handling error" seems to be trying to parse error.data, containing the string "Error: ..." in error_logger.js. Don't know why that would cause an exit with return code 0 though, or if there are more Jenkins shenanigans actually causing that.
We are deploying a Netlify site as part of a Jenkins build, and sometimes are seeing what look like network connection issues between our CI provider and Netlify. The troublesome aspect here is that Jenkins fails to flag these builds as failed, thinking that they've succeeded regardless of this error output at the bottom of the console log:
The "error handling error" seems to be trying to parse
error.data, containing the string "Error: ..." in error_logger.js. Don't know why that would cause an exit with return code 0 though, or if there are more Jenkins shenanigans actually causing that.