yet-another-jenkins-notifier
yet-another-jenkins-notifier copied to clipboard
please support jobnames for multibranch pipelines
hello,
in this case of 2 artifacts with multibranch pipelines the job names are equal to master. http://localhost:8090/job/mypocketmod/job/master/ http://localhost:8090/job/mysuperfeature/job/master/ If i use many multibranch pipelines the jobs names are all unique :(
You can solve the problem by using the response json.fullDisplayName from the api url http://localhost:8090/job/mypocketmod/job/master/lastBuild/api/json
Here a sample json response:
{
"_class":"org.jenkinsci.plugins.workflow.job.WorkflowRun",
"actions":[
{
"_class":"hudson.model.CauseAction",
"causes":[
{
"_class":"hudson.model.Cause$UpstreamCause",
"shortDescription":"Gestartet durch vorgelagertes Projekt „NighlyTrigger“, Build 7",
"upstreamBuild":7,
"upstreamProject":"NighlyTrigger",
"upstreamUrl":"job/NighlyTrigger/"
}
]
},
{
},
{
},
{
},
{
},
{
},
{
"_class":"org.jenkinsci.plugins.pipeline.modeldefinition.actions.RestartDeclarativePipelineAction"
},
{
},
{
"_class":"org.jenkinsci.plugins.workflow.job.views.FlowGraphAction"
},
{
},
{
},
{
}
],
"artifacts":[
],
"building":true,
"description":null,
"displayName":"#3",
"duration":0,
"estimatedDuration":11686,
"executor":{
"_class":"hudson.model.OneOffExecutor"
},
"fullDisplayName":"mypocketmod » master #3",
"id":"3",
"keepLog":false,
"number":3,
"queueId":47,
"result":null,
"timestamp":1569762789037,
"url":"http://stachel:8090/job/mypocketmod/job/master/3/",
"changeSets":[
],
"culprits":[
],
"nextBuild":null,
"previousBuild":{
"number":2,
"url":"http://stachel:8090/job/mypocketmod/job/master/2/"
}
}
Thanks