Skip to content
This repository has been archived by the owner on May 1, 2024. It is now read-only.

Build Pipeline

Gerald Versluis edited this page Jul 31, 2020 · 3 revisions

Here you find the global structure of the current build pipeline setup. This will include a part that is public so that our contributors can have easy access into our logs. But will also contain a portion that is not public, running on Microsoft servers.

Therefore, this document is mostly a reference for future use when the pipeline needs to be updated or debugged.

Overview

There are two instances of Azure DevOps involved. The Xamarin/public one and the DevDiv (Developer Division, internal Microsoft name) one.

The public instance is used to verify pull requests and main CI into the main branch. Therefore, the build status is public and can be accessed by anyone. This should enable contributors and maintainers to see build output and adjust PRs accordingly if needed. See build 1 & 2 under Triggers / Build Definitions below.

The DevDiv instance is used to run the builds that result in a release. Everything happening on the DevDiv instance is only accessible by Microsoft employees. This is because there is a lot of (other) projects on these servers as well as access to needed secrets for publishing to NuGet etc.

There are two builds (3 & 4 under Triggers / Build Definitions below) that result in a release. Since we are creating actual NuGet packages and pushing those to Microsoft owned feeds, these run on the DevDiv instance.

Build definitions

YAML

While all the builds run through the steps described in the YAML, the triggers are mostly overridden through Azure DevOps. This way we can still build everything through the same YAML, but depending on what we want to achieve we only run it for certain triggers.

Triggers / Build Definitions

There are three triggers for a build

  1. A PR is submitted
  2. A PR is merged into main
  3. Scheduled nightly at 1 am Amsterdam time (UTC+1) *
  4. A tag has been created **

* The scheduled nightly results in a release to a Azure Artifacts hosted feed. The nightly build only runs whenever actual changes are merged to main the day before.

** The tag triggered build will result in a release that is prepared to go to NuGet.

Releases

Nightly

The nightly release will happen automatically from build to release. This only happens when actual commits are made to main on the day before. If so, the build will run at 1 am Amsterdam time (UTC+1) and automatically trigger a release that is then pushed to the nightly feed.

Production / NuGet.org

If a tag is created, either from GitHub or directly through Git, a build is triggered that will result in a release that goes to NuGet.org. The release itself is gated and will require approval from either Gerald or Javier.

The NuGet is pushed through an API key that is connected to the XamarinCommunityToolkit organization on NuGet.org. That way it does not rely on a single person or account.