we are trying to implement “generic webhook trigger” instead of “poll SCM” for all the jobs in jenkins specifically for master branch only. And its getting triggered for all the code merge in bitbucket but we wanted to implement webhook for master only (qc to master merge on bitbucket)
If your Jenkins jobs are organization folder jobs or multibranch pipeline jobs, then you may be able to modify the organization folder or multibranch pipeline job definition to only track the master branch. Look for the “Basic branch build strategies” plugin user documentation.
If your Jenkins jobs are Declarative Pipeline jobs, you can use a
when directive to limit the job to only run on a specific branch.
If your Jenkins jobs are scripted Pipeline, you can check the current branch and exit early from the Pipeline.
If your Jenkins jobs are Freestyle, you can limit the name of the branch that you build to only build the master branch.
we have installed the suggested “Basic branch build strategies” plugin but not able to find any additional field in the pipeline job configuration in jenkins. Please confirm that this plugin installation is sufficient to utilize its feature or has dependencies on other plugin needed to be installed.
The plugin provides basic branch build strategies, as it says it does.
See the user documentation for more details, including screenshots.
Note that the basic branch build strategies plugin adapts multibranch Pipelines and organization folder Pipelines. It does not alter Pipelines that are dedicated to a single branch.
can you pls suggest what value should be provided in fields if we opt for “generic webhook trigger”…
in post content parameter section of generic webhook trigger
In Optional filter section of generic webhook trigger
Sorry, but I’m not a user of generic webhook trigger. I don’t have any suggestions to offer. I prefer and use the branch sources like GitHub, Bitbucket, GitLab, and Gitea. Others use branch sources like Tuleap, AWS CodeCommit, and DAGSHub. You can read more about them through the links at Branches and Pull Requests
it will be really helpful if you can tag someone you feel who can share information about generic webhook trigger option in jenkins