How to use Jenkins GitHub Organization Folder with github protected branches? -


it seems updates made in last 2 weeks jenkins plugins or github api introduce strange behaviour on github.

now can prevent pr being merged if specific jenkins branch-job not green somehow seems impossible check if current pr green.

if not select branch in github repository configuration jenkins build not happen , user able merge change.

if check 1 of them jenkins build , surprise can see job name matching pr name. wonderful, somehow seems generic check named "jenkins" still waiting status check, 1 never happen, preventing merging.

enter image description here enter image description here

the last screenshot explains best: named merge green expected have generic 1 "jenkins" still "waiting status reported" nothing reported jenkins.

you must set diplay name github plugin, when doesn't set, plugin fallbacks build name.

i didn't find correct way when use github organization plugin pipeline. , implemented setting project properties jenkinsfile:

properties properties: [pipelinetriggers([]), [$class: 'githubprojectproperty', displayname: 'jenkins']] 

and set status manually:

step([$class: 'githubcommitstatussetter', statusresultsource: [$class: 'conditionalstatusresultsource', results: [[$class: 'betterthanorequalbuildresult', message: 'build success', result: 'success', state: 'success']]]]) 

this doesn't remove jenkins job pr-xxxx status, adds jenkins status wich can use required check


Comments