1
votes

I'm trying to determine if there is a way to switch between the UI and yml views within Azure DevOps Build and Release Pipeline definitions.

I like the yml view because I have a version controlled build process. However, sometimes the UI view is easier to use, especially when getting started with new pipeline tasks.

I inherited some builds that are edited via a UI and look like this screenshot but I can't find the yml file anywhere in the associated Azure DevOps Git Repo. Where do I find it?

When I select Edit Pipeline it just shows the UI

However, when I create a new pipeline build it creates an azure-pipelines.yml file in the Azure DevOps Git Repo master branch.

  • The UI version I've inherited is a historic build so do Microsoft now prefer the yml file?
  • Do they offer the option to switch between visual and text-based build definitions on existing builds?
  • Can I export my UI build to a yml file? Some of the builds and releases I've inherited are complex and I wouldn't know where to start converting them manually to a yml file.
  • It seems to me that being able to roundtrip a build definition from UI to text is a really useful concept, why would you drop a capability like that? Maybe it's on the DevOps roadmap but not prioritized yet?

I looked at a couple of similar questions/answers but this is the only one that really is similar to my question. However, it was asked some time ago and things change in Azure quite frequently so the capability might be there now:

Azure DevOps - use GUI instead of YAML to edit build pipeline

Thanks for any advice.

2
Not get your latest information, is the workaround helpful for you? Or if you have any concern, feel free to share it here.Hugh Lin

2 Answers

0
votes

The answer is that there is still no way to switch between GUI and YAML without Migrating.

It is harder to migrate to UI since you need to recreate the pipeline. Migrate to YML from GUI is easier using the YML export feature.

1
votes

If you edit the build and you got the UI editor so it's not YAML build, but, you can convert it to YAML in an easy way.

Create an azure-pipelines.yml in your repo, go to the UI build and click on View YAML in the right side:

enter image description here

Copy this YAML into you newly created azure-pipelines.yaml file, committed the file and pushed it.

To replace the old GUI build with the new YAML build you should do the following:

  • Renamed the old GUI build and disabled this.
  • Renamed the new YAML build to the old GUI build name (not vital, but it felt neater)
  • Updated the release pipeline to pick the new YAML build as opposed to the old GUI build. Even though the names were the same, their internal IDs are not, so this needs to be swapped.

You can find more info here, here and here.