Pipeline as code (YAML) preview

The ability to store your CI build in source control has been a long running request for VSTS and TFS garnering more than 650 votes on user voice.  Having your CI defined alongside your application source gives you the ability to evolve your CI as your code evolves and to apply source centric workflows like pull requests and code reviews to your CI.  Today we are excited to preview support for defining your VSTS Build pipelines using YAML files checked into your source repository.

To get started you will first need to opt-in to the “Build YAML definitions” preview feature for your account.

imageimage

Once that flag is on you can simply create a .vsts-ci.yml file in the root of your Git repository in VSTS and paste the following content

queue: Hosted VS2017

steps:

– script: echo hello world

finally commit your changes and you should see a new build definition in your account with the same name as your repo automatically configured to run on any change to the master branch.

The preview today only works for CI but as we continue to mature the feature set we will bring CD online as well.  It is also important to note that this is really just a new definition type over the same automation system that you have been using on VSTS for years.  All of the inbox, custom and marketplace tasks can be used and it is fully supported on both private and hosted agents.

To learn more please checkout the tutorials on docs and the details on github.

For feedback please feel free to open an issue on Github or send me a tweet.  I look forward to hearing from you.

19