1
votes

If I recall correctly, Azure Devops was set to add a feature to allow release pipelines to be placed into yaml , similar to build pipeline. Is this feature available yet?

Im hoping to get some guidance on the migration of legacy classic release pipeline, to the new format?

UPDATE: It looks like I'm only about 4 months behind. Posted on May 6, 2019

With our new updates, development teams can now leverage the same YAML documents to build multi-stage pipelines-as-code for both Continuous Integration and Continuous Delivery. This was one of the biggest requests from our customers

here are some helpful links for those that are like me : have many classic release pipelines manually created, interested in the new format.

https://azure.microsoft.com/en-us/updates/unified-pipelines/

https://azure.microsoft.com/en-us/blog/accelerating-devops-with-github-and-azure/

2
Did you look at the documentation? It covers this.Daniel Mann
I'm taking a look at the documentation now. This is a new feature this year.jbooker
first, thanks for posting this @joey. Second, yeah this is tough to have a question on a topic that is still moving quickly. Heck azure-devops could abandon the yaml approach and go to somethingelse...who knowsBozoJoe

2 Answers

1
votes

I've discovered that Microsoft provides some built-in help to migrate a release pipeline from a classic GUI-based Release pipeline to a YAML-based pipeline.

If you edit your classic GUI-based Release pipeline and drill down to a task, there is a link at top right that says View YAML:

Task in a Release pipeline showing the View YAML link

Clicking the link generates the YAML associated with the task. Unfortunately it doesn't include the field values. Instead it uses variables and doesn't specify the values of those variables:

steps:
- task: IISWebAppManagementOnMachineGroup@0
  displayName: 'IIS Web App Manage'
  inputs:
    IISDeploymentType: '$(Parameters.IISDeploymentType)'
    ActionIISWebsite: '$(Parameters.ActionIISWebsite)'
    WebsiteName: '$(Parameters.WebsiteName)'
    WebsitePhysicalPath: '%SystemDrive%\inetpub\wwwroot\AspNetDemo'
    AddBinding: '$(Parameters.AddBinding)'
    Bindings: '$(Parameters.Bindings)'
    ParentWebsiteNameForVD: '$(Parameters.WebsiteName)'
    VirtualPathForVD: '$(Parameters.VirtualPathForApplication)'
    ParentWebsiteNameForApplication: '$(Parameters.WebsiteName)'
    VirtualPathForApplication: '$(Parameters.VirtualPathForApplication)'
    AppPoolName: '$(Parameters.AppPoolName)'

Luckily the task in the GUI has links against most fields, with field-specific help. That help mentions which variable maps to the field value:

Task in a Release pipeline showing the help linked to a field, highlighting the variable that maps to the field

So you can go through each field in the task determining which variable corresponds to each field, to work out what values to add to the YAML snippet.

It's a bit labour intensive but it's quicker than trying to figure it all out from scratch.

Unfortunately there doesn't seem to be any way to view the YAML at the job or stage level, only at the task level. So you'll have to repeat the process for each task. You'll also have to work out the YAML that defines the stage and the jobs yourself.