03 Mar 2018 | generator-nullfactory-xrm | Visual Studio Team Services | ALM | Dynamics CRM | Dynamics CRM Online | Yeoman | npm | nodejs
If you've read my previous posts on the topic, you might have already guessed that I am a big fan of maintaining builds as code artefacts. I was super excited when the Visual Studio Team Services (VSTS) team announced YAML support and I knew right then that this had to be part of generator-nullfactory-xrm
.
With version 1.6.0
, I've added the ability to generate tailored YAML build definitions into your Dynamics 365 projects. What this means is that you get rich CI build support right out of the gate! No more excuses for not having a CI build in your project!
The option to generate a CI build is defined as a sub-generator. This is intentional as I didn't want to automatically assume that everyone would be using VSTS as their source control.
Here's the quick rundown of the steps necessary to get things up and running. What we're aiming for is a layered approach:
git
repository.Opt-in to the preview build feature in VSTS. Read my previous post on how to do this.
Fair warning that as of writing this post, the YAML builds feature within VSTS is still in preview. While very unlikely, there's always the possibility that things might break due to future change.
A git
based repository in VSTS - YAML builds only work with git repositories.
Assumption that nullfactory-xrm generator and Yeoman itself has alredy been installed on the client computer being worked on and that a Dynamics CRM solution is ready to be synced.
Setup the project using generator-nullfactory-xrm
using the default generator. Read this post for more detail steps.
yo nullfactory-xrm
Next, run the generator once more from the same folder location, and this time let's use the cibuild
sub-generator:
yo nullfactory-xrm:cibuild
Provide the same solution name you provided in step 1. And choose Visual Studio Team Services
as the type of source control being used.
This would have generated a file called .vsts-ci.yml
. And that's it - once your changes are checked in and pushed to VSTS, the YML file would be automatically provisioned as the default CI build.