In the previous post “Trigger Deployment YAML Pipeline Once YAML Build Completed” (https://chamindac.blogspot.com/2020/10/trigger-deployment-yaml-pipeline-from.html) we have discussed how to separate the deployment pipeline from the build pipeline, in Azure DevOps YAML pipeline implementations and to trigger a CD pipeline from the CI build once completed. However, if you check carefully that post implementation of CD it is still checking out the code repository, even though it is not necessary to checkout code being the deployment pipeline. Let’s see how we can avoid checking out repo in the CD YAML.
UPDATE: This is when you use the normal jobs in deployment YAML as well. If you are using deployment as job with environment in YAML pipelines for CD this problem would not occur and your artifact download from build will be automatic. See post "Implementing a CD YAML Pipeline with Deployment Job"
Below discussion only valid if you use job to define your deployment steps, instead of above.
Problem
CD YAML below checks out the repo.
resources:
Solution
You can add the below step to prevent check out of the repo in the CD YAML.
The full pipeline would be as below.
Execution of this CD pipeline does not check out repo as you can see blow.
No comments:
Post a Comment