syed
October 13, 2021, 5:51am
1
Hi Team,
We are trying to implement webhhok for jenkin job which are getting triggered when master branch is merged in bitbucket.
Facing issue in restricting the webhook for master branch in jenkin, please help in implementing jenking for master branch only
halkeye
(Gavin Mogan)
October 13, 2021, 5:55am
2
I wouldn’t bother trying to filter out master branch for webhook. I would recommend using https://plugins.jenkins.io/cloudbees-bitbucket-branch-source/ and setting up a multibranch pipeline, then restricting it to just master.
Or you could go a normal pipeline, and check the branch name env variable, then throw an error if its the wrong branch.
Generally when asking a question/for help its useful to include
What did you try
What did you expect to happen
What did happen
If you want someone to 100% solve the problem for you, then I recommend hiring a contractor instead of asking for help from the community.
syed
November 23, 2021, 5:17am
3
we have tried using bitbucket branch source plugin after upgrading our jenkins platform and still we are getting the same result.
we are trying to implement “generic webhook trigger” instead of “poll SCM” for all the jobs in jenkins specifically for master branch only. Please let me know if you need more details