yo vsts

NOTE:  This has been replaced by yo Team.

At Ignite New Zealand 2016 I did a talk where I used a Yeoman generator to build an entire CI/CD pipeline. I promised that I would publish the generator and make it open source. You can now install the vsts generator using Yeoman. Below is everything you need to know to get started using it. I published the code to GitHub.

  • Install Git
  • Install Node.js
  • Install Yeoman using npm (npm is installed with Node.js)
    npm install -g yo

Now using the yo command you can install the vsts generator.

  • Type
  • Select Install a generator
  • Type
  • Select vsts Generates an app with CI/CD in Visual Studio Team Services
  • Once it is installed simply press enter
  • When entering your VSTS account only enter the part before .visualstudio.com. Do not enter the full URL, just the account name. For example if your full VSTS URL is https://mydemos.visualstudio.com you would enter only mydemos.

To use the generator in the future simply type.

yo vsts

You will need a Visual Studio Team Services account and an Azure Subscription to use the generator. You can create a Team Services account for free and start a free trial of Azure.  Once you have your Team Services account create a Personal Access Token.

Comments (18) -

  • Donovan, your sessions at Ignite NZ were inspiring, Thank you!
    I've been looking forward to seeing how you did this ever since the demo.
    • Thank you so much. I am glad I was able to open source everything. I found using the API a bit tricky and now everyone can see how I did it and take it much further.  I am excited to see what we can do with it.
  • Hi Donovan,

    Thank you very much for making it open source, been looking forward to it. Really enjoyed your session in Auckland. Cheers.
    • My pleasure. Now let's make it do more stuff!
  • Hi Donovan,

    I loved your demo at Ignite and have been waiting eagerly for you to publish the generator so I could give it a try. When I run the generator I get the error 'Failed to create Azure Service Endpoint. Insufficient privileges to complete the operation.' Do you have any idea what permission I am missing? Thanks
    • When I created my VSTS and Azure sub I used the same email.  So my email account was the owner.  Is that that case with you?
      • I am the account owner in VSTS but only a co-administrator in Azure subscription. Should that matter?
  • Hi Donovan, i tried the above steps for working with Azure App Service but it failed miserably. When it asks me to "install dependencies" i hit enter i.e no it threw an error saying "ERROR VSTS, getaddrinfo  ENOTFOUND https https:443".

    Let me know if i have done something wrong. I would mail you the screenshot.
    • Can you show me the screen of the answers to the prompts?
      • That works AWESOMEEEEEEEE! It did work perfectly. Thanks for the cool stuff Donovan!
  • Hi Donovan,

    Tried using generator but seems not working for me. Frown
    I have done this  in WS2016 datacenter machine and below are inputs that I have provided when prompted. ended up with error as below.
    Error vsts

    getaddrinfo ENOTFOUND https https:443
    PS C:\> yo vsts

        |       |    ╭──────────────────────────╮
        |--(o)--|    │     Welcome to DevOps    │
       `---------´   │ powered by Team Services │
        ( _´U`_ )    ╰──────────────────────────╯
        /___A___\   /
         |  ~  |
    ´   `  |° ´ Y `

    ? What type of application do you want to create? ASP.NET
    ? What's the name of your ASP.NET application? testapp
    ? Where would you like to deploy? Azure App Service
    ? What's your Team Services account name ({account}.visualstudio.com)? https://demoaccount.visualstudio.com
    ? What agent queue would you like to use? Hosted
    ? What's your Team Services Personal Access Token? ***********************************************
    ? What's your Azure subscription name? Visual Studio Enterprise
    ? Install dependencies? No
    Error vsts

    getaddrinfo ENOTFOUND https https:443
    • You only need to enter demoaccount  not the full URL.  Sorry for the confusion. I will update the prompt.
  • Hi @Donovan - really awesome stuff...

    Trying to get `yo vsts` working end to end with Docker and VSTS.  I'm guessing that I needed to install marketplace.visualstudio.com/items right?  (this helped me get CI and CD creation working, but my build is still failing)

    Now I'm starting to think I need to create an Agent Pool in VSTS and connect it to a Docker container that will function as a build agent.  (the `Hosted` agent pool doesn't seem to know the `docker` command.

    Can you confirm that I'm on the right path?
  • 5Will that rest api calls also work with onprem tfs with some modifications?
    • That is correct. If the demand is there it would not take long to create yo tfs a well.
      • I'd love to see a yo tfs as well

Pingbacks and trackbacks (4)+

Add comment