After I have connected GitHub to Team Services it’s time to set up continues integration process. The way how to do that is described in the Microsft documentation. I’ll try to show my experience with it.
First I created a new build definition by choosing ASP.NET Core (PREVIEW) template.
The build consists of five predefined steps: Restore, Build, Test, Publish and Publish Artifact.
In the Repository tab, I choose the connection with GitHub GoogleTasksManagerConnection set up earlier. The default branch was set to Master and I didn’t change that.
You also need the trigger to run the build. It can be set in Triggers tab. I set the trigger to run the build after branch changes.
Finally, I ran the build using Queue new build button in the upper right corner.
After half a minute the build started and I was waiting excited for the result.
But then suddenly build failed…
I triggered the build two more times but without success. The build failed each time. I also tried to build the project locally on my local machine using the same commands as in the log message. Everything was working fine, so the code was fine. I started looking for the solution on the internet and very quickly I found the thread related to the exception from the logs on GitHub https://github.com/Microsoft/vsts-tasks/issues/3311. It turned out that Microsoft screwed up and after they had replaced JSON configuration file by csproj they haven’t updated the build definition on Team Services. Team Services still needs JSON file. According to the thread, there is a work around by creating your own build agent and uploading it to Team Services but I didn’t want to waste more time on it. I’ll be publishing the application directly from Visual Studio until Microsoft has fixed the issue.
You can track the application changes at www.googletasksmanager.com.