daml/ci
2024-05-30 12:11:11 +02:00
..
cron [3.1] fix dev-env in various places (#19127) 2024-05-01 18:23:29 +02:00
assembly-split-release-artifacts.sh update copyright (#18167) 2024-01-15 20:27:42 +01:00
bash-lib.yml update copyright (#18167) 2024-01-15 20:27:42 +01:00
blackduck.yml bump blackduck script to f5ca3ea4 (#18908) 2024-03-29 09:55:11 +00:00
BUILD Introduce dependency on Oracle image version (#10597) 2021-08-17 13:28:26 +00:00
build-unix.yml [3.1] fix dev-env in various places (#19127) 2024-05-01 18:23:29 +02:00
build-windows.yml [release] experiment with faster Windows too (#18869) 2024-03-26 14:04:46 +01:00
build.yml [3.1] fix dev-env in various places (#19127) 2024-05-01 18:23:29 +02:00
check-for-release-job.yml [release] fix release detection logic (#18867) 2024-03-26 12:38:03 +01:00
clean-up.yml move to subdir 3.0 (#18520) 2024-03-22 02:27:46 +01:00
clear-shared-segments-macos.yml update copyright (#18167) 2024-01-15 20:27:42 +01:00
compatibility_ts_libs.yml move to subdir 3.0 (#18520) 2024-03-22 02:27:46 +01:00
compatibility-windows.yml [cron] fix daily for subdir move (#18819) 2024-03-22 23:47:52 +01:00
compatibility.yml move to subdir 3.0 (#18520) 2024-03-22 02:27:46 +01:00
configure-bazel.sh infra: local network cache (#17547) 2024-05-16 16:09:26 +02:00
copy-canton.sh move to subdir 3.0 (#18520) 2024-03-22 02:27:46 +01:00
copy-unix-release-artifacts.sh [release] faster releases - experiment (#18812) 2024-03-27 12:06:39 +01:00
copy-windows-release-artifacts.sh move to subdir 3.0 (#18520) 2024-03-22 02:27:46 +01:00
daily-snapshot.yml [3.1] trigger all snapshots from main (#18920) 2024-04-02 16:19:56 +02:00
dev-env-install.sh move to subdir 3.0 (#18520) 2024-03-22 02:27:46 +01:00
job-variables.yml update copyright (#18167) 2024-01-15 20:27:42 +01:00
macOS.yml re-enable macOS (#18700) 2024-03-11 10:58:22 +01:00
pgp_pubkey rewrite check-releases in Bash (#16260) 2023-02-15 11:11:41 +01:00
prs.yml [release] fix Standard-Change check (#18890) 2024-03-27 17:00:23 +01:00
publish-artifactory.sh update copyright (#18167) 2024-01-15 20:27:42 +01:00
publish-platform-independence-dar.yml move to subdir 3.0 (#18520) 2024-03-22 02:27:46 +01:00
README.md add CI pipelines documentation (#19284) 2024-05-30 12:11:11 +02:00
refresh-get-daml-com.yml move to subdir 3.0 (#18520) 2024-03-22 02:27:46 +01:00
report-end.yml update copyright (#18167) 2024-01-15 20:27:42 +01:00
report-start.yml update copyright (#18167) 2024-01-15 20:27:42 +01:00
slack_user_ids Remove @stefanobaghino-da (#18758) 2024-03-15 08:56:09 +00:00
split-release-job.yml [3.1] fix dev-env in various places (#19127) 2024-05-01 18:23:29 +02:00
tell-slack-failed.yml update copyright (#18167) 2024-01-15 20:27:42 +01:00
upload-bazel-metrics.yml move to subdir 3.0 (#18520) 2024-03-22 02:27:46 +01:00
windows-diagnostics.ps1 windows: CI agent diagnostics (#1146) 2019-05-15 11:59:56 +02:00

CI

Overview

We run our CI on Azure Pipelines. Azure Pipelines uses its own variant of YAML for its ocnfiguration; it's worth getting familiar with their YAML documentation, as well as with their expression syntax.

Azure Pipelines allows one to define any number of "pipelines", which are definitions of what to do (think CircleCI workflow). Each pipeline has its own entrypoint and conditions for running, as well as its own configuration within Azure Pipelines (e.g. each has its own set of nvironment variables).

Entrypoints

The entrypoints we have in this repo, as of 2024-05-28, are:

  • /azure-cron.yml for the digital-asset.daml-cron pipeline. This is a hourly cron. For some reason setting it up as a hourly cron did not work four years ago so we have a slightly convoluted set up where a separate job within Azure Pipelines (not visible in this repo's files) called cron-workaround CI "maually" triggers this through the API every hour. This entrypoint is responsible for generating the daml-sdk Docker image (when a new release is detected), cleaning up potentially-broken files from the Bazel cache, publishing the VSCode Extension (when a new release is detected), copying the GitHub downloads stats to GCS to give us some historical perspective, and checking that get.daml.com has not been changed.
  • /azure-pipelines.yml is the main branch build (also main-2.x). This runs only on commits from main or main-2.x and has access to release secrets. The corresponding pipeline is digital-asset.daml.
  • /ci/prs.yml is the entrypoint for PR builds. It is very similar to the main branch build (in either case, most of the jobs are defined in /ci/build.yml), but has access to fewer secrets. It also has a few specific jobs such as check_standard_change_label.
  • /ci/daily-snapshot.yml is, as the name suggests, the entrypoint for the daily snapshots. Note that, like all releases, these are made from the latest commit of the main branch. The corresponding pipeline is named snapshot and can be manually triggered with sufficient Azure Pipelines permissions. This should not be done for non-snapshot releases as we want an audit trail of those in LATEST. Note that despite the name this does not run on a cron.
  • /ci/cron/daily-compat.yml is the entrypoint for all of our "daily" cron jobs, whether they are related to the compatibility tests or not. These include the compatibility tests, but also the speedy performance tests (2.x only), a daily BlackDuck scan (which optionally udpates the NOTICES file), the daily code pull from canton, as well as triggering the snapshot pipeline if needed.
  • /ci/cron/tuesday.yml runs on Tuesdays to send a Slack message to #team-daml announcing who will be responsible for the Wednesday release testing.
  • /ci/cron/wednesday.yml open the release testing rotation update PR.

Special branches

We currently have a few special branches.

main

The main branch is where most of the development happens. It currently (2024-05-28) targets the 3.1.0 release, but that is changeable: when the code freeze for 3.1.0 nears, the way we'll actually do the code freeze is by creating a new branch called release/3.1.x from the then tip of main, and then change main to target 3.2.0.

The main branch is also the only one that triggers releases. This means that the sdk/LATEST file on the main branch is the source of truth for releases in this repo, across all versions. When CI detects that a given build is a release build, all of the build steps will first check out the target release commit (first column of the sdk/LATEST file).

This has two important consequences:

  • On the good side, it's very good for auditability: this one file on this one branch is the only trigger for releases, so looking at the history of that file tells you all you need to know about releases. (In most cases you'll have all you need from the current state of the file.)
  • On the bad side, Azure Pipelines loads the YML files before we check out the target release commit, which means that the YML files involved in making a release need to be changed very carefully as they need to keep working with older versions. This has not been an issue in practice so far, but certainly something to keep in mind.

The main branch is the one that runs for most cron jobs, the one exception being the digital-asset.daml-daily-compat pipeline which runs every day on both the main and main-2.x branches.

main-2.x

This temporary fork of main targets 2.9.0 and will likely move on to target 2.10.0 when 2.9.0 gets its code freeze. It is similar to main in many ways, but does not trigger releases.

release/*

The release/* branches (e.g. release/2.3.x) represent the code base of past minor releases and exist to allow us to do patch releases.

The process of making a stable release will generall involve creating the release/* branch when we start to close in on the code freeze for that release, with usually a couple more PRs that need to go in.

Therefore, the vast majority of releases are made using a target commit from a release/* branch, while being triggered by a commit getting merged into the main branch.

Release branches do not run CI on their own commits - instead, CI is run on PRs targeting them, and we enforce linear merges.