Add use of post build info json
This commit is contained in:
parent
fa3340487d
commit
951d694051
1 changed files with 8 additions and 6 deletions
|
|
@ -44,13 +44,15 @@ def getActionJobName(postbuildactions, String action, String alternativeparamnam
|
|||
}
|
||||
}
|
||||
}
|
||||
def jobitem = Jenkins.instance.getItemByFullName(jobname)
|
||||
if (jobitem) {
|
||||
if (!jobitem.isBuildable()) {
|
||||
if (!jobname) {
|
||||
def jobitem = Jenkins.instance.getItemByFullName(jobname)
|
||||
if (jobitem) {
|
||||
if (!jobitem.isBuildable()) {
|
||||
jobname = ''
|
||||
}
|
||||
} else {
|
||||
jobname = ''
|
||||
}
|
||||
} else {
|
||||
jobname = ''
|
||||
}
|
||||
return jobname
|
||||
}
|
||||
|
|
@ -86,7 +88,7 @@ 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']['Action']
|
||||
postbuildactions = postbuildinfo['Build outcomes']['Success']['Actions']
|
||||
postbuildinfoavailable = true
|
||||
}
|
||||
def String buildselector = "<SpecificBuildSelector plugin='copyartifact@1.46.2'><buildNumber>${BUILD_NUMBER}</buildNumber></SpecificBuildSelector>"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue