Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 4 additions & 5 deletions .github/workflows/private-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,10 @@ jobs:
release:
runs-on: ubuntu-latest
environment: release-private
# Nothing a private build produces may reach the shared build cache, which anyone can read: it
# uses the private cache. The build selects the bucket itself (scripts/source_release_target);
# this covers the runner. Its logs go with every other log, which only the dashboard serves.
env:
CI3_CACHE_BUCKET: aztec-ci-private-cache
# Nothing a private build produces reaches the shared build cache, which anyone can read: ci3
# builds in the private cache, which this environment's instance profile
# (CI3_INSTANCE_PROFILE_NAME, ci3-private-release-build-instance-profile) selects. Its logs go with
# every other log, which only the dashboard serves.
permissions:
id-token: write # required for OIDC assume-role with AWS
contents: read # checkout/fetch with the default github.token
Expand Down
2 changes: 1 addition & 1 deletion RELEASES.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ Releases are driven by git tags. Each branch's version is tracked in its `.versi

The GitHub release notes of a stable release are written by hand, and their developer part comes from [`CHANGELOG-DEVELOPERS.md`](./CHANGELOG-DEVELOPERS.md) on the branch being released. Before the release is dispatched, run the [`release-changelog`](./.claude/skills/release-changelog/SKILL.md) Claude skill with the version (`/release-changelog 7.0.0`) on that branch, and merge its changes in a PR to it, so the tagged commit carries the version's section the notes are written from, and every entry in both changelogs carries its PR link. A release candidate gets no section: its changes stay under `## Unreleased` until the stable release.

A *private release* publishes the same version to the Labs-owned GCP Artifact Registry instead, and publishes nothing public. It is a manual dispatch of the release tag workflow with `kind=private`, gated by the same second-person approval as an rc, which cuts the tag `private/v<ver>-private.<n>`. That tag triggers the [private release workflow](./.github/workflows/private-release.yml), which runs the same `./bootstrap.sh release` under `RELEASE_TARGET=private`: the `@aztec-foundation` packages it builds against and the `@aztec-labs` packages it publishes both come from and go to the Artifact Registry npm repo, and the docker images go to the Artifact Registry docker repo. The `private/` prefix is part of the ref, not the version: it is what routes the tag to this workflow and to the `release-private` environment, which holds the Artifact Registry credential and nothing that can publish publicly — while the `release` environment holds the npmjs and DockerHub credentials and nothing that can read the Artifact Registry. A job declares one environment, so no run can read from one side and publish to the other. Private releases skip `aztec-up` and `playground`, whose artifacts are public by nature, and upload nothing to the build cache, which is world-readable.
A *private release* publishes the same version to the Labs-owned GCP Artifact Registry instead, and publishes nothing public. It is a manual dispatch of the release tag workflow with `kind=private`, gated by the same second-person approval as an rc, which cuts the tag `private/v<ver>-private.<n>`. That tag triggers the [private release workflow](./.github/workflows/private-release.yml), which runs the same `./bootstrap.sh release` under `RELEASE_TARGET=private`: the `@aztec-foundation` packages it builds against and the `@aztec-labs` packages it publishes both come from and go to the Artifact Registry npm repo, and the docker images go to the Artifact Registry docker repo. The `private/` prefix is part of the ref, not the version: it is what routes the tag to this workflow and to the `release-private` environment, which holds the Artifact Registry credential and nothing that can publish publicly — while the `release` environment holds the npmjs and DockerHub credentials and nothing that can read the Artifact Registry. A job declares one environment, so no run can read from one side and publish to the other. Private releases skip `aztec-up` and `playground`, whose artifacts are public by nature, and build in a cache of their own, which nothing public can read or write, instead of the shared build cache, which is world-readable.
1 change: 0 additions & 1 deletion bootstrap.sh
Original file line number Diff line number Diff line change
Expand Up @@ -957,7 +957,6 @@ case "$cmd" in
exit 1
fi
source $root/scripts/source_release_target # Source vars for public or private releases.
source $ci3/source_cache_bucket $RELEASE_CACHE_BUCKET
./bootstrap.sh build release
./bootstrap.sh release
;;
Expand Down
2 changes: 1 addition & 1 deletion ci3
10 changes: 3 additions & 7 deletions scripts/source_release_target
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,6 @@ case "$RELEASE_TARGET" in
echo_stderr "A public release must read and publish npm from npmjs, not $NPM_REGISTRY."
exit 1
fi

# Never the shared build cache, which any CI build can write. Only ci-release switches to it:
# the network jobs source this file for the registry, on instances that cannot read it.
export RELEASE_CACHE_BUCKET=aztec-ci-release-cache
;;
private)
# What gets published is code, not configuration: the projects that publish public artifacts
Expand Down Expand Up @@ -92,15 +88,15 @@ case "$RELEASE_TARGET" in
unset release_channel
fi

# The private cache, which nothing public can read or write. It has to be a cache of its own,
# not only for privacy: no cache key mentions the registry. node_modules is keyed on yarn.lock
# ci3 builds a private release in the private cache, which nothing public can read or write,
# because it runs on the private release instance profile. It has to be a cache of its own, not
# only for privacy: no cache key mentions the registry. node_modules is keyed on yarn.lock
# plus package.json and the release-image base layer on the Dockerfiles plus yarn.lock, all
# identical between a public and a private build of the same tree, so a private run reading the
# public cache would restore a public run's entries and skip both installs, publishing
# artifacts built against npmjs while reporting success. Its other writer, the
# aztec-packages-private CI, builds this tree only with its manifests rewritten, so under other
# keys.
export RELEASE_CACHE_BUCKET=aztec-ci-private-cache
;;
*)
echo_stderr "Unknown RELEASE_TARGET '$RELEASE_TARGET' (expected public or private)."
Expand Down
Loading