I am currently configuring a Jenkins server hosted on a dockerDocker container in AWS.
I am using blue oceanBlueOcean to configure a repository.
Right now, the pipeline scans all branches on a repository to detect jenkins filesJenkinsfiles and then will automatically build on that branch if it detects changes. I scan the repo every 5 minutes to detect changes.
However, I do not want to be running builds and jobs automatically if it is some random feature branch. I am trying to limit the automatically triggered builds to only changes in staging and master branches.
So my question is, how/where do you configure Jenkins githubGitHub pipeline to only build on certain branches rather than scanning all branches?