Why are there two repositories being used in the pipeline?
There really is no need for two different repository instances to be used, you can use the exact same repository for a pipeline. Deployment Manager will automatically create two folders, <repository location>/devops/dev and <repository location>/devops/prod which will be a clear way to know what is the output from the different stages in the pipelines
- Development repository - This will contain the output from the Development environment as part of the Generating artifact task. It will also have a folder named Branches which will contain archives of the all the branches that were merged as part of the pipeline (starting in version 4.4)
- Production repository - This will hold the archives that have made it through the pipeline and where the pipeline user or approver has manually approved through the Approve for production task. In this case the artifact associated with the deployment is fetched directly from the Development repository and copied over to the Production repository location
The reason to have this separate of development and production repositories (or folders if the same repository location is used) is to ensure that only approved and validated deployment archives are in the production repository. This gives you confidence for the following
- You can trust that the archives in the production repository have passed all necessary validation as part of the pipelines, tests both automated and manual have been run, and it is safe to deploy to the production environment
- Since there is only validation archives in production repository, if you have to roll back or redeploy from on an older version, all of those versions have been similarly validated
- Deployment Manager will only deploy to production from the Production repository giving you confidence that intermediate and potentially buggy and unstable development versions do not make it into production. This is especially true if you lock down access to the production environment and you will only allow Deployment Manager to import new versions of the application.
This is a frequently asked question about Deployment Manager. Find more answers here.
Keep up to date on this post and subscribe to comments
- How can I support more than four stages in a Pipeline?
- Are schema changes supported through a pipeline?
- Unable to create right Repository for Devops CI/CD Pipeline
- Devops Pipeline Repository Creation
- Devops pipeline executed, getting error while deploying to QA "Unable to fetch artifact from repository. Invalid artifact type passed"