Adventures on the edge

Learning new development technologies
    "When living on the bleeding edge - you sometimes have to bleed" -BillKrat

Github and Visual Studio continuous integration (automated builds)

You can use Visual Studio’s free service for continuous integration for GitHub as easily as you can for TFS.   In the below clip we show how when we push our changes to GitHub, the Visual Studio CI fires processing the build.


The steps follow below:

1. Create the Visual Studio project, disregard the project setup, and go directly to the “Build and Release” link  and click New. 

ss001

Select “GitHub” and log into the system, select your GitHub project from the available list (using … link button)

ss002

Click continue, select the .NET Desktop build template and click “Apply”

ss003

Be sure to select “Private” default for the agent queue, otherwise you’ll be limited to Hosted free minutes (private is unlimited).  Click the Manage link when done.

ss004

From the manage page, download agent to your local drive.

ss005

Note: you can simply unzip it to the agent folder using explorer (easier then using suggested PowerShell command).

Before launching PowerShell it is suggested that you click on your login icon, select Security, and then add a Personal Access Token (PAT).  IMPORTANT: Be sure to copy/paste the provided token somewhere for future use – you won’t be able to uninstall/reconfigure your agent without it.

sspat

Running as admin, launch PowerShell, switch to the folder you unzipped the agent files to, and type “.\config”.  You can select the default prompts as shown below.  Note: since I have unit test that need to run SQL Server (using my credentials) I logged in as “BillKrat”

ss007

The last thing you’ll want to do is click on the “Triggers” link of the build definition and select “Enable continuous integration”.  If you don't check this checkbox then you'll be forced to queue builds - versus it automatically generating a build upon check-in as shown in the video clip above.

ss008

When build is completed you will receive an email notification on the status.

email

Comments are closed