Showing posts with label build. Show all posts
Showing posts with label build. Show all posts

Tuesday, April 18, 2017

Hands on Xamarin Platform Pipeline - Build - Setup automatic build on git push

In this article I'll show you how to setup the automatic build of our 'RememberIt' application after every git push using Visual Studio Mobile Center.

The automatic building of the application will help to ensure that in a team of developers the application is always building successfully and is available for distribution. When the build is broken, it can be seen and solved quickly.

If not yet done, please read the previous post in the Hands on Xamarin Platform Pipeline series.

To start, browse to Visual Studio Mobile Center then select the application we created on the previous post.

Select Build menu, the supported version control system are:
- Visual Studio Team Services
- Github
- Bitbucket
In our case, we'll use Github.
Authorize Mobile Center to access to your Github repositories.
Select the repository where 'RememberIt' application is hosted.
Select the desired branch, in our case it's the master branch.
Now, select the connected application project, then:
- Select Debug or Release configuration
- Activate Build on push option in order to build the project on every available push
Activate the Sign builds option in order to sign the application after the build. 
In this case, we need to provide the keystore. We'll use the debug keystore which is automatically generated.
Select the keystore in: '~/.local/share/Xamarin/Mono for Android/debug.keystore'
Keystore password: android
Key Alias: androiddebugkey
Key password: android
The first Build is queued waiting for an available machine to start the build. We can eventually fire a manual build by pushing 'Build now' button.
In the console we can see the build progress.
And after some unsuccessful builds and adjustments in the code. We will be able to see a successful build.
We will be able to either distribute the application or download the generated apk as well as the build logs.

See you soon.