I want a Jenkins pipeline to build and deploy an application with the following conditions.
- Development starts with a feature branch by developers committing code to the feature branch.
- 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.
- After testing the code successfully in the feature branch, the developer merges the PR to the develop branch.
- 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.