From ec8ad9095325e46ae2d5dab9446d9d0aa32872d4 Mon Sep 17 00:00:00 2001 From: Dan Hawkins Date: Wed, 17 Nov 2021 21:47:57 +0000 Subject: [PATCH] Add use of post build info json --- build/postactions.groovy | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/build/postactions.groovy b/build/postactions.groovy index 0092f44..b5662c7 100644 --- a/build/postactions.groovy +++ b/build/postactions.groovy @@ -92,8 +92,13 @@ def performSuccessfulBuildActions() { def postbuildinfo = readJSON(text: POST_BUILD_INFO) def postbuildjsontext = writeJSON(returnText: true, json: postbuildinfo, pretty: 1) echo "Post build info:\n${postbuildjsontext}" - postbuildactions = postbuildinfo['Build outcomes']['Success']['Actions'] - postbuildinfoavailable = true + try { + postbuildactions = postbuildinfo['Build outcomes']['Success']['Actions'] + postbuildinfoavailable = true + } catch(Exception ex) { + postbuildinfoavailable = false + postbuildactions = null + } } def String buildselector = "${BUILD_NUMBER}" deployjob(buildselector, postbuildactions, 'Deploy doxygen', 'DOXYGEN_DEPLOY_JOB')