- Create Team Service account
- Create Team Service Project
- Import Code from GitHub into Project
- Build automation of project in VSTS
- Go to the offical Visual Studio Team Service page and create an account for free.
- Login with your existing microsoft account or create a new one.
- A name for your VSTS and additional information to your first project (created on account creation) have to be entered.
After login there is an overview of your existing projects (should be only one after creating a new account). The navigation area is on the top left and there are four navigation points:
Dashboard with some overview information about your VSTS account.
- Your projects
- VSTS News
- Build and load testing statistics
User management of the VSTS account.
- List all users and their access level.
- Create and edit users and their access level.
- Export users as csv.
View of the team rooms management of the VSTS account. Team rooms are automatically created for each project to discuss issues and share the status.
View of the load test management of the VSTS account. Create, edit and start cloud-based load testing for your web projects. 20.000 minutes each month are free. See Getting started with Performance testing for more information.
Choose a project name and a description to specify your app. In our case, we choose Hanselman.Forms. There are three process template to choose:
- Agile
- CMMI
- Scrum
Choose the process that fits best for your team (see Guidance for more information). Finally choose a version control system, we use Git.
In this example we use the code from an external GitHub repository, so we have to import this code. Click on Code, Import repository and add the following link: https://github.com/jamesmontemagno/Hanselman.Forms.git;
The code should appear in the VSTS repo after the import completed. You can clone from the VSTS repo at any time.
- Open Visual Studio
- Open the Team Explorer (View > Team Explorer)
- Click on Manage Connections > Connect to Team project
- Add your VSTS
- Select the Hanselman.Forms project
- Clone the repository
- Try to run the app in the Android Emulator (see Exercise 1 for trouble shooting)
Plan enough time for solving problems with Emulator, Xamarin, NuGet, etc.
-
Without changing any code we can configure our automated build with VSTS.
-
Switch to the BUILD view. This view provides an overview of all build definitions and their current status.
-
Create a new build definition by clicking on the NEW DEFINITION button.
-
In the opened dialog you can choose a predefined build template. The templates are grouped in two tabs: Build and Deployement. Choose Build
-
Click on Next
-
Choose the created repository of your VSTS and choose the master branch as default branch.
-
Activate the option Continous integration to start the build whenever the selected branch is updated.
-
Choose Hosted as your default agent queue. The hosted version has 240 build minutes for free. More information can be fround here.
-
Click on the Create button to finish this step.
You see two columns in your build definition settings: The build steps are listed in the left section, the settings of the selected build step are on the right side.
- Discuss the several steps in the build template
- Disable the Xamarin Test Cloud - Test step: Select the step and deselect the Enabled checkbox in the Control options section. We'll add test automation later.
- Click on Queue new build, confirm the opened dialog without changing anything and watch the logging information.