Azure DevOps YAML pipeline build completion - azure-devops

When the YAML pipeline runs because of build completion, how can I tell which build triggered the pipeline?

Related

How to add dependency between two release pipeline Azure DevOps

I have a scenario that i want to create a dependency in Release pipelines that once one pipeline completes its task then the next release pipeline should be triggered.
How can I achieve it.
How to add dependency between two release pipeline Azure DevOps
You could use the extension Trigger Azure DevOps Pipeline:
Trigger Azure DevOps Pipeline is an extension for triggering a Azure
DevOps Build or Release Pipeline.
Depending on your choice in the task, it will trigger a build or a
release pipeline.
To use the extension, an Azure DevOps API endpoint needs to be
created. The token used in the endpoint should be Personal Access
Token.

How to configure YAML multistage pipeline release stages in Azure test plan settings

I have a multi-stage YAML pipeline using which I run my automated tests against different environments(Dev, Test, Pre-prod, etc). I wanted to run these automated tests directly from the test plan by configuring the build and release pipeline using Azure test plan settings.
But I couldn't see my release stages after selecting the build in the build pipeline dropdown. It is working fine for my classic UI release pipeline, not for the YAML muti-stage.
Does YAML multi-stage support this functionality?
This seems to rely on the "old releases". But the steps and code it generates could easily be ported over to the new YAML pipelines. But you'd have to do it by hand.
You could create a temporary "old style" pipeline, configure it to see what all gets generated and then duplicate those tasks to your YAML pipeline.

Trigger for yaml release pipeline

I need to know if it is possible to trigger a yaml release pipeline from a Classic Release pipeline.(the one created from the Releases tab under pipelines)
The answer is Yes. You can use the Trigger Build Task extension and queue the YAML pipeline from the release:
Or use Trigger Azure DevOps Pipeline extension.

Saving Release pipeline in yaml

Just like build pipelines I Want to save release pipeline in yaml and version control it in git, diff, merge, revert
it is possible to download release pipeline in yaml format
To enable YAML Release Pipeline, you need to enable Multi-stage YAML pipelines in Preview features:
Check Multi-stage YAML pipelines for more information.
Here are some documents and cases you can refer to :
YAML schema reference
Converting Classic Azure DevOps Pipelines to YAML
Using Azure DevOps, how do I migrate a release pipeline to code,
similar to build pipeline yml?

How to run pipeline after release pipeline in VSTS?

I have a task which I would like to run after the completion of any of my release pipelines. The release pipelines need to complete their run and finish completely. Then this final pipeline should run and be passed the artefact from the build and release pipeline.
Is there a way to run a task or pipeline after a release pipeline has completed?
I need to run this task after the release pipeline has completed because the task I've written needs to request information from the DevOps REST API which will not return anything until the release pipeline has finished.
There is an extension in the Marketplace called "Trigger Build Task" (https://marketplace.visualstudio.com/items?itemName=benjhuser.tfs-extensions-build-tasks) that enables the chaining builds.
It allows your Release pipeline to complete and a separate Build pipeline is started on a different thread/process, so you should be able to query the information you need from that triggered Build.