Continuous Integration And Continuous Delivery For Xamarin

Learn Continuous Integration and Continuous Deployment / Delivery to increase your employability in 2019 and beyond!

Last updated 2022-01-10 | 4.8

- Apply complete CI/CD flows in their app development process.
- Use GitHub to trigger code checks and app distribution to users.
- Use App Center to automate checks and protect important branches.

What you'll learn

Apply complete CI/CD flows in their app development process.
Use GitHub to trigger code checks and app distribution to users.
Use App Center to automate checks and protect important branches.
Leverage App Center to automatically create builds on every merge.
Automate the distribution of a new build to beta testers.
A full list of other features are on this page.

* Requirements

* The course does not require any previous CI/CD or DevOps experience
* Some basic Git & GitHub experience is desirable
* While this is a CI/CD course
* it is oriented to Xamarin students
* so some basic Xamarin experience is required.

Description

What you will learn in this course?

In this course, you will learn the fundamentals of CI/CD which is short for Continuous Integration/Continuous Delivery and be able to apply these fundamentals in your Xamarin development process.

The word Deployment is often used in place of Delivery but effectively means the same thing.

These skills are essential to maximize your career potential in 2019 and beyond, because more and more companies are adopting these development practices requiring new employees or freelancers to be well versed in these concepts.

What is Continuous Integration (CI) ?

CI is the practice of merging all programmers current working copies to a shared mainline on a regular basis (usually several times a day).

A developer checks out a working copy of the code base prior to making a change.  Over time as other developers check out and make changes, this checked out working copy of the source code base gets out of date, potentially requiring more and more work by developers to actually  check their completed changes back in to the main repository.

Without using CI it can become really difficult to merge all these changes and can lead to it taking more time to  merge changes back into the main source code base than it took to make the the change itself.

CI seeks to eliminate this problem by making sure all developers integrate early and often with the goal to reduce rework and ultimately save cost and time.  This involves all developers merging their code back into the main repository multiple times a day.

An added bonus is that each programmer who is merging changes needs to build and run (and pass) all unit tests which usually run automatically meaning the code base is easier to work with and merge changes into and is potentially more stable as a result.

What is Continuous Delivery or Deployment (CD) ?

This extends CI to ensure that new changes to software can be released to clients quicker, but in a more sustainable way.  It takes the advantages of CI from a development perspective (automated testing, on code check-in, etc) allowing the actual code base to be built and new releases to be automatically released to the client, effectively meaning a new version can be deployed to the client by a click of a button.

CI/CD concepts.

By adhering to a CI/CD development process, the code base can be built and released more quickly, and is in a more stable state overall.  These are some of the reasons why more and more companies are adopting a CI/CD development process in 2019 and beyond.

Key topics in this course.

1. Continuous Integration

2. Continuous Delivery

3. App Center

4. GitHub Pull Requests

5. Branch protection

6. UI Tests

7. App Diagnostics

8. App Analytics

What will you learn?

• Learn how to track errors and crashes in your apps.

• Learn how to track any event triggered within your apps.

• Apply complete CI/CD flows in your app development process.

• Use GitHub to trigger code checks and app distribution to users.

• Use App Center to automate checks and protect important branches.

• Leverage App Center to automatically create builds on every merge.

• Automate the distribution of a new build to beta testers.

• Automate the distribution of new releases to the Apple and Google app stores.

• Learn to create UI tests for your Xamarin Forms apps.

• Focus on the development of features, leave the build and distribution to App Center.

• Improve teamwork with automatic builds and checks that improve the quality of your merges.

• Enable product discovery with the help of Analytics in the App Center.

• Test your app in a wide array of cloud-hosted physical devices.

Differences with other CI/CD courses.

While there are other CI/CD courses out there, most of them are too general. This course is completely tailored to Xamarin developers, this way you can immediately start applying what you learn in your app development process. Because of this, the course also covers topics not normally found on other CI/CD courses, such as UI Tests for Xamarin apps.

Who is the course aimed at?

The course does not require any previous CI/CD or DevOps experience, although some basic Git & GitHub experience is desirable.

While this is a CI/CD course, it is oriented to Xamarin students, so some basic Xamarin experience is required.

Getting started

If you are ready to get started, click on the Enroll or Add to Cart button on this page and start taking your CI/CD skills with
Xamarin to the next level.

Who this course is for:

  • Xamarin developers looking to become skilled in the CI/CD process

Course content

7 sections • 51 lectures

Course Structure Preview 11:11

In this lecture, I will talk about the topics that this course covers, and describe a bit about what you will learn in each section, just so you get the overall idea about what you will learn, and what you may already know about the course topics.

What is DevOps Preview 04:26

In this lecture, I will briefly describe the three steps that conform DevOps and the CI/CD process that we will implement with the help of App Center.

Why use DevOps Preview 11:08

In this lecture, I will talk about the advantages of implementing a DevOps strategy that includes Continuous Integration, Continuous Quality and Continupus Delivery not only from the developer point of view, but from the user and business POV.

What you will accomplish by the end Preview 07:00

In this lecture, I will give you a sneak peak at the entire CI/CD flow entirely integrated with our version control's remote repository on GitHub so that builds and new releases are automatically triggered from App Center.

Source Control And Branch Structure Preview 09:58

At the beginning of the section, I will talk about why source control is important, and how you should structure your branches so that CI/CD can be easily implemented once we have everything in GitHub.

Initialize Version Control Preview 06:21

In this lecture you will create a new Xamarin Forms project and initialize the repository in the correct directory, so that the project is ready to commit changes to it and eventually push them to the GitHub remote.

Committing Changes Preview 10:28

In this lecture, you will learn how to commit the changes that you make to your code to your repository, so the changes are tracked and versions of the same file can be identified in the source control system through those git commits.

Creating Branches Preview 05:41

In this lecture, you will learn to create new branches directly from the terminal, as well as learn how to switch between them with the checkout command. This step is very important, because it helps set the foundation of the CI/CD process as we will eventually have it in App Center.

Working with Branches Preview 10:03

In this lecture, I explain how you can commit different changes to different branches, how the IDE is aware of the current working branch, and displays what the branch contains, and how you can merge branches together, setting one important piece of the CI/CD puzzle.

Creating a GitHub Repo Preview 06:08

In this lecture, you will create a new GitHub repository and explore the tabs that it contains, with the purpose of identifying the interface a bit better and starting to understand how Github will relate to the CI/CD process that we want to implement.

Pushing to GitHub Preview 08:40

In this lecture, you will push everything from your local repository to your new GitHub remote repository. You will push all the branches that contain all commits, and set upstreams so future push commands are easier to execute.

Working in Teams Preview 10:19

In this lecture, I will cover two very important things that GitHub allows us to do inside of a remote repository, and that are going to be the backbone of the CI/CD structure: branch protection and collaboration. One will protect the master branch from unchecked merges, the other will allow other accounts to work in the same repository.

Making Pull Requests Preview 09:50

In this lecture, you will create your first pull requests inside of the GitHub repository that we have created as the remote for our local repo. These pull requests will merge changes from dev to test, and eventually to master, which is protected so we will need to add an aproving review.

A Simulated CI/CD Rundown Preview 09:30

In this lecture, we are going to simulate a CI/CD rundown with the GitHub repository that we already have. We are going to be deploying some part of our code with the help of GitHub Pages, and we will use pull requests to simulate how eventually a Continuous Deployment process can work.

Intro to App Center Preview 08:17

In this lecture we will start to talk about App Center, what services it provides, which we are going to be using, and how it will help us not only implement a CI/CD process, but identify what features we must add to our apps.

Creating an App Center Account Preview 09:56

In this lecture, you will create your new App Center account and explore what features you have inside. Create an organization that will hold distribution groups (important for the CD process) and add the two apps (an Android and an iOS one) that you will use throughout the course.

Connecting App Center Preview 10:57

In this lecture, you will prepare a new Xamarin Forms application to connect to App Center through some NuGet packages that we have to add. This will be done through the App class and the initialization will prepare the projects to communicate with the App Center Apps we have ready in the portal.

Source Code and GitHub repo Preview 06:21

In this lecture, I will push all of our code over to GitHub and explain the two ways in which you can get the source code for each lecture of the course in which we work with code.

Crashing the Application Preview 12:56

In this lecture, we will setup the basic navigation of the application and set it to crash from two different places, so that we have something that is being tracked by App Center from the beginning.

Tracking Crashes with App Center Preview 17:26

In this lecture, you will learn how App Center tracks all the crashes that happen without us having to add anything else, and how we can track errors that we know may happen by catching exceptions and sending the information from those exceptions over to the service.

Tracking with Better Context Preview 08:26

In this lecture, you will learn how to track more context when the errors are reported to app center, so as developers we understand better what made our app crashed in certain scenarios.

Running on iOS Preview 10:33

In this lecture, we will replicate the tests that we have executed on an Android emulator, this time on an iOS simulator, to demonstrate that everything works exactly the same on both platforms, and that App Center will receive imilar information on both cases.

Tracking All kinds of Events Preview 12:23

In this lecture. you will code the functionality that tracks events, which can be added anywhere you want, and is done very similarly to how errors are tracked. Then, you will explore how this information gets added to App Center.

Tracking Events with Better Context Preview 09:16

In this lecture, you will learn how to track more context when the events are reported to app center, so as developers we understand better how are users behave inside the application and know what to improve.

Why use Continuous Integration Preview 08:08

In this lecture, we cover the benefits of using Continuous Integration, and the reasons why you should consider always using it when you create new mobile app projects.

Working with Feature Branches Preview 12:59

In this lecture, you will first make sure that the remote repository contains all the main branches that we have mentioned that we need. You will then fetch all those branches to some new local branches, and finally work with a new feature branch that has to be merged into dev.

A first CI Build - Android Preview 10:52

In this lecture, you will setup Continuous Integration for one of your branches for the Android app that you have on App Center. This CI process will then be triggered when we merge into the dev branch from one of our feature branches.

A first CI Build - iOS Preview 10:52

In this lecture you will setup Continuous Integration for one of your branches for the iOS app that you have on App Center. This CI process will then be triggered when we merge into the dev branch from one of our feature branches.

Adding Checks to Pull Requests Preview 14:11

In this lecture, you will enable checks in your pull requests by making App Center send information to your GitHub repository, just like the GitHub repo was already sending info to App Center.

Making the Checks work Preview 04:58

After we have created an additional App Center app, our checks don't seem to work, so in this lecture we will make this work by disconnecting our GitHub repo from the first App Center app, and check how the commits and pull requests will trigger the CI process now.

Using Checks to Protect Branches Preview 08:35

In this lecture, we will use the checks that have been added to our GitHub repository from App Center to protect our branches, so that merges can only happen once the checks (builds) have succeeded.

A Complete CI Flow Preview 15:25

In this lecture, we will execute a complete CI flow by coding a new feature into a new feature branch. This new feature, coded from Visual Studio, will eventually be pushed to the remote, where a new pull request will start, which will itself trigger checks and builds in App Center.

Intro to Continuous Quality Preview 06:37

In this lecture, we will discuss what Continuous Quality means in the context of App Center, and how th power of App Center will allow us to automate the tests of our app (that we will create with Xamarin.UITests) in thousands of physical devices with what once was Xamarin Test Cloud.

Prepare Solution for Tests Preview 17:29

In this lecture, you will add a new project to the solution, which will contain the tests that we will have to run. After that, you will prepare the iOS and Android projects to execute those tests, which will mean adding some Test cloud information and disabling some mono runtime features here and there.

Installing the App Center CLI Preview 03:51

In this lecture, you will install the App Center CLI tools that will be necessary for the tests to be uploaded from our local machine to the Continuous Quality service that we will use throughout this section.

REPL and TroubleShooting Preview 12:55

In this lecture, we are going to run a first test that executes the REPL, a tool that will allow us to, among other things, inspect the tree of elements that exists inside the view in a way that we can later use to create our tests. Some troubleshooting for Xamarin.UITest will also be covered.

Writing Xamarin.UI Tests Preview 12:12

In this lecture, we will write a test that finally asserts something to make sure that one part of our simple application is working. We will later run the Xamarin UI.Test from Visual Studio and make sure it passes on iOS and Android

Uploading the iOS Tests Preview 12:14

In this lecture, we will prepare the iOS project to create the IPA file everytime it builds, and use the App Center CLI (Command Line Interface) to upload this IPA file with the debug UI test configuration to App Center, where our test will run on as many physical devices as we want.

Uploading the Android Tests Preview 10:14

In this lecture, we will prepare the Android project to create the APK file everytime it builds, and use the App Center CLI (Command Line Interface) to upload this APK file with the debug UI test configuration to App Center, where our test will run on as many physical devices as we want. We will also improve the test that Xamarin.UITests is performing so that it waits for an element to be on the screen before making assertions.

Intro to Continuous Delivery Preview 07:03

In this lecture I will discuss what Continuous Delivery means in the context of our mobile applications, and walk you through the actions that App Center will have to perform to get our apps to our users, through distribution groups, and through the App Stora and Play Store.

Creating an iOS Distribution Group Preview 16:17

In this lecture, you will be creating a distribution group for the iOS application, which will be used by our continuous delivery process to distribute a new release of our application from the test branch everytime a pull request happens.

Creating an Android Distribution Group Preview 05:42

In this lecture, you will be creating a distribution group for the Android application, which will be used by our continuous delivery process to distribute a new release of our application from the test branch everytime a pull request happens.

Configuring iOS Continuous Delivery Preview 13:47

In this lecture, we will configure our test branch to create a new release everytime a new build is triggered with Continuous Integration. For this we will need the help of Apple's Developer portal to create a distribution certificate and a provisioning profile that we will upload to App Center.

Configuring Android Continuous Delivery Preview 10:33

In this lecture, we will configure our Android test branch to create a new release everytime a new build is triggered with Continuous Integration. For this we will need the help of JAVA to create a keystore file that we will upload to App Center

Installing from App Center Preview 05:17

In this lecture you will learn how your beta testers will be able to install the application's releases that we have generated directly on their phones with the help of App Center, and start to use those new versions that we have prepared through Continuous Delivery.

Creating a First Manual Store Release Preview 17:46

App Center requires that we create an initial release of our Android and iOS Application in the Google Play Console and the App Store Connect, so that new releases can later be automated throguh a continuous integration and continuous delivery process triggered in our master branches.

Continuous Delivery to the Play Store Preview 10:48

In this lecture you will connect the Google Play Store to App Center so that Continuous Delivery is ready from the master branch. This will happen with a JSON file generated directly from the API console.

Continuous Delivery to the App Store Preview 07:45

In this lecture you will connect the Apple App Store to App Center so that Continuous Delivery is ready from the master branch. This will happen with the help of some app-specific password, in case you have 2FA enabled.

Continuous Integration / Continuous Delivery Preview 09:46

In this lecture we will trigger an entire CI/CD flow directly from GitHub and into the master branch, so that the CI process builds a new version of the app, and the CD process distributes it to the corresponding App stores.