Continuous Integration: Integrate early and often – Jez Humble
We will be using Microsoft VSTS to configure CI(Continuous Integration) pipeline.
lets follow below steps to achieve CI
- If you have either Outlook, Live or Hotmail account account then Sign In
- If you don’t have any of Microsoft account then create one. This newly created account will be used for next steps
- After you login, click on Create new account
- Give a name to your VSTS account. Select Git as source control and click on Continue. If any changes needed you can click on Change details link
- This creates first project. you have multiple options to choose the code
- Clone this code to your computer
- Push an existing repository
- Import a repository
- Build code from external repository
- For this workshop will will import sample Asp.net code from Git. Click on Import a repository option and click Import button
- Enter https://github.com/adventworks/aspnet4-sample link in Clone URL text box and click on Import
- Once the Import is successful, click on navigate to Code and you will see below screen. sample code has been successfully uploaded to VSTS git. Click on Set up build button from right corner
- Search for Asp.net, choose ASP.NET (PREVIEW) template. here you can choose other templates based on your project type. for now we will choose ASP.NET (PREVIEW). Click on Apply
- All the tasks are added to build definition automatically by template. these steps will run on every build to Nuget restore, Build project, Test project and Publish Artifact. Select Hosted VS2017 from Agent Queue drop-down.
- Click on Triggers tab and enable Continuous Integration trigger. This will ensure the build process is automatically triggered on every commit to master. Click on Save & Queue
- Click on Save & Queue to queue Continuous Integration build
- Click on Build Id to watch the new build as it happens
- Once the build is completed, click on Build number to view the build summary
- Here you can see the build summary, Timelines for each task, build Artifacts, Code Coverage, Tests and more
We are done with out first Continuous Integration with VSTS.