Jenkins with Github Trigger (Github Plugin): How to use other branch (aside from master/main)?

131 views Asked by At

Description:

I am trying to have Github webhook to trigger my Jenkins job. I am successful in triggering the job using the Main branch but no success using other branches. I have a new branch called 'develop' but it does not trigger the job.

Current Setup:

In Jenkins, I am using Pipeline -> Pipeline Script from SCM.

Under SCM, My repository is defined and it can access Main branch pr

enter image description here

But when I change it to other branch like 'develop', It does not work.

Is there additional configuration to use other branches?

1

There are 1 answers

0
Dean Pinlac On BEST ANSWER

Apparently, the input is accepting Regular Expression. The initial specified branch is '*/master'. Therefore, I used '*/develop' to trigger my Jenkins job for develop branch