Git Branch WorkFLow

 I want a Jenkins pipeline to build and deploy an application with the following conditions.

  1. Development starts with a feature branch by developers committing code to the feature branch. 
  2. Whenever a developer raises a PR from the feature branch to develop a branch, a Jenkins pipeline should trigger to run a unit test and static code analysis. 
  3. After testing the code successfully in the feature branch, the developer merges the PR to the develop branch.
  4. When the code is ready for release, developers raise a PR from the develop branch to the master. It should trigger a build pipeline that will run the unit test cases, code analysis, push artifact, and deploys it to dev/QA environments.