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.
Related
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.
First - I know that according to the official MS documentation the built in functionality for updating work items with release status via the deployment control is only supported in the release pipelines and not the multi stage YAML pipelines (see first note documented here: https://learn.microsoft.com/en-us/azure/devops/boards/work-items/work-item-deployments-control?view=azure-devops)
Has anyone used powershell or the Azure DevOps rest api's to create an addon or integration that can update the work item with the correct information to automate the linkage of work items to the release environment information given that this functionality doesn't appear to be available for the yaml release pipelines?
Yes. The Deployment field is not supported by Yaml Pipeline. This feature is only for Release Pipeline.
If you want to link Yaml Pipeline to Work item, it can be linked as Build type.
To achieve this in YAML pipeline, you can try to use the Task: WorkItem Updater task
from WorkItem Updater
- task: WorkItemUpdater#2
displayName: 'WorkItem Updater'
inputs:
workItemType: xx
workitemLimit: xx
linkBuild: true
Result:
I have a setup where anyone can create artifacts from any branch of our code base from a pipeline in pipelines -> pipelines then use that artifact to create a release in pipelines -> releases. I want to enable the user to be able to set a variable in the build pipeline that creates the artifact and have that automatically trigger a release once the build finishes. Is this possible and how would I do it?
Thanks for any help.
We cannot set the variable in the build pipeline to create the artifacts and automatically trigger a release once the build finishes
As a workaround, We can configure the Release triggers to automatically trigger the release after the build is complete.
Steps:
Create a new release pipeline->select the build as source type->enable the feature
Continuous deployment trigger and configure it.
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?
I don't know if is already released az devops extension to create pipeline release with AZ CLI.
There are post relating to 1y ago.
I found documentation here but I can't understant how to create various stage of release pipeline.
https://learn.microsoft.com/en-us/cli/azure/ext/azure-devops/pipelines/release?view=azure-cli-latest#ext-azure-devops-az-pipelines-release-create
Someone has already created release pipeline with yaml and tell me how please? Or just post some command to import into Azure-DevOps project?
For this issue , right now there is no way to automate the creation of classic release definition. You will need to create the definition and then you can queue a Release run using az pipelines release create command.
The role of az pipelines release create command is to kick off a new release for an existing release pipeline, not to create a new release pipeline.
You can refer to this issue on github about this.
So as a workaround , it is possible to automate the new yaml pipeline definitions with az pipelines create command which can constitute both build (CI) and release (CD).
First you can create a yaml file(e.g. azure-pipelines.yml) in the repo and set the definition for both CI and CD pipelines in the yaml file. YAML schema reference can give you guidance.
Then you can create an Azure Pipeline for a repository with the pipeline yaml already checked in into the repository via az pipeline create command. Specify --yaml-path in the command.
--yaml-path --yml-path :
Path of the pipelines yaml file in the repo (if yaml is already
present in the repo).