DEV Community

Discussion on: Azure DevOps YAML release pipeline : Trigger when build pipeline completed

Collapse
 
gautampambhar profile image
gautampambhar • Edited

I learned a lot through this article. Thank you so much for publishing this.
I have one question though. in your build-pipeline.yml you have a task at last for file archive. what if I publish a build artifact instead of archiving file. Although Can you tell the difference between those two tasks. and what if I am publishing an artifact; in that case how the task will look like?

Thanks.

Collapse
 
kenakamu profile image
Kenichiro Nakamura

Thanks for your comment. you can publish the build artifact as you wish when you want to pass it to next stage, which may be run in different agent. Archive simply archive the directory and that's it. The reason you may want to use publish artifact is to store the result so that it can be picked up in the next stage.

As you may already know, there is no guarantee that some VM is used for different step, and even though it is used, no disk cache exists. That's whey you need to "publish" which simply store the result to Azure DevOps space (blob) and next step can download it. If you pickup the zip in next task in the same step, then it is still running in the same agent, so you don't have to publish it.