Azure-devops-docs: Export current build definition to YAML

Created on 29 May 2018  Â·  10Comments  Â·  Source: MicrosoftDocs/azure-devops-docs

In the case where one already has a build definition, but would like to use YAML moving forward to maintain the build definition as code, is it possible to export a current build definition to YAML and then place that in the repo?


Document Details

⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

Most helpful comment

Yes, it's currently possible.

  1. Edit your build definition in VSTS
  2. Navigate to the Tasks section
  3. Select the entire process or any individual task and click the "View YAML" button on the top right area of the window. The icon looks like a clipboard.

You may need the Build YAML definitions Preview feature to be enabled to see the "View YAML" link in the first place (I'm not 100% on that).

All 10 comments

Yes, it's currently possible.

  1. Edit your build definition in VSTS
  2. Navigate to the Tasks section
  3. Select the entire process or any individual task and click the "View YAML" button on the top right area of the window. The icon looks like a clipboard.

You may need the Build YAML definitions Preview feature to be enabled to see the "View YAML" link in the first place (I'm not 100% on that).

Great thanks. I think it would be good to include that in the docs.

Yes, and thank you for calling attention to this issue. We've had some big site changes going on that have gotten in the way of some of these kinds of fixes. I'll follow up.

Hey @alexkokkinos, I cannot find the "View YAML button" anymore.
I've tried both old UI and new preview UI, neither of them has the button.

Could you help me with finding it?

Turn on "Build YAML definitions" preview feature for your organization. Than you will see the "View YAML" link in the pipeline edit view (where define, config the tasks...).

On new VSTS accounts, it's no longer possible to create non-Yaml builds! Even if I disable the Build YAML definitions" preview feature.
Cannot import a previously saved build.
If I create a new YAML build, and cannot add tasks, only have the pipline and the get sources section.
When I select an existing github connection in the sources section, I only have 4 github repos listed, with no possibility to load more. I gues MS QA had only on repo to test with.
Since a couple days, VSTS is a mess.

@alexk any help for issue above?

Marketplace Tasks in YAML

When configuring a build definition from an existing YAML file, is there anyway to make the need to restore a marketplace task more obvious? It would also be nice if it auto restored marketplace tasks.

I'm asking because a build definition based on a YAML file that makes any references to a marketplace task that the organization doesn't currently have will throw a "task does not exist" error.

_Thanks_

Is there any way to view YAML for the release stage? I can see the view YAML for the build but not for release. Would be super handy to be able to do this? Does anyone know how?

This is planned for 2018 Q4 according to the feature timeline.

Configuration as code (YAML) releases - Public Preview | Pipelines | TBD
-- | -- | --

Was this page helpful?
0 / 5 - 0 ratings

Related issues

dtamai picture dtamai  Â·  3Comments

Naphier picture Naphier  Â·  3Comments

EM1L picture EM1L  Â·  3Comments

sevaa picture sevaa  Â·  3Comments

cijujoseph picture cijujoseph  Â·  3Comments