From b8d5331e79a0896b8703514a3fc85025ad8029fe Mon Sep 17 00:00:00 2001 From: Jesse Glick Date: Thu, 3 May 2018 11:50:07 -0400 Subject: [PATCH] The git part of JENKINS-50777 is not yet released, so make this lack of information nonfatal. --- incrementals-publisher/index.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/incrementals-publisher/index.js b/incrementals-publisher/index.js index 1ba05f0..c832420 100644 --- a/incrementals-publisher/index.js +++ b/incrementals-publisher/index.js @@ -83,7 +83,11 @@ module.exports = async (context, data) => { if (!buildMetadataParsed.hash) { context.log.error('Unable to retrieve a hash or pullHash', buildMetadataJSON); - return failRequest(context, 'Unable to retrieve a hash or pullHash'); + context.res = { + status: 200, + body: 'Did not find a Git commit hash associated with this build. Some plugins on ' + JENKINS_HOST + ' may not yet have been updated with JENKINS-50777 REST API enhancements. Skipping deployment.\n' + }; + return; } let folderMetadata = await fetch(process.env.FOLDER_METADATA_URL || pipeline.getFolderApiUrl(buildUrl), jenkinsOpts);