Using below Git work flow, for any release,
For continuous delivery, my understanding is, two Jenkins pipe lines need to be created, as shown below:
1) Build pipeline that gets triggered on merge of every Feature branch(green) into Develop branch(Purple). Pipeline will push product-x.y-snapshot.jar
in Nexus repo.
Purpose of this jar is for QA testing
2) Release pipeline that gets triggered on merge of every new Release branch to Master branch. Pipeline will push product-x.y.jar
in Nexus repo. This jar goes in production directly.
Both pipelines have auto-tests for every functionality. Same number of autotests run in both pipelines
1) Does two pipelines suffice for stable release? product-x.y.jar
with new features added as part of that release
2) If yes, How binary artifactory has to be maintained for both build and release pipeline? using Nexus... please provide any reference
1) This question doesn't have one right answer - in most cases two pipelines (one for feature branches and other for master branch) is sufficient for creating stable releases, but usually teams use three staging environments (for example, see details in this article):
And in that case you can have three pipelines for each staging environment (or one pipeline with parameters for choosing and building each type of environment). There are a lot of examples of Jenkins continuous delivery configuration in the internet.
2) If I understand you correctly, for maintaining artifacts you can use Nexus Platform Plugin (see this example) or Nexus Artifact Uploader to publish a specific artifact from Jenkins to Nexus.