-
Notifications
You must be signed in to change notification settings - Fork 470
Build Pipeline
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.
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.
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.
There are three triggers for a build
- A PR is submitted
- A PR is merged into main
- Scheduled nightly at 1 am Amsterdam time (UTC+1) *
- 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.
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.
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.