Skip to content

ci: use Buildkite OIDC for macOS tarball uploads - #40673

Merged
jasonhernandez merged 1 commit into
mainfrom
ci/macos-tarball-upload-oidc
Nov 13, 2026
Merged

jasonhernandez merged 1 commit into
mainfrom
ci/macos-tarball-upload-oidc

Conversation

@jasonhernandez

Copy link
Copy Markdown
Contributor

Motivation

The macOS deploy steps currently upload to the binaries bucket with credentials from the agent's environment. This moves them to short-lived credentials obtained per job through Buildkite's OIDC integration. That way the macOS agents need no AWS configuration of their own, which simplifies setting them up.

Changes

  • TarballUploader builds its S3 client in one place. When MZ_BINARIES_UPLOAD_ROLE_ARN is set, it runs buildkite-agent oidc request-token --audience sts.amazonaws.com and exchanges the token through AssumeRoleWithWebIdentity. Otherwise it uses the default credential chain as before. The token is requested lazily, right before the first upload, because the cargo build that precedes it can take longer than the token's lifetime.
  • The deploy-mz, deploy-mz-deploy and deploy-mz-debug macOS steps set MZ_BINARIES_UPLOAD_ROLE_ARN.
  • The deploy-mz macOS step gets a step key, deploy_mz-macos-aarch64, matching the other deploy pipelines.

Linux deploys are unchanged.

Rollout

The IAM role must exist before this merges. Until then the macOS uploads would fail at AssumeRoleWithWebIdentity. After merging, the next deploy-mz-deploy or deploy-mz-debug build on main exercises it.

🤖 Generated with Claude Code

TarballUploader can now obtain short-lived upload credentials by exchanging
the job's Buildkite OIDC token for an IAM role, when
MZ_BINARIES_UPLOAD_ROLE_ARN is set. The token is requested right before the
upload, since the build that precedes it can outlast the token's lifetime.

The three macOS deploy steps opt in. The deploy-mz macOS step gains a step
key so it has a stable identity like the other deploy steps. Linux uploads
are unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@jasonhernandez
jasonhernandez merged commit b67a45c into main Nov 13, 2026
94 checks passed
@jasonhernandez
jasonhernandez deleted the ci/macos-tarball-upload-oidc branch November 13, 2026 20:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants